cat /etc/issue
CentOS release 6.9 (Final)
Kernel \r on an \m
sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config
iptables -F
service iptables save
chkconfig iptables off
iptables -A INPUT -p tcp --dport 10051 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
yum install zabbix zabbix-get zabbix-server zabbix-server-mysql zabbix-web zabbix-web-mysql mysql-server httpd php
sed -i "s/;date.timezone =/date.timezone = Asia\/Shanghai/" /etc/php.ini
sed -i "s/max_execution_time = 30/max_execution_time = 300/" /etc/php.ini
sed -i "s/post_max_size = 8M/post_max_size = 32M/" /etc/php.ini
sed -i "s/max_input_time = 60/max_input_time = 300/" /etc/php.ini
mysqladmin -uroot password 'mysql_pass';
mysql -uroot -pmysql_pass -e "create database zabbix character set utf8;"
mysql -uroot -pmysql_pass -e "grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';"
mysql -uroot -pmysql_pass -e "flush privileges;"
cd /usr/share/doc/zabbix-server-mysql-2.4.6/create
mysql -uzabbix -pzabbix zabbix < schema.sql
mysql -uzabbix -pzabbix zabbix < images.sql
mysql -uzabbix -pzabbix zabbix < data.sql
service httpd restart
service mysqld restart
chkconfig httpd on
chkconfig mysqld on
sed -i "s/# DBPassword=/DBPassword=zabbix/" /etc/zabbix/zabbix_server.conf
service zabbix-server restart
chkconfig zabbix-server on
web界面输入如: http://10.0.0.101/zabbix/setup.php
如果是虚拟机上安装的:http://虚拟机ip/zabbix/setup.php
默认用户名: admin
默认密码: zabbix
中间报错处理:
Zabbix server is running no
查看日志:
cat /var/log/zabbix/zabbix_server.log
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
经过反复检查最后发现数据库的密码写错了
这是个人配置的整个过程,以及在鹏配置过程中出现的一些小问题,由于每个人的环境不一样,在配置过程中可能会出现其他问题,建议大家在配置过程中根据具体问题进行解决。