一、安装MySQL
yum install mysql-server -y
1. 启动mysql
/etc/init.d/mysqld start
2. chkconfig mysqld on
3. 更改登录默认字符集
# vim /etc/my.cnf4. 检查字符集
5. 创建zabbix数据库,创建用户
create databases zabbix;grant all on zabbix.* to zabbix@localhost identified by "zabbix_pass";6. 修改数据库信息
vim /etc/zabbix/zabbix_server.conf
DBName=zabbix 91行DBUser=zabbix 107行DBPassword=zabbix_pass 116行添加DBSocket=/var/lib/mysql/mysql.sock 125行,数据库的连接方式7. 导入zabbix表查看需要导入的表# rpm -ql zabbix-server-mysql|grep sql /usr/sbin/zabbix_server_mysql/usr/share/doc/zabbix-server-mysql-2.2.10/usr/share/doc/zabbix-server-mysql-2.2.10/create/usr/share/doc/zabbix-server-mysql-2.2.10/create/data.sql/usr/share/doc/zabbix-server-mysql-2.2.10/create/p_w_picpaths.sql/usr/share/doc/zabbix-server-mysql-2.2.10/create/schema.sql导入表# mysql zabbix < /usr/share/doc/zabbix-server-mysql-2.2.10/create/schema.sql# mysql zabbix < /usr/share/doc/zabbix-server-mysql-2.2.10/create/p_w_picpaths.sql# mysql zabbix < /usr/share/doc/zabbix-server-mysql-2.2.10/create/data.sql8. 启动服务
# /etc/init.d/zabbix-server startStarting Zabbix server: [确定]# chkconfig zabbix-server on 开机自启动9. 查看日志内容
# tail -f /var/log/zabbix/zabbix_server.log二、在所有的服务器安装yum源
rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
检查是否有此yum源
# ls /etc/yum.repos.d/zabbix.repo
/etc/yum.repos.d/zabbix.repo三、安装zabbix server
yum install zabbix-server zabbix-server-mysql -y
四、安装zabbix web
yum install zabbix-web zabbix-web-mysql -y五、更改时区
# vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Chongqing 18行修改六、启动httpd服务
# /etc/init.d/httpd start
# chkconfig httpd on七、图形界面安装zabbix