centos8 安裝zabbix

IDzengkun發表於2020-11-21

centos8安裝zabbix

https://www.cnblogs.com/smallfishy/p/12986618.html
https://blog.csdn.net/qq_27647699/article/details/106208681

ngix埠為7979
zabbix資料庫密碼 Math@1101
微軟資料庫密碼 math1101
zabbix 埠 10051

登入賬號為 Admin,密碼:zabbix

轉載 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

啟動報錯是埠被佔用修改埠即可

相關文章