由于官网很慢,经常看官方文档就弄的很烦,因此把我看官网安装配置zabbix的步骤在此记录一下。
###安装环境
centos6.8
192.168.2.110 基础服务器安装
#关闭防火墙
service iptables stop
chkconfig iptables off
#修改selinux
vim /etc/selinux/config
SELINUX=disabled
####yum安装mysql.apache.php
yum -y install httpd httpd-devel
yum -y install mysql mysql-servermysql-devel
yum -y install php php-mysql php-common php-gdphp-mbstring php-mcrypt php-devel php-xml
###yum安装zabbix
#先安装yum源:
# rpm -ivhhttp://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
#安装zabbix
# yum install zabbix-server-mysqlzabbix-web-mysql
#创建zabbix数据库
#先开启服务:service mysqldstart
shell> mysql -uroot-p<root_password>
mysql> create database zabbix characterset utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.*to zabbix@localhost identified by '<password>';
mysql> quit;
#导入数据到zabbix库
# cd/usr/share/doc/zabbix-server-mysql-2.4.8/create
# mysql -uroot -pxx zabbix < schema.sql
# mysql -uroot -pxx zabbix < p_w_picpaths.sql
# mysql -uroot -pxx zabbix < data.sql
###修改zabbix配置文件
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
#启动zabbix
# service zabbix-server start
###修改php配置
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
###启动服务
service httpd restart
chkconfig httpd on
service mysqld restart
chkconfig mysqld on
service zabbix-server restart
chkconfig zabbix-server on
#打开zabbix dashboard
192.168.2.110/zabbix 进行安装
客户端可以安装zabbix的yum源之后,直接yum安装:yum install zabbix-agent