centos7 安装 zabbix4.0

centos7 安装 zabbix4.0_第1张图片

 一、安装mysql数据库并授权

[root@server ~]# wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm

[root@server ~]# rpm -ivh mysql57-community-release-el7-8.noarch.rpm

[root@server ~]# yum install mysql-server -y

[root@server ~]# grep passw /var/log/mysqld.log 

[root@server ~]# mysqladmin -uroot -p'l%Lk-igdu5ne' password 'Zabbix@123'

[root@server ~]# mysql -uroot -p

mysql> create database zabbix;

mysql> create database zabbix character set utf8 collate utf8_bin;

mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'Zabbix@321';

二、安装zabbix

[root@server ~]# rpm -ivh http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm

[root@server ~]# yum -y install zabbix-server-mysql zabbix-web-mysql

三、导入数据

[root@server ~]# cd /usr/share/doc/zabbix-server-mysql-4.0.21/

[root@server zabbix-server-mysql-4.0.21]# zcat create.sql.gz | mysql -uzabbix -p'Zabbix@321' -D zabbix

四、修改配置文件

[root@server ~]# vim /etc/zabbix/zabbix_server.conf

DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=Zabbix@321

-------------------------------------------------------------------------------------------

[root@server ~]# cd /usr/share/zabbix/conf

[root@server conf]# cp zabbix.conf.php.example zabbix.conf.php

[root@server conf]# vim zabbix.conf.php

$DB['PASSWORD']                 = 'Zabbix@321';

-------------------------------------------------------------------------------------------

[root@server ~]# vim /etc/httpd/conf.d/zabbix.conf.

php_value date.timezone Asia/Shanghai

五、启动并查看日志

[root@server conf]# systemctl start  zabbix-server zabbix-agent httpd

[root@server conf]# tail -f  /var/log/zabbix/zabbix_server.log 
 22597:20200610:035655.835 server #27 started [alerter #1]
 22593:20200610:035655.835 server #23 started [trapper #4]
 22599:20200610:035655.837 server #29 started [alerter #3]
 22595:20200610:035655.837 server #25 started [icmp pinger #1]
 22600:20200610:035655.839 server #30 started [preprocessing manager #1]
 22596:20200610:035655.839 server #26 started [alert manager #1]
 22587:20200610:035655.839 server #17 started [poller #4]
 22602:20200610:035655.923 server #32 started [preprocessing worker #2]
 22601:20200610:035655.935 server #31 started [preprocessing worker #1]
 22603:20200610:035655.937 server #33 started [preprocessing worker #3]

六、访问web界面http://192.168.3.180/zabbix

centos7 安装 zabbix4.0_第2张图片

 centos7 安装 zabbix4.0_第3张图片

centos7 安装 zabbix4.0_第4张图片

centos7 安装 zabbix4.0_第5张图片

centos7 安装 zabbix4.0_第6张图片

centos7 安装 zabbix4.0_第7张图片

默认账号密码是Admin/zabbix 

centos7 安装 zabbix4.0_第8张图片

 

你可能感兴趣的:(zabbix)