#install lamp
yum install gcc glibc glibc-common cairo pango zlib zlib-devel freetype freetype-devel gd gd-devel -y
yum install mysql* httpd* php* --skip-broken -y
#add user for zabbix
groupadd zabbix
useradd -g zabbix zabbix
#download and install
wget http://iweb.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.8/zabbix-2.2.8.tar.gz
tar zxvf zabbix-2.2.8.tar.gz
cd zabbix-2.2.8
./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 #zabbix_server
#./configure --enable-agent #zabbix_agent
make && make install
mysql -e "create database zabbix character set utf8 collate utf8_bin;"
mysql -e "grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'zabbix';"
mysql -e "flush privileges;"
cd database/mysql/
mysql zabbix <schema.sql
mysql zabbix < p_w_picpaths.sql
mysql zabbix < data.sql
#http diretory
mkdir /usr/local/apache2/htdocs/zabbix #http diretory /var/www/html
cd frontends/php
cp -a . /usr/local/apache2/htdocs/zabbix #http diretory /var/www/html
#zabbix_server configure
vim /usr/local/etc/zabbix_server.conf
DBUser=zabbix
DBPassword=zabbix
DBSocket=/tmp/mysql.sock
#zabbix_agent configure
vim /usr/local/etc/zabbix_agentd.conf
Server=127.0.0.1,192.168.199.118
ServerActive=127.0.0.1,192.168.199.118
Hostname=192.168.199.119
#service start
zabbix_server
zabbix_agentd
#service stop
killall -9 zabbix_server
killall -9 zabbix_agentd