# 6.选择自己需要的安装包进行安装 yum install zabbix-get zabbix-sender zabbix-server-mysql zabbix-web zabbix-agent # 7.更新 updatedb # 8.定位创建语句位置 locate create.sql ----------------- /usr/share/doc/zabbix-server-mysql-3.2.11/create.sql.gz ----------------- # 9.解压create.sql.gz文件 cd /usr/share/doc/zabbix-server-mysql-3.2.11 gunzip create.sql.gz
# 10.导入脚本文件 mysql -uroot -p zabbix < create.sql
# 11.修改zabbix_server.conf这个配置文件 locate zabbix_server.conf ------------------------- /etc/zabbix/zabbix_server.conf ------------------------- vim /etc/zabbix/zabbix_server.conf ------------------ 修改 115 # DBPassword= 为 DBPassword=123456 修改 122 # DBSocket=/tmp/mysql.sock 为 DBSocket=/var/lib/mysql/mysql.sock ------------------ # 12.正常应该有这几个参数 egrep -vn "^#|^$" /etc/zabbix/zabbix_server.conf ---------------------- 38 : LogFile=/var/log/zabbix/zabbix_server.log 49 : LogFileSize=0 72 : PidFile=/var/run/zabbix/zabbix_server.pid 91 : DBName=zabbix 107: DBUser=zabbix 115: DBPassword=123456 122: DBSocket=/var/lib/mysql/mysql.sock 287: SNMPTrapperFile=/var/log/snmptrap/snmptrap.log 413: Timeout=4 455: AlertScriptsPath=/usr/lib/zabbix/alertscripts 465: ExternalScripts=/usr/lib/zabbix/externalscripts 501: LogSlowQueries=3000 ---------------------- 13.修改时区 vim /etc/httpd/conf.d/zabbix.conf ------------------ 修改 19 # php_value date.timezone Europe/Riga 为 19 php_value date.timezone Asia/Shanghai ------------------
# 14.开启一些服务 yum install httpd systemctl start httpd.service systemctl start mariadb systemctl start zabbix-server systemctl start zabbix-agent # 15.设置开机启动 systemctl enable httpd systemctl enable mariadb systemctl enable zabbix-server systemctl enable zabbix-agent
16.登录进行安装 http://10.1.44.185/zabbix/setup.php
原文地址:http://blog.51cto.com/13634837/2116916