I. Deployment environment
System: CentOS 6.4x64 Minimized installation
server:192.168.3.28
client:192.168.3.29
Two. Basic Package Installation
In the Server Installation foundation package, here the environment uses Yum installation, if the use of source installation is also possible.
[[email protected] ~]# yum-y install wget vim tree gcc gcc-c++ autoconf httpd php mysql mysql-server php-mysql Httpd-manu Al mod_ssl mod_perl mod_auth_mysql php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-bcmath mysql-connector-od BC Mysql-devel libdbi-dbd-mysql NET-SNMP net-snmp-devel curl-devel
Start httpd, MySQL and set to boot automatically
[[Email protected] ~]# service httpd start[[email protected] ~]# service mysqld start[[email protected] ~]# chkconfig http d on[[email protected] ~]# chkconfig mysqld on
Release the 80,3306 port in the iptables.
[[Email protected] ~]# iptables -i input -p tcp -m multiport --destination-port 80,10050:10051 -j accept# View Firewall Results [[email protected] ~]# iptables -l -nchain input (policy accept) Target prot opt source destination accept tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 80,10050:10051 accept all -- 0.0.0.0/0 0.0.0.0/0 state related,established accept icmp -- 0.0.0.0/0 0.0.0.0/0 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with Icmp-host-prohibited chain forward (policy accept) target prot opt source destination REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited Chain OUTPUT (Policy accept) target prot opt source destination #保存iptables规则 [[email protected] ~]# service iptables saveiptables: saving firewall rules to /etc /SYSCONFIG/IPTABLES:[  OK  ]
Three. Configure PHP parameters
The Zabbix operation requires specific PHP parameter support and is modified as follows
[[email protected] ~]# sed -i "[email protected];d ate.timezone [email Protected] = asia/[email protected] " /etc/php.ini[[email protected] ~]# sed -i "[email protected]_execution_time = [email protected]_execution_time = [email protected] " /etc/php.ini[[email protected]abbix-server ~]# sed -i "[email protected]_max_size = [email protected]_max_size = [email Protected] " /etc/php.ini[[email protected] ~]# sed -i " [email protected]_ Input_time = [email protected]_input_time = [email protected] " /etc/php.ini [[email protected] ~]# sed -i "[email protected]_limit = [email Protected]_limit = [email protected] " /etc/php.ini[[email protected] ~]# sed -i "[emAil protected];mbstring.func_overload = [email protected]_overload = [email protected] " /etc/php.ini
modifying httpd FQDN error, restarting the HTTPD service
[[email protected] ~]# echo "ServerName Localhost:80 " >>/etc/httpd/conf/httpd.conf[[email protected] ~]# /etc/init.d/httpd restartStopping httpd: [ OK ]Starting httpd:              [  OK  ]
Four. Download zabbix-2.4.5.tar.gz
[Email protected] ~]# wget http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.4.5/ Zabbix-2.4.5.tar.gz
Five. Add Zabbix users and Groups
[Email protected] ~]# groupadd-g 201 zabbix[[email protected] ~]# useradd-g zabbix-u 201-s/sbin/nologin Zabbix
six. Install Zabbix
[[email protected] ~]# tar xf zabbix-2.4.5.tar.gz[[email protected] ~]# cd zabbix-2.4.5[[email protected] zabbix-2.4.5]# ./configure --prefix=/usr/ Local/zabbix --enable-server --enable-proxy --enable-agent --with-mysql=/usr/bin/mysql_ config --with-net-snmp --with-libcurl[[email protected] zabbix-2.4.5]# make && make install# creating the Zabbix database and related tables [[email protected] zabbix-2.4.5]# mysql -e "create database zabbix ;" [[email protected] zabbix-2.4.5]# mysql -e "grant all on zabbix.* to [email protected] identified by ' Zabbix '; " [[email protected] zabbix-2.4.5]# mysql -uzabbix -pzabbix zabbix<./database/ Mysql/schema.sql[[email protected] zabbix-2.4.5]# mysql -uzabbix -pzabbix zabbix <./database/mYsql/images.sql[[email protected] zabbix-2.4.5]# mysql -uzabbix -pzabbix zabbix <./database/mysql/data.sql# Configuring soft Connect and boot file information [[Email protected] zabbix-2.4.5]# mkdir /var/log /zabbix[[email protected] zabbix-2.4.5]# chown zabbix.zabbix /var/log/zabbix[[email protected] zabbix-2.4.5]# ln -s /usr/local/zabbix/etc/ /etc/zabbix[[email protected] zabbix-2.4.5]# ln -s /usr/local/zabbix/bin/* /usr/bin/[[email Protected] zabbix-2.4.5]# ln -s /usr/local/zabbix/sbin/* /usr/sbin/ [[email protected] zabbix-2.4.5]# cp /root/zabbix-2.4.5/misc/init.d/fedora/core/zabbix_* / etc/init.d[[email protected] zabbix-2.4.5]# chmod 755 /etc/init.d/zabbix_* #修改/etc/ Zabbix_server and Zabbix_agentd boot files under the INIT.D directory [[email protected] zabbix-2.4.5]# sed -i "[ Email protected]=/usr/[emaIl protected]=/usr/local/[email protected] " /etc/init.d/zabbix_server[[email protected] zabbix-2.4.5]# sed -i "[email protected]=/usr/[email protected]=/usr/local/[ Email protected] " /etc/init.d/zabbix_agent# Modify/etc/zabbix/zabbix_server.conf[[email protected] zabbix-2.4.5]# sed -i "[email protected][email protected][email protected] " /etc/zabbix/zabbix_server.conf[[email protected] zabbix-2.4.5]# sed -i " [email protected]#[email protected][email protected] " /etc/zabbix/zabbix_server.conf[[email protected] zabbix-2.4.5]# sed -i "[email protected]# [email protected ][email protected] " /etc/zabbix/zabbix_server.conf# Modify/etc/zabbix/zabbix_agentd.conf[[email protected] zabbix-2.4.5]# sed -i "[email protected][email protected]=127.0.0.1,[ Email protected] " /etc/zabbix/zabbix_agentd.conf[[email protected] zabbix-2.4.5]# sed -i "[email protected][email protected]= $IP: [email protected] " /etc/zabbix/zabbix_agentd.conf[[email protected] zabbix-2.4.5]# sed -i "[Email protected]/[email protected]/log/zabbix /[email protected] " /etc/zabbix/zabbix_agentd.conf[[email protected] zabbix-2.4.5]# sed -i "[email protected]^# [email protected]=1\[email protected]" /etc/ Zabbix/zabbix_agentd.conf
This article is from the "ly36843" blog, please be sure to keep this source http://ly36843.blog.51cto.com/3120113/1640289
CentOS 6.4x64 Installation Deployment Zabbix