# rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-4.el8.noarch.rpm # dnf clean all
(2)安装光盘源
mount /dev/cdrom /mnt cd /etc/yum.repos.d mkdir bk mv *.repo bk/ echo "[EL8-1]" >> /etc/yum.repos.d/EL8.repo echo "name =Linux-8-DVD1" >> /etc/yum.repos.d/EL8.repo echo "baseurl=file:///mnt/AppStream" >> /etc/yum.repos.d/EL8.repo echo "gpgcheck=0" >> /etc/yum.repos.d/EL8.repo echo "enabled=1" >> /etc/yum.repos.d/EL8.repo echo "[EL8-2]" >> /etc/yum.repos.d/EL8.repo echo "name =Linux-8-DVD2" >> /etc/yum.repos.d/EL8.repo echo "baseurl=file:///mnt/BaseOS" >> /etc/yum.repos.d/EL8.repo echo "gpgcheck=0" >> /etc/yum.repos.d/EL8.repo echo "enabled=1" >> /etc/yum.repos.d/EL8.repo
2、 安装Zabbix server,Web前端,agent
# dnf install zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent
Make sure you have database server up and running.
在数据库主机上运行以下代码。
# mysql -uroot -proot create database zabbix character set utf8mb4 collate utf8mb4_bin; create user zabbix@localhost identified by 'zabbix'; create user zabbix@'%' identified by 'zabbix'; grant all privileges on zabbix.* to zabbix@localhost; grant all privileges on zabbix.* to zabbix@'%'; 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 -pzabbix zabbix
Disable log_bin_trust_function_creators option after importing database schema.
mysql -uroot -proot set global log_bin_trust_function_creators = 0; quit;
编辑配置文件 /etc/zabbix/zabbix_server.conf
DBPassword=password
编辑配置文件 /etc/nginx/conf.d/zabbix.conf uncomment and set 'listen' and 'server_name' directives.
# listen 8080; # server_name example.com;
(1)启动Zabbix server和agent进程,并为它们设置开机自启:
# systemctl restart zabbix-server zabbix-agent nginx php-fpm # systemctl enable zabbix-server zabbix-agent nginx php-fpm
(2)启动zabbix server报错:undefined symbol: usmAES192PrivProtocol
/usr/sbin/zabbix_server: symbol lookup error: /usr/sbin/zabbix_server: undefined symbol: usmAES192PrivProtocol
(3)解决方法
-https://www.topunix.com/post-10183.html
7、Open Zabbix UI web page
The URL for Zabbix UI when using Nginx depends on the configuration changes you should have made.
http://192.168.20.51:8080
三、配置web
1、登录zabbix web
http://192.168.20.51:8080
2、初始化界面
3、必要条件检测
4、配置数据库
此处如果报错,需要修改数据库主机地址192.168.20.51
5、完成后登录zabbix
默认用户名(A是大写)/密码:Admin/zabbix
四、客户都安装(主动模式和被动模式)
见
https://www.topunix.com/post-240.html