dnf update
dnf install -y epel*
vi /etc/yum.repos.d/epel.repo
[epel]
...
excludepkgs=zabbix*
rpm -Uvh https://repo.zabbix.com/zabbix/7.0/rocky/9/x86_64/zabbix-release-latest-7.0.el9.noarch.rpm
dnf clean all
dnf install zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent
dnf install mysql-server
systemctl start mysqld
#剛裝好沒有密碼,登入修改
mysql -uroot
ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewPassword';
#Create initial database
create database zabbix character set utf8mb4 collate utf8mb4_bin;
create user zabbix@localhost identified by 'NewPassword';
grant all privileges on zabbix.* to zabbix@localhost;
set global log_bin_trust_function_creators = 1;
quit;
#輸入密碼,等待匯入資料庫
zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
#Disable log_bin_trust_function_creators option after importing database schema
mysql -uroot -p
set global log_bin_trust_function_creators = 0;
quit;
vi /etc/zabbix/zabbix_server.conf
DBPassword=NewPassword
systemctl restart zabbix-server zabbix-agent nginx php-fpm
systemctl enable zabbix-server zabbix-agent nginx php-fpm
vi /etc/nginx/conf.d/zabbix.conf
listen 8080;
systemctl restart nginx
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload
#設定zabbix
http://192.168.12.3:8080/
預設帳號密碼 Admin / zabbix
沒有留言:
張貼留言