CentOS6 Yum upgrade zabbix2.2/2.4 to Zabbix3.0

Source: Internet
Author: User
Tags php session

This article is intended for upgrading to zabbix3.0 under CentOS6 zabbix2.2 and later.

Environmental Requirements for zabbix3.0:

Software Version Comments
Mysql 5.0.3 or later
Apache 1.3.12 or later
Php 5.4.0 or later PHP V7 is not supported yet.
Libcurl For SMTP authentication, version 7.20.0 or higher is required.

Because the CentOS6 default PHP and Libcurl versions do not meet the requirements, third-party yum source upgrades are required.

Pre-upgrade version:

    • PHP 5.3.3

    • Curl 7.19.7

    • Zabbix Server v2.2.10

    • Zabbix Agent (daemon) v2.2.10

Post-upgrade version:

    • PHP 5.6.18

    • Curl 7.47.1

    • Zabbix_server (Zabbix) 3.0.0

    • Zabbix_agentd (daemon) (Zabbix) 3.0.0

0. Pre-Upgrade Preparation

1) Install Yum multi-threaded download plugin axelget to increase download speed

: http://down.51cto.com/data/2183091

RPM-IVH HTTP://PKGS.REPOFORGE.ORG/AXEL/AXEL-2.4-1.EL6.RF.X86_64.RPMCP AXELGET.CONF/ETC/YUM/PLUGINCONF.D/CP axelget.py/usr/lib/yum-plugins/

The network bandwidth has a large impact on Yum and can be tried a few more times if the network times out during Yum execution.

2) Stop the service

# Stop Zabbix server and Agent service Zabbix-server StopService zabbix-agent stop# stop Nginx and PHP-FPM (LNMP) service Nginx StopService php-fpm stop# Stop Apache (LAMP) service httpd stop

3) backing up the Zabbix database

# database Zabbix, user name Zabbixmysqldump--opt-r-uzabbix-p Zabbix--ignore-table=zabbix.history--ignore-table=zabbix.history _log--ignore-table=zabbix.history_str--ignore-table=zabbix.history_text--ignore-table=zabbix.history_uint-- Ignore-table=zabbix.trends--ignore-table=zabbix.trends_uint | gzip > zabbix_ ' date + '%y%m%d%h%m%s '. sql.gz

The backup command ignores the history related table and trends related tables, and the backup file uses gzip compression.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7B/67/wKiom1bNIcrg7PAFAABFpicr1qs094.png "title=" Mysqldump.png "alt=" Wkiom1bnicrg7pafaabfpicr1qs094.png "/>

1. Upgrade PHP to 5.6

# install Epel yum source rpm-uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm# install php5.6 yum source RPM-UVH https://mirror.webtatic.com/yum/el6/latest.rpm# upgrade PHP version to 5.6yum install Yum-plugin-replace-yyum replace Php-common-- Replace-with=php56w-common-y

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7B/67/wKiom1bNI5CSx6iHAACf3Iscc5A950.png "title=" Php.png "alt=" Wkiom1bni5csx6ihaacf3iscc5a950.png "/>

# Verify PHP version php-vphp-fpm-v

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7B/66/wKioL1bNJCSQ2Ox2AAAqTwpUDMA407.png "title=" php- V.png "alt=" Wkiol1bnjcsq2ox2aaaqtwpudma407.png "/>

Zabbix Official documentation requirements: If PHP version >=5.6.0 to set php.ini always_populate_raw_post_data =-1.

2. Upgrade Libcurl to 7.47

# Install the new Libcurl yum source Rpm-ivh http://mirror.city-fan.org/ftp/contrib/yum-repo/ city-fan.org-release-1-13.rhel6.noarch.rpm# upgrade Libcurl to 7.47yum upgrade libcurl# after the upgrade is complete, you can uninstall this yum source Rpm-e City-fan.org-release

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7B/67/wKiom1bNJnXTx9ZTAABPKPL3VQY898.png "title=" Curl.png "alt=" Wkiom1bnjnxtx9ztaabpkpl3vqy898.png "/>

# Verify Curl Version Curl-v

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7B/66/wKioL1bNJPOSxY-SAAArKGFXcMM192.png "title=" curl- V.png "alt=" Wkiol1bnjposxy-saaarkgfxcmm192.png "/>

3. Upgrade Zabbix Server to 3.0

