Upgrade Zabbix2.2 to Zabbix3.0.2 in CentOS
Upgrade Zabbix2.2 to Zabbix3.0.2 in Linux.
1. Operating System Environment
[Root @ Server ~] # Cat/etc/issue
CentOS release 6.4 (Final)
Kernel \ r on an \ m
[Root @ Server ~] # Uname-r
2.6.32-358. el6.x86 _ 64
[Root @ Server ~] # Uname-m
X86_64
Backup ..
[Root @ Server ~] # Cp-a/usr/share/zabbix/tmp/zabbix. bak
You can also use the mysqldump command to back up the database.
[Root @ Server ~] # Cp/var/lib/mysql/tmp/mysql. bak
Back up the zabbix_server.conf File
[Root @ Server ~] # Cp/etc/zabbix/zabbix_server.conf/tmp/zabbix_server.conf.bak
2. Zabbix 3. x has a minimum PHP requirement of 5.4, while CentOS6 defaults to 5.3.3, which does not meet the requirements. Therefore, you need to use the third-party source to Upgrade PHP to over 5.4. Note that PHP7 is not supported.
3. Install the third-party php source and the corresponding php version
[Root @ Server ~] # Rpm-Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
Retrieving http://mirror.webtatic.com/yum/el6/latest.rpm
Warning:/var/tmp/rpm-tmp.E9X 3kG: Header V4 DSA/SHA1 Signature, key ID cf4c4ff9: NOKEY
Preparing... ######################################## ### [100%]
1: webtatic-release ##################################### ###### [100%]
Select php5.5 for installation.
[Root @ Server ~] # Yum install php55w. x86_64 php55w-cli.x86_64 php55w-common.x86_64 php55w-gd.x86_64 php55w-ldap.x86_64 php55w-mbstring.x86_64 php55w-mcrypt.x86_64 php55w-mysql.x86_64-y
View the installed php version
[Root @ Server ~] # Php-v
PHP 5.5.34 (cli) (built: Apr 2 2016 10:11:45)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
4. zabbix3.x requires curl, curl> = 7.20 (if SMTP authentication is required)
[Root @ Server ~] # Rpm-ivh http://mirror.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-1-13.rhel6.noarch.rpm
Retrieving http://mirror.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-1-13.rhel6.noarch.rpm
Warning:/var/tmp/rpm-tmp.Y3iyPw: Header V3 DSA/SHA1 Signature, key ID b56a8bac: NOKEY
Preparing... ######################################## ### [100%]
1: city-fan.org-release ####################################### #### [100%]
[Root @ Server ~] # Yum upgrade libcurl-y
View the curl version after installation
[Root @ Server ~] # Curl-V
Curl 7.48.0 (x86_64-RedHat-linux-gnu) libcurl/7.48.0 OpenSSL/1.0.1e zlib/1.2.3 c-ares/1.11.0 libidn/1.18 libssh2/1.7.0
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos spnego ntlm NTLM_WB SSL libz UnixSockets Metalink
Uninstall third-party sources. Uninstall the source without uninstalling it.
[Root @ Server ~] # Rpm e city-fan.org-release
Centos6 zabbix3.0 server is not officially provided. I am github of git clone itnihao...
[Root @ Server ~] # Git clone https://github.com/zabbixcn/zabbix3.0-rpm.git
Initialized empty Git repository in/root/zabbix3.0-rpm/. git/
Remote: Counting objects: 82, done.
Remote: Compressing objects: 100% (54/54), done.
Remote: Total 82 (delta 23), reused 82 (delta 23), pack-reused 0
Unpacking objects: 100% (82/82), done.
[Root @ Server ~] # Cd zabbix3.0-rpm/RPMS/
[Root @ Server RPMS] # ls
Zabbix-agent-3.0.0-1.el6.x86_64.rpm zabbix-proxy-sqlite3-3.0.0-1.el6.x86_64.rpm zabbix-web-japanese-3.0.0-1.el6.noarch.rpm
Zabbix-get-3.0.0-1.el6.x86_64.rpm zabbix-sender-3.0.0-1.el6.x86_64.rpm zabbix-web-mysql-3.0.0-1.el6.noarch.rpm
Zabbix-java-gateway-3.0.0-1.el6.x86_64.rpm zabbix-server-mysql-3.0.0-1.el6.x86_64.rpm zabbix-web-pgsql-3.0.0-1.el6.noarch.rpm
Zabbix-proxy-mysql-3.0.0-1.el6.x86_64.rpm zabbix-server-pgsql-3.0.0-1.el6.x86_64.rpm
Zabbix-proxy-pgsql-3.0.0-1.el6.x86_64.rpm zabbix-web-3.0.0-1.el6.noarch.rpm
[Root @ Server RPMS] # rpm-ivh http://repo.webtatic.com/yum/el6/latest.rpm
Retrieving http://repo.webtatic.com/yum/el6/latest.rpm
Preparing... ######################################## ### [100%]
Package webtatic-release-6-6.noarch is already installed
5. Install zabbix web and mysql
[Root @ Server RPMS] # pwd
/Root/zabbix3.0-rpm/RPMS
[Root @ Server RPMS] # yum install zabbix-web-mysql-3.0.0-1.el6.noarch.rpm zabbix-web-3.0.0-1.el6.noarch.rpm-y
If the problem of... Error Summary occurs during yum installation, uninstall zabbix.
[Root @ Server RPMS] # yum remove zabbix22-y
[Root @ Server RPMS] # yum install zabbix-server-mysql-3.0.0-1.el6.x86_64.rpm-y
6. Start the service
[Root @ Server RPMS] #/etc/init. d/httpd restart
Stopping httpd: [OK]
Starting httpd: [OK]
[Root @ Server RPMS] #/etc/init. d/mysqld start
Starting mysqld: [OK]
When zabbix-server is started, the following error occurs: cannot open "/var/log/zabbixsrv/zabbix_server.log": [13] Permission denied
[Root @ Server web] #/etc/init. d/zabbix-server restart
Shutting down Zabbix server: [FAILED]
Starting Zabbix server: [OK]
[Root @ Server web] # zabbix_server [2285]: cannot open "/var/log/zabbixsrv/zabbix_server.log": [13] Permission denied
Solution:
12345 [root @ Server zabbixsrv] # touch/var/log/zabbixsrv/zabbix_server.log
[Root @ Server zabbixsrv] # chown zabbix zabbix_server.log
[Root @ Server zabbixsrv] #/etc/init. d/zabbix-server restart
Shutting down Zabbix server: [FAILED]
Starting Zabbix server: [OK]
Pid Problems
[Root @ Server zabbixsrv] # tail-f zabbix_server.log
Zabbix_server [2368]: cannot create PID file [/var/run/zabbixsrv/zabbix_server.pid]: [2] No such file or directory
Create the corresponding directory and permissions, and then restart the service.
[Root @ Server zabbixsrv] # mkdir/var/run/zabbixsrv/
[Root @ Server zabbixsrv] # chown zabbix/var/run/zabbixsrv/-R
[Root @ Server zabbixsrv] #/etc/init. d/zabbix-server restart
Shutting down Zabbix server: [FAILED]
Starting Zabbix server: [OK]
7. Replace date. timezone with Shanghai. The operation is as follows:
[Root @ Server ~] # Cd/etc/httpd/conf. d/
[Root @ Server conf. d] # ls
Php. conf README welcome. conf zabbix. conf
[Root @ Server conf. d] # cp zabbix. conf zabbix. conf. bak
[Root @ Server conf. d] # sed-I "s @ # php_value date. timezone Europe/Riga @ php_value date. timezone Asia/Shanghai @ g "/etc/httpd/conf. d/zabbix. conf
Restart the httpd service.
[Root @ Server conf. d] #/etc/init. d/httpd restart
Stopping httpd: [FAILED]
Starting httpd: [OK]
8. Install agent3.0
[Root @ Server RPMS] # pwd
/Root/zabbix3.0-rpm/RPMS
[Root @ Server RPMS] # ls
Zabbix-agent-3.0.0-1.el6.x86_64.rpm zabbix-proxy-sqlite3-3.0.0-1.el6.x86_64.rpm zabbix-web-japanese-3.0.0-1.el6.noarch.rpm
Zabbix-get-3.0.0-1.el6.x86_64.rpm zabbix-sender-3.0.0-1.el6.x86_64.rpm zabbix-web-mysql-3.0.0-1.el6.noarch.rpm
Zabbix-java-gateway-3.0.0-1.el6.x86_64.rpm zabbix-server-mysql-3.0.0-1.el6.x86_64.rpm zabbix-web-pgsql-3.0.0-1.el6.noarch.rpm
Zabbix-proxy-mysql-3.0.0-1.el6.x86_64.rpm zabbix-server-pgsql-3.0.0-1.el6.x86_64.rpm
Zabbix-proxy-pgsql-3.0.0-1.el6.x86_64.rpm zabbix-web-3.0.0-1.el6.noarch.rpm
Install a zabbix-agent3.0 version. You can also install yum install *. rpm to install all of them as needed.
[Root @ serverrpms] # yum install zabbix-agent-3.0.0-1.el6.x86_64.rpm
View the version of zabbix-agent after installation
[Root @ Server zabbix] # zabbix_agentd-V
Zabbix_agentd (daemon) (Zabbix) 3.0.0
Revision 58460 15 February 2016, compilation time: Feb 17 2016 09:55:34
Modify the zabbix_agentd.conf file to connect to the zabbix-server IP address and restart the service.
[Root @ Server zabbix] #/etc/init. d/zabbix-agent restart
Shutting down Zabbix agent: [FAILED]
Starting Zabbix agent: [OK]
9. log on to the browser to view
Some Zabbix Tutorials:
Compile and install Zabbix2.4.5 source code in Ubuntu 14.04
Install and deploy the distributed monitoring system Zabbix 2.06
Install and deploy the distributed monitoring system Zabbix 2.06
Install and deploy Zabbix in CentOS 6.3
Zabbix distributed monitoring system practice
Under CentOS 6.3, Zabbix monitors apache server-status
Monitoring MySQL database Parameters Using Zabbix in CentOS 6.3
Install Zabbix 2.0.6 in 64-bit CentOS 6.2
ZABBIX details: click here
ZABBIX: click here
This article permanently updates the link address: