centos8安装zabbix5.0
转载 https://blog.csdn.net/qq_27647699/article/details/106208681
略有改动!
#基于CentOS-8.1.1911安装zabbix5.0,mysql8.0.17
1、设置yum源
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm
dnf clean all
2、安装Zabbix server,Web前端,agent
dnf install -y zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-agent
3、创建初始数据库
# dnf install -y mysql-server mysql-devel mysql-libs
# systemctl start mysqld
# mysql_secure_installation
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx
# mysql -uroot -p
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> create user zabbix@localhost identified by 'XXXXXXXXXXXXXXXXXXXXXXX';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> flush privileges;
mysql> quit;
4、导入初始架构和数据。
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p'XXXXXXXXXXXXXXXXXXXXXX' zabbix
5、为Zabbix server配置数据库,编辑配置文件 /etc/zabbix/zabbix_server.conf
DBPassword=XXXXXXXXXXXXXXXXXXXXXXXXXXXX
6、为Zabbix前端配置PHP,编辑配置文件 /etc/nginx/conf.d/zabbix.conf
listen 80;
server_name example.com; //ip 或 域名
7、编辑配置文件 /etc/php-fpm.d/zabbix.conf
php_value[date.timezone] = Asia/Shanghai
8、启动Zabbix server和agent进程,启动Zabbix server和agent进程,并为它们设置开机自启
systemctl restart zabbix-server zabbix-agent nginx php-fpm
systemctl enable zabbix-server zabbix-agent nginx php-fpm
————————————————
版权声明:本文为CSDN博主「qq_27647699」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_27647699/article/details/106208681