Centos6.7 安装zabbix+apache+MySQL教程
blog地址: http://www.CUOXin.com/caoguo
### 基本包安装 ###[root@ca0gu0 ~]# yum install httpd php php-devel mysql-server mysql-devel[root@ca0gu0 ~]# yum install libxml2-devel unixODBC-devel net-snmp net-snmp-devel libssh2-devel curl-devel[root@ca0gu0 ~]# yum install php-mysql php-bcmath php-mbstring php-gd libjpeg libjpeg-devel libpng libpng-devel php-xml[root@ca0gu0 ~]# yum install gcc make wget
###### zabbinx 编译安装 ######[root@ca0gu0 src]# wget http://nchc.dl.sourceforge.net/PRoject/zabbix/ZABBIX%20Latest%20Stable/2.2.10/zabbix-2.2.10.tar.gz[root@ca0gu0 ~]# groupadd zabbix[root@ca0gu0 ~]# useradd -g zabbix zabbix -M -s /sbin/nologin[root@ca0gu0 src]# tar zxvf zabbix-2.2.10.tar.gz[root@ca0gu0 src]# cd /usr/local/src[root@ca0gu0 src]# cd zabbix-2.2.10[root@ca0gu0 zabbix-2.2.10]# ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2 --enable-proxy --with-openipmi --with-unixodbc -with-ssh2 --enable-ipv6[root@ca0gu0 zabbix-2.2.10]# make install[root@ca0gu0 zabbix-2.2.10]# ln -s /usr/local/zabbix/sbin/zabbix_server /usr/local/sbin/[root@ca0gu0 zabbix-2.2.10]# ln -s /usr/local/zabbix/sbin/zabbix_agentd /usr/local/sbin/[root@ca0gu0 zabbix-2.2.10]# cp misc/init.d/fedora/core/zabbix_server /etc/init.d/[root@ca0gu0 zabbix-2.2.10]# cp misc/init.d/fedora/core/zabbix_agentd /etc/init.d/[root@ca0gu0 ~]# /etc/init.d/zabbix_server startStarting zabbix_server: [ OK ][root@ca0gu0 zabbix-2.2.10]# vi /usr/local/zabbix/etc/zabbix_server.confLogFile=/tmp/zabbix_server.logDBName=zabbix_dbDBUser=zabbix_userDBPassWord=zabbix_passwd[root@ca0gu0 zabbix-2.2.10]# /etc/init.d/zabbix_server restart[root@ca0gu0 zabbix-2.2.10]# mkdir -p /var/www/html/zabbix[root@ca0gu0 zabbix-2.2.10]# cp -a frontends/php/* /var/www/html/zabbix
####建立数据库并导入数据#####mysql> create database zabbix_db;mysql> grant all on zabbix_db.* to 'zabbix_user'@'localhost' identified by 'zabbix_passwd';mysql> flush privileges;[root@ca0gu0 zabbix-2.2.10]# mysql -uzabbix_user -pzabbix_passwd zabbix_db <database/mysql/schema.sql [root@ca0gu0 zabbix-2.2.10]# mysql -uzabbix_user -pzabbix_passwd zabbix_db<database/mysql/images.sql[root@ca0gu0 zabbix-2.2.10]# mysql -uzabbix_user -pzabbix_passwd zabbix_db <database/mysql/data.sql
# 登陆地址http://localhost/zabbixAdmin/zabbix
# 添加开机启动项[root@ca0gu0 ~]# chkconfig httpd on[root@ca0gu0 ~]# chkconfig mysqld on[root@ca0gu0 ~]# chkconfig zabbix_server on
下面看登陆web初始化
结束安装!!!
新闻热点
疑难解答