1、依赖包安装(安装zabbix必须基于LAMP或LNMP环境)
yum install -y gcc gcc-c++ autoconf httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-bcmath mysql-connector-odbc mysql-devel libdbi-dbd-mysql net-snmp-devel curl-devel
2、安装存储库包
rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
3、安装Zabbix包
yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent
4、启动数据库
/etc/init.d/mysqld start
5、在MySQL创建zabbix数据库和用户
mysql -uroot mysql> create database zabbix character set utf8 collate utf8_bin; mysql> grant all privileges on zabbix.* to zabbix@localhost identified by ‘zabbix‘; mysql> flush privileges; mysql> exit
6、导入数据
cd /usr/share/doc/zabbix-server-mysql-2.4.2/create/ mysql -uzabbix -pzabbix zabbix < schema.sql mysql -uzabbix -pzabbix zabbix < images.sql mysql -uzabbix -pzabbix zabbix < data.sql
7、编辑PHP配置Zabbix前端
vim /etc/httpd/conf.d/zabbix.conf php_value max_execution_time 300 php_value memory_limit 128M php_value post_max_size 16M php_value upload_max_filesize 2M php_value max_input_time 300 php_value date.timezone Asia/Shanghai
8、启动Apache服务
/etc/init.d/httpd start
9、安装向导
http://服务器IP/zabbix
默认帐号Admin,密码zabbix
本文出自 “zhou_m blog” 博客,谢绝转载!
原文地址:http://zhmin.blog.51cto.com/5402080/1586680