#  upgrade CENTOS6 official Yum source (official Yum source does not provide Zabbix version of CentOS6 Server) rpm -uvh  http://repo.zabbix.com/zabbix/3.0/rhel/6/x86_64/ zabbix-release-3.0-1.el6.noarch.rpm#  Download Itnihao packaged CentOS6 version of the zabbix3.0 rpm package, thanks Itnihao dedication mkdir / datacd /datayum install git createrepo -ygit clone https://github.com/ zabbixcn/zabbix3.0-rpm.git#  creating zabbix3.0 local Yum Source createrepo /data/zabbix3.0-rpm/rpmscat > / etc/yum.repos.d/zabbix3.0.repo <<  ' EOF ' [zabbix3.0]name=zabbix3.0 itnihaobaseurl=file:/// data/zabbix3.0-rpm/rpmsenabled=0gpgcheck=0eof#  Rebuilding the Yum cache yum cleanallyum makecache#  Yum Upgrade zabbix3.0 Related services (note: To disable Epel sources) yum --disablerepo=epel --enablerepo=zabbix3.0 upgrade  Zabbix-server-mysql zabbix-agent zabbix-get zabbix-sender 

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7B/66/wKioL1bNKRODJkpOAABQO1TJ7tk702.png "title=" Zabbix.png "alt=" Wkiol1bnkrodjkpoaabqo1tj7tk702.png "/>

# Check Zabbix server and agent version zabbix_server_mysql-vzabbix_agentd-v when the upgrade is complete

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7B/66/wKioL1bNKWGCH8PEAABJiwdAkGU714.png "title=" Zabbix -v.png "alt=" Wkiol1bnkwgch8peaabjiwdakgu714.png "/>

# start Zabbix-server and zabbix-agentservice zabbix-server start service zabbix-agent start# join boot up chkconfig zabbix-server Onchkconfig zabbix-agent on

upgrading to zabbix3.0 zabbix2.2 and above does not require additional database upgrade scripts. version 3.0 Zabbix-server will automatically upgrade the database after the start, in the log to see the progress of the upgrade:

# Zabbix-server after startup, observe Zabbix-server's log Tailf-100/var/log/zabbix/zabbix_server.log

4. Upgrading Zabbix Web

Below is a breakdown of Nginx and Apache upgrade:

1) Nginx

# Download Zabbix 3.0 source Package wget http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.0.0/ Zabbix-3.0.0.tar.gz-o zabbix-3.0.0.tar.gz# extract php source files to Zabbix web directory/data/www/zabbix3.0tar xvzf zabbix-3.0.0.tar.gz Mkdir-p/data/www/zabbix3.0\cp-r zabbix-3.0.0/frontends/php/*/data/www/zabbix3.0# Set the permissions for the Web directory (my nginx startup user is Nginx) chown-r Nginx. /data/wwwchmod 755/data

Update the Zabbix Web root directory in the Nginx configuration file:

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7B/68/wKiom1bNOOaB_IxPAAA85kUyLz8956.png "title=" Nginx Conf.png "alt=" Wkiom1bnooab_ixpaaa85kuylz8956.png "/>

# start Php-fpmservice php-fpm start# start nginxnginx-t && service Nginx start# join boot up chkconfig php-fpm onchkconfig ngin X on

Finally, access to the Zabbix Web for configuration, the configuration process is simply not elaborate.

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7B/67/wKioL1bNOgXD6zUFAABfHh4zH4g140.png "title=" Start.png "alt=" Wkiol1bnogxd6zufaabfhh4zh4g140.png "/>

Click Next to "Next step" no response to the solution is as follows:

# If your nginx startup user is Nginx, run the following command to modify the PHP session file directory permissions: Setfacl-r-M u:nginx:rwx/var/lib/php

2) Apache

# Yum Update Zabbix Web (upgrade by following command) Yum--disablerepo=epel--enablerepo=zabbix3.0 install httpd php56w zabbix-web-mysql Zabbix-websed-i "[Email protected]# php_value date.timezone europe/[email protected]_value date.timezone Asia/[email Protected] "/etc/httpd/conf.d/zabbix.conf# start apache/etc/init.d/httpd restart# join boot start chkconfig httpd on

This is the end of all upgrades.


This article is from the "Start Linux blog" blog, make sure to keep this source http://qicheng0211.blog.51cto.com/3958621/1744603

CentOS6 Yum upgrade zabbix2.2/2.4 to Zabbix3.0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.