zabbix部署监控端(server)以及页面优化
实验环境准备
172.20.10.2 server.zabbix.com
172.20.10.3 agent.zabbix.com
172.20.10.8 windows10
Server 端
[root@localhost ~]# vim /etc/hostname
server.zabbix.com
[root@localhost ~]# nslookup www.baidu.com
[root@localhost ~]# hostname server.zabbix.com
[root@localhost ~]# bash
[root@server ~]# vim /etc/hosts
172.20.10.2 server.zabbix.com
172.20.10.3 agent.zabbix.com
172.20.10.8 windows10
[root@server ~]# scp /etc/hosts root@172.20.10.3:/etc/hosts
[root@server ~]# systemctl stop firewalld
[root@server ~]# setenforce 0
[root@server ~]# iptables -F
Agent 端
[root@localhost ~]# vim /etc/hosts
172.20.10.2 server.zabbix.com
172.20.10.3 agent.zabbix.com
172.20.10.8 windows10
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# setenforce 0
[root@localhost ~]# iptables -F
[root@localhost ~]# vim /etc/hostname
agent.zabbix.com
[root@localhost ~]# hostname agent.zabbix.com
[root@localhost ~]# bash
[root@agent ~]# ping server.zabbix.com -c 4
Server 端
配置阿里云yum源
[root@server ~]# cd /etc/yum.repos.d/
[root@server yum.repos.d]# wget http://mirrors.aliyun.com/repo/Centos-7.repo
[root@server yum.repos.d]# ls
bak Centos-7.repo CentOS-Media.repo
[root@server ~]# yum -y install httpd mariadb-server mariadb mariadb-devel php php-mbstring php-mysql php-bcmath php-gd php-xmlrpc php-ldap php-xml libevent libevent-devel net-snmp net-snmp-devel libxml2 libxml2-devel ntpdate
[root@server ~]# ntpdate us.pool.ntp.org
启动lamp 对应服务
[root@server ~]# systemctl start mariadb
[root@server ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[root@server ~]# systemctl start httpd
[root@server ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[root@server ~]# mysqladmin -u root password 123123
准备java环境
[root@server ~]# java -version
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (build 1.8.0_161-b14)
OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)
[root@server ~]# javac -version
bash: javac: 未找到命令...
相似命令是: 'java'
[root@server ~]# which java
/usr/bin/java
[root@server ~]# rm -rf /usr/bin/java
[root@server ~]# ls
anaconda-ks.cfg redis-3.2.5 公共 图片 音乐
initial-setup-ks.cfg redis-3.2.5.tar.gz 模板 文档 桌面
jdk-8u91-linux-x64.tar.gz yum.sh 视频 下载
[root@server ~]# tar xf jdk-8u91-linux-x64.tar.gz
[root@server ~]# mv jdk1.8.0_91/ /usr/local/java
[root@server ~]# vim /etc/profile
export JAVA_HOME=/usr/local/java
export PATH=$PATH:$JAVA_HOME/bin
[root@server ~]# source /etc/profile
[root@server ~]# java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
[root@server ~]# javac -version
javac 1.8.0_91
[root@server ~]# which java
/usr/local/java/bin/java
源码安装zabbix
[root@server ~]# ls
anaconda-ks.cfg redis-3.2.5 zabbix-3.4.11.tar.gz 视频 下载
initial-setup-ks.cfg redis-3.2.5.tar.gz 公共 图片 音乐
jdk-8u91-linux-x64.tar.gz yum.sh 模板 文档 桌面
[root@server ~]# tar xf zabbix-3.4.11.tar.gz -C /usr/src
[root@server ~]# cd /usr/src/zabbix-3.4.11/
[root@server ~]# yum -y install curl-devel
[root@server zabbix-3.4.11]# ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 --enable-java && make -j2 && make install
Mariadb 数据库授权
[root@server ~]# mysql -u root -p123123
MariaDB [(none)]> create database zabbix character set utf8;
MariaDB [(none)]> grant all on zabbix.* to zabbix@localhost identified by 'zabbix';
MariaDB [(none)]> grant all on zabbix.* to zabbix@'172.20.10.2'identified by 'zabbix';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit
[root@server ~]# cd /usr/src/zabbix-3.4.11/
[root@server zabbix-3.4.11]# mysql -uzabbix -pzabbix zabbix < database/mysql/schema.sql
[root@server zabbix-3.4.11]# mysql -uzabbix -pzabbix zabbix < database/mysql/images.sql
[root@server zabbix-3.4.11]# mysql -uzabbix -pzabbix zabbix < database/mysql/data.sql
[root@server zabbix-3.4.11]# mysql -u root -p123123
MariaDB [(none)]> use zabbix;
MariaDB [zabbix]> show tables;
+----------------------------+
| Tables_in_zabbix |
+----------------------------+
| acknowledges |
| actions |
| alerts |
| application_discovery |
| application_prototype |
| valuemaps |
| widget |
| widget_field |
+----------------------------+
140 rows in set (0.00 sec)
MariaDB [zabbix]> \q
创建zabbix 程序用户并授权防止权限报错
[root@server ~]# useradd -M -s /sbin/nologin zabbix
[root@server ~]# cd /usr/local
[root@server local]# chown -R zabbix:zabbix zabbix/
[root@server local]# cd ./zabbix/
[root@server zabbix]# pwd
/usr/local/zabbix
[root@server zabbix]# mkdir logs
[root@server zabbix]# chown zabbix:zabbix logs
[root@server zabbix]# cp -p etc/zabbix_server.conf{,.bak}
[root@server zabbix]# cp -p etc/zabbix_agentd.conf{,.bak}
修改zabbix 配置文件
[root@server zabbix]# cd /usr/local/zabbix/etc/
[root@server etc]# ls
zabbix_agentd.conf zabbix_agentd.conf.d zabbix_server.conf.bak
zabbix_agentd.conf.bak zabbix_server.conf zabbix_server.conf.d
[root@server etc]# cd /usr/local/zabbix/etc/
[root@server etc]# vim zabbix_server.conf
LogFile=/usr/local/zabbix/logs/zabbix_server.log
PidFile=/tmp/zabbix_server.pid
DBHost=172.20.10.2
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
DBSocket=/var/lib/mysql/mysql.sock
Include=/usr/local/zabbix/etc/zabbix_server.conf.d/*.conf
[root@server etc]# vim zabbix_agentd.conf
PidFile=/tmp/zabbix_agentd.pid
Server=127.0.0.1,172.20.10.2
ServerActive=172.20.10.2
Hostname=server.zabbix.com
LogFile=/usr/local/zabbix/logs/zabbix_agentd.log
Include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/*.conf
[root@server etc]# ln -s /usr/local/zabbix/sbin/* /usr/local/bin
[root@server etc]# zabbix_server
[root@server etc]# zabbix_agentd
配置php 与apache
[root@server ~]# mv /usr/src/zabbix-3.4.11/frontends/php/ /var/www/html/zabbix
[root@server ~]# chown -R apache:apache /var/www/html/zabbix
[root@server ~]# vim /etc/php.ini
878 date.timezone = Asia/Shanghai
384 max_execution_time = 300
394 max_input_time = 300
672 post_max_size =32M
405 memory_limit = 128M
854 extension=bcmath.so
[root@server ~]# systemctl restart httpd 确保10050和10051 和80 端口成功开启
[root@server etc]# netstat -anpt |egrep ':10050|:10051|:80'
tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 14391/zabbix_agentd
tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 14329/zabbix_server
tcp6 0 0 :::10050 :::* LISTEN 14391/zabbix_agentd
tcp6 0 0 :::10051 :::* LISTEN 14329/zabbix_server
tcp6 0 0 :::80 :::* LISTEN 14437/httpd

如果php databases support 出现fail 需要解决依赖关系
[root@server zabbix-3.4.11]# yum -y install php-mysql.x86_64
[root@server zabbix-3.4.11]# systemctl restart mariadb
[root@server zabbix-3.4.11]# systemctl restart httpd
确保下面全是OK,哪个不OK解决哪个







启动成功默认英文,开启中文页面
开始优化页面



完成后F5加载页面就会中文显示
更改admin 密码


改完密码登录下次需要按新密码登录,退出在右上角
解决中文乱码问题

这里我是自己下载的字体,并替换原字体(没有字体的可以去下载放到指定目录下就可以)
[root@server ~]# cd /var/www/html/zabbix/fonts/
[root@server fonts]# ls
DejaVuSans.ttf
[root@server fonts]# mv DejaVuSans.ttf DejaVuSans.ttf.bak
[root@server fonts]# rz -E
rz waiting to receive.
[root@server fonts]# ls
DejaVuSans.ttf.bak simkai.ttf
[root@server fonts]# mv simkai.ttf DejaVuSans.ttf
[root@server fonts]# ls
DejaVuSans.ttf DejaVuSans.ttf.bak
[root@server fonts]# ll
总用量 4780
-rw-r--r--. 1 root root 4135804 9月 22 2017 DejaVuSans.ttf
-rw-r--r--. 1 apache apache 756072 6月 25 2018 DejaVuSans.ttf.bak
[root@server fonts]# chown -R apache:apache *
[root@server fonts]# ll
总用量 4780
-rw-r--r--. 1 apache apache 4135804 9月 22 2017 DejaVuSans.ttf
-rw-r--r--. 1 apache apache 756072 6月 25 2018 DejaVuSans.ttf.bak

zabbix部署监控端(server)以及页面优化的更多相关文章
- zabbix被监控端代理设置
zabbix被监控端代理设置 安装zabbix-agent客户端 rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-re ...
- CentOS7下搭建zabbix监控(二)——Zabbix被监控端配置
Zabbix监控端配置请查看:CentOS7下搭建zabbix监控(一)——Zabbix监控端配置 (1).在CentOS7(被监控端)上部署Zabbix Agent 主机名:youxi2 IP地址: ...
- centos6.8 搭建zabbix被监控端
System:Centos 6.8 Zabbix-agent:3.2.1 1 安装对应版本的zabbix的yum源,官方网站中没有找到zabbix3.0支持的centos6的源,所以用的3.2 #rp ...
- 监控服务zabbix部署
目录 1. zabbix介绍 2. zabbix特点 3. zabbix配置文件 4. 部署zabbix 4.1 zabbix服务端安装 4.2 zabbix服务端配置 4.3 zabbix服务端we ...
- zabbix部署文档
环境:zabbix server centos 7 1611最小化安装 172.16.103.2 zabbix client Centos 7 1611 最小化安装 172.16.103.3 1,配置 ...
- zabbix企业监控
第一节.系统初始化 1.前期环境 主机名 IP地址 操作系统 备注 zabbix-10 192.168.2.10 CentOS Linux release 7.4 zabbix服务端 agent-15 ...
- Zabbix——部署(DB与web分离)
前提条件: 两台centos7设备 两台设备可以相互访问 Zabbix-Servser版本为4.0 mysql版本为8.0 关闭防火墙 Zabbix部署(包含server,web,agent) rpm ...
- zabbix分布式监控的部署与win被控端
zabbix是一个分布式监视,管理系统,基于server-clinet架构,可用于监视各种网络服务,服务器和网络机器等状态. server端基于C语言,web管理端Frontend则是基于PHPA制作 ...
- zabbix 3.2.2 server端(源码包)安装部署 (一)【转】
环境准备: 操作系统 CentOS 6.8 2.6.32-642.11.1.el6.x86_64 zabbix server 172.16.10.150 zabbix agent 172.16.10. ...
随机推荐
- iOS 小知识
iOS 各版本: http://www.pig66.com/2018/145_1021/17357553.html
- google spanner
REF 论文 google spanner spanner 介绍 http://blog.jobbole.com/110262/
- linux采用scp命令拷贝文件到本地,拷贝本地文件到远程服务器
// 假设远程服务器IP地址为 192.168.1.100 1.从服务器复制文件到本地: scp root@192.168.1.100:/data/test.txt /home/myfile/ roo ...
- [置顶]
大数据架构hadoop
摘要:Admaster数据挖掘总监 随着互联网.移动互联网和物联网的发展,谁也无法否认,我们已经切实地迎来了一个海量数据的时代,数据调查公司IDC预计2011年的数据总量将达到1.8万亿GB,对这些海 ...
- Ubuntu14.04 安装CUDA7.5 + Caffe + cuDNN
本系列文章由 @yhl_leo 出品,转载请注明出处. 文章链接: http://blog.csdn.net/yhl_leo/article/details/50961542 花了一天时间,在电脑上安 ...
- Linux常用命令last的使用方法详解
http://www.jb51.net/article/120140.htm 最近在学习linux命令,学习到了last命令,发现很多同学对last命令不是很熟悉,last命令的功能列出目前与过去登入 ...
- Servlet过滤器和监听器知识总结
Servlet过滤器是 Servlet 程序的一种特殊用法,主要用来完成一些通用的操作,如编码的过滤.判断用户的登录状态.过滤器使得Servlet开发者能够在客户端请求到达 Servlet资源之前被截 ...
- bzoj 1266 1266: [AHOI2006]上学路线route
1266: [AHOI2006]上学路线route Time Limit: 3 Sec Memory Limit: 162 MBSubmit: 2356 Solved: 841[Submit][S ...
- Leetcode--easy系列2
#14 Longest Common Prefix Write a function to find the longest common prefix string amongst an array ...
- vijos- P1385盗窃-月之眼 (水题 + python)
P1385盗窃-月之眼 Accepted 标签:怪盗基德 VS OIBH[显示标签] 背景 怪盗基德 VS OIBH 第三话 描写叙述 怪盗基德第三次来到熟悉的OIBH总部.屡屡失败的OIBH这次看守 ...