ZABBIX3.0服务端的安装
一、关闭防火墙和selinux
# service iptables stop
# setenforce 0
二、升级MySQL
# yum list installed | grep mysql
# yum remove mysql*
# rpm -ivh
http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
# yum install mysql-server
# yum install vim -y
# vim /etc/my.cnf
[mysqld]
innodb_file_per_table
保存退出
#service mysqld start
# mysql_secure_installation
Enter current password for root (enter for none):
Set root password? [Y/n]
Remove anonymous users? [Y/n]
Disallow root login remotely? [Y/n]
Remove test database and access to it? [Y/n]
Reload privilege tables now? [Y/n]
都回复y
#mysql -u root -p
CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY 'root';
show databases;
三、升级PHP
配置webtatic源
#rpm -ivhhttp://repo.webtatic.com/yum/el6/latest.rpm
卸载旧版本php
# yum erase php php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mcrypt php-mbstring php-devel php-pecl-memcached php-pecl-memcache php-common php-pdo php-cli php-fpm libmemcached
# wget http://mirrors.hust.edu.cn/epel/6/x86_64/libmcrypt-2.5.8-9.el6.x86_64.rpm
#rpm -ivhlibmcrypt-2.5.8-9.el6.x86_64.rpm
安装新版本PHP
# yum install httpd php56w php56w-mysql php56w-gd php56w-imap php56w-ldap php56w-odbc php56w-pear php56w-xml php56w-xmlrpc php56w-mcrypt php56w-mbstring php56w-devel php56w-pecl-memcached php56w-common php56w-pdo php56w-cli php56w-pecl-memcache php56w-bcmath php56w-fpm
# vi/etc/php.ini
post_max_size=16M
max_execution_time=300
max_input_time=300
date.timezone=Asia/Shanghai
always_populate_raw_post_data=-1
启动web server
#service httpd start
升级CURL
# yum install git -y
#git clonehttps://github.com/zabbixcn/curl-rpm
#cd curl-rpm/RPMS
#yum install curl-7.29.0-25.el6.x86_64.rpm libcurl-7.29.0-25.el6.x86_64.rpm libcurl-devel-7.29.0-25.el6.x86_64.rpm
#curl –V
四、下载和安装zabbix
#groupadd zabbix
#useradd -g zabbix zabbix
#rpm –ivhhttp://repo.zabbix.com/zabbix/3.0/rhel/6/x86_64/zabbix-release-3.0-1.el6.noarch.rpm
下载dejavu-lgc-sans-mono-fonts-2.33-1.el6.noarch传到服务器上
# rpm -ivh dejavu-lgc-sans-mono-fonts-2.33-1.el6.noarch
#yum install zabbix-server-mysql
#yum install zabbix-web-mysql
#cd /usr/share/doc/zabbix-server-mysql-3.0.4/
#zcat create.sql.gz | mysql -uroot -prootzabbix
# vi/etc/zabbix/zabbix_server.conf
LogFile=/var/log/zabbix/zabbix_server.log
LogFileSize=0
PidFile=/var/run/zabbix/zabbix_server.pid
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=root
StartTrappers=5
StartPingers=1
StartDiscoverers=1
SNMPTrapperFile=/var/log/snmptrap/snmptrap.log
HousekeepingFrequency=1
Timeout=4
AlertScriptsPath=/usr/lib/zabbix/alertscripts
ExternalScripts=/usr/lib/zabbix/externalscripts
LogSlowQueries=3000
#mkdir /var/www/html/zabbix
#cd /usr/share/zabbix/
#cp -a . /var/www/html/zabbix/
#chown -R apache:apache /var/www/html/zabbix
#chkconfig httpd on
#chkconfig mysqld on
#chkconfig zabbix-server on
#service zabbix-server start
五、登陆zabbix
http://IP/zabbix
ZABBIX3.0客户端的安装
# rpm -Uvhhttp://repo.zabbix.com/zabbix/3.0/rhel/6/x86_64/zabbix-release-3.0-1.el6.noarch.rpm
# yum install zabbix-agent
# vi /etc/zabbix/zabbix_agentd.conf
Server=Zabbix Server IP
ServerActive=Zabbix Server IP
Hostname=AgentName
# /etc/init.d/zabbix-agent start
#chkconfigzabbix-agent on