ZABBIX3.0服務(wù)端的安裝
一匿刮、關(guān)閉防火墻和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]
都回復(fù)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傳到服務(wù)器上
# 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
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