支持版本:RHEL6, CentOS 6
1、依赖包安装(安装zabbix必须基于LAMP或LNMP环境)
1 | yum install -y gcc gcc-c++ autoconf httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_per
2、安装存储库包
1 | rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm |
3、安装Zabbix包
1 | yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent |
4、启动数据库
1 2 | /etc/init.d/mysqld start chkconfig mysqld on
5、在MySQL创建zabbix数据库和用户
1 2 3 4 5 6 | 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、导入数据
1 2 3 4 | cd /usr/share/doc/zabbix-server-mysql-2.4.2/create/ mysql -uzabbix -pzabbix zabbix < schema.sql mysql -uzabbix -pzabbix zabbix < p_w_picpaths.sql mysql -uzabbix -pzabbix zabbix < data.sql
7、编辑zabbix_server配置文件
1 2 3 4 5 | vi /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=zabbix |
8、Zabbix服务启动
1 2 | /etc/init.d/zabbix-server start chkconfig zabbix-server on
9、编辑PHP配置Zabbix前端
1 2 3 4 5 6 7 | 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
10、启动Apache服务
1 2 | /etc/init.d/httpd start chkconfig httpd on
11、安装向导
|
|
|
|
|
|
|
如报错:时间需要改一下
转载于:https://blog.51cto.com/zhangbin666/1867659