CentOS 5.6下Zabbix 1.8.5 服务端安装部署

CentOS 5.6 x86_64 + Zabbix 1.8.5
 IP:192.168.88.130
 
一、安装LAMP环境依赖包:
 # yum install mysql-server mysql-devel libcurl-devel net-snmp-devel php php-gd php-xml php-mysql php-mbstring php-bcmath httpd curl-devel
 
二、添加zabbix用户、用户组
 # groupadd zabbix
 # useradd zabbix -g zabbix
 
三、创建数据库、添加数据库授权  (mysql 默认root密码为空的情况下)
 # /etc/init.d/mysqld start            mysql
 # mysql -e "create database zabbix character set utf8;"          创建数据库,并设置数据库字符集
 # mysql -uroot -p -e "grant all on zabbix.* to zabbix@localhost identified by '123456';"    授权数据库
 
四、将zabbix源码包中的数据导入到新建的zabbix数据库
 # cd /usr/local/src/zabbix-1.8.5/
 # mysql -uzabbix -p'123456' zabbix < create/schema/mysql.sql
 # mysql -uzabbix -p'123456' zabbix < create/data/data.sql
 # mysql -uzabbix -p'123456' zabbix < create/data/images_mysql.sql
 
五、编译安装zabbix
  # ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl
  # make
  # make install
 
  六、为zabbix server添加端口
  vim /etc/services
 添加如下信息
  zabbix-agent        10050/tcp        Zabbix Agent
  zabbix-agent        10050/udp        Zabbix Agent
  zabbix-trapper    10051/tcp        Zabbix Trapper
  zabbix-trapper    10051/udp        Zabbix Trapper

七、拷贝配置文件到相应的目录下
 # mkdir /etc/zabbix
# cp misc/conf/zabbix_server.conf /etc/zabbix/
 # cp misc/conf/zabbix_proxy.conf /etc/zabbix/
 # cp misc/conf/zabbix_agent.conf /etc/zabbix/
 # cp misc/conf/zabbix_agentd.conf /etc/zabbix/