金庸武功之“黯然销魂掌”
一.部署环境
系统:CentOS 6.5x64 最小化安装
Server:192.168.93.126
Client:192.168.93.125
二.基础软件包安装
在server安装基础软件包,这里的环境使用yum安装,如果使用源码安装也是可以的。
yum -y install wget vim tree gcc gcc-c++ autoconf httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc
php-bcmath mysql-connector-odbc mysql-devel libdbi-dbd-mysql net-snmp net-snmp-devel curl-devel
启动httpd、mysql并设置成开机自动启动
# service httpd start
# service mysqld start
# chkconfig httpd on
# chkconfig mysqld on
停止iptables、关闭Selinux
service iptables stop
chkconfig iptables off
vi /etc/sysconfig/selinux(需要重启服务器)
SELINUX=disabled
三.配置PHP参数
zabbix的运行需要特定的php参数支持,修改如下:
# sed -i "s@;date.timezone =@date.timezone = Asia/Shanghai@g" /etc/php.ini
# sed -i "s@max_execution_time = 30@max_execution_time = 300@g" /etc/php.ini
# sed -i "s@post_max_size = 8M@post_max_size = 32M@g" /etc/php.ini
# sed -i "s@max_input_time = 60@max_input_time = 300@g" /etc/php.ini
# sed -i "s@memory_limit = 128M@memory_limit = 128M@g" /etc/php.ini
# sed -i "s@;mbstring.func_overload = 0@ambstring.func_overload = 2@g" /etc/php.ini
修改httpd的FQDN错误,重启httpd服务
# echo "ServerName localhost:80" >>/etc/httpd/conf/httpd.conf
# /etc/init.d/httpd restart
Stopping httpd:
Starting httpd:
四.下载zabbix-2.4.5.tar.gz
[sjwl@zabbix-server ~]# wgethttp://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.4.5/zabbix-2.4.5.tar.gz
五.添加zabbix用户和组
# groupadd -g 201 zabbix
# useradd -g zabbix -u 201 -s /sbin/nologin zabbix
六.安装zabbix-server端
# tar xf zabbix-2.4.5.tar.gz
# cd 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
# make && make install
#创建zabbix数据库以及相关表
# mysql -e "create database zabbix default charset utf8;"
# mysql -e "grant all on zabbix.* to zabbix@localhost identified by 'zabbix';"
# mysql -uzabbix -pzabbix zabbix
页:
[1]