zabbix4.0版本(一)
1.安装zabbix-server
1.安装zabbix源
[root@ecs-t6-medium-2-linux-20190918110929 ~]#
[root@ecs-t6-medium-2-linux-20190918110929 ~]# yum install -y zabbix-server-mysql zabbix-web-mysql zabbix-agent mariadb-server
2.启动MySQL
[root@ecs-t6-medium-2-linux-20190918110929 ~]# systemctl start mariadb.service && systemctl enable mariadb.service
3.修改MySQL密码
[root@ecs-t6-medium-2-linux-20190918110929 ~]# mysqladmin password 123456
[root@ecs-t6-medium-2-linux-20190918110929 ~]# mysql -uroot -p
4.创建zabbix数据库
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.01 sec)
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
5.测试连接数据库
[root@ecs-t6-medium-2-linux-20190918110929 ~]# mysql -uzabbix -pzabbix
6.导入数据库
[root@ecs-t6-medium-2-linux-20190918110929 zabbix-server-mysql-4.0.14]# zcat /usr/share/doc/zabbix-server-mysql-4.0.14/create.sql.gz |mysql -uzabbix -pzabbix zabbix
7.修改zabbix-server.conf
[root@ecs-t6-medium-2-linux-20190918110929 ~]# grep "^[a-Z]" /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
8.启动 Zabbix 服务进程,并加入开机自启
[root@ecs-t6-medium-2-linux-20190918110929 ~]# systemctl start zabbix-server.service
[root@ecs-t6-medium-2-linux-20190918110929 ~]# systemctl enable zabbix-server.service
9.配置 Apache 的配置文件/etc/httpd/conf.d/zabbix.conf,修改时区
[root@ecs-t6-medium-2-linux-20190918110929 ~]# vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
10.启动httpdweb服务
[root@ecs-t6-medium-2-linux-20190918110929 ~]# systemctl start httpd
11.zabbix-web配置
修改中文
中文乱码
[root@ecs-t6-medium-2-linux-20190918110929 ~]# yum install wqy-microhei-fonts -y
[root@ecs-t6-medium-2-linux-20190918110929 ~]# cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/zabbix/assets/fonts/graphfont.ttf