你的位置:首页 > 操作系统

[操作系统]Centos6.7 安装zabbix+apache+mysql教程

Centos6.7 安装zabbix+apache+mysql教程

blog地址: http://www.cnblogs.com/caoguo

### 基本包安装 ###[[email protected] ~]# yum install httpd php php-devel mysql-server mysql-devel[[email protected] ~]# yum install libdevel[[email protected] ~]# yum install php-mysql php-bcmath php-mbstring php-gd libjpeg libjpeg-devel libpng libpng-devel php-~]# yum install gcc make wget

 

###### zabbinx 编译安装 ######[[email protected] src]# wget http://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.10/zabbix-2.2.10.tar.gz[[email protected] ~]# groupadd zabbix[[email protected] ~]# useradd -g zabbix zabbix -M -s /sbin/nologin[[email protected] src]# tar zxvf zabbix-2.2.10.tar.gz[[email protected] src]# cd /usr/local/src[[email protected] src]# cd zabbix-2.2.10[[email protected] zabbix-2.2.10]# ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libipv6[[email protected] zabbix-2.2.10]# make install[[email protected] zabbix-2.2.10]# ln -s /usr/local/zabbix/sbin/zabbix_server /usr/local/sbin/[[email protected] zabbix-2.2.10]# ln -s /usr/local/zabbix/sbin/zabbix_agentd /usr/local/sbin/[[email protected] zabbix-2.2.10]# cp misc/init.d/fedora/core/zabbix_server /etc/init.d/[[email protected] zabbix-2.2.10]# cp misc/init.d/fedora/core/zabbix_agentd /etc/init.d/[[email protected] ~]# /etc/init.d/zabbix_server startStarting zabbix_server:                  [ OK ][[email protected] zabbix-2.2.10]# vi /usr/local/zabbix/etc/zabbix_server.confLogFile=/tmp/zabbix_server.logDBName=zabbix_dbDBUser=zabbix_userDBPassword=zabbix_passwd[[email protected] zabbix-2.2.10]# /etc/init.d/zabbix_server restart[[email protected] zabbix-2.2.10]# mkdir -p /var/www/html/zabbix[[email protected] 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;[[email protected] zabbix-2.2.10]# mysql -uzabbix_user -pzabbix_passwd zabbix_db <database/mysql/schema.sql [[email protected] zabbix-2.2.10]# mysql -uzabbix_user -pzabbix_passwd zabbix_db<database/mysql/images.sql[[email protected] zabbix-2.2.10]# mysql -uzabbix_user -pzabbix_passwd zabbix_db <database/mysql/data.sql

 

# 登陆地址http://localhost/zabbixAdmin/zabbix

 

# 添加开机启动项[[email protected] ~]# chkconfig httpd on[[email protected] ~]# chkconfig mysqld on[[email protected] ~]# chkconfig zabbix_server on

 

下面看登陆web初始化

 

 

 

 

 

 

 

 

 

结束安装!!!