Upgrade zabbix 2.4.7 to 3.2.4

Source: Internet
Author: User
Tags gpg php session

Upgrade zabbix 2.4.7 to 3.2.4
Upgrade zabbix 2.4.7 to the 3.2.4 Environment

System: centos7.2zabbix: 2.4.7, repo database installed from epel: mysqlzabbix repo: zabbix official repo
Stop zabbix
[root@ops01 ~]# systemctl stop zabbix-server[root@ops01 ~]# systemctl stop zabbix-java-gateway[root@ops01 ~]# systemctl stop zabbix-agent
Back up the zabbix configuration file
cd /etc/zabbixfor i in `ls -al *.conf |awk '{print $9}'` ;do cp $i $i`date +%Y%m%d` ;done
Back up all/etc/zabbix
[root@ops01 zabbix]# cd /etc[root@ops01 etc]# cp -r zabbix zabbix.20170328
Back up zabbix web
Cd/usr/share ### web ui parent directory cp-r zabbix zabbix.2.4.7
Stop mysql
[root@ops01 ~]# systemctl stop mysql
Back up mysql
cp -r mysql mysql.20170328
Install zabbix repo Library
[Root @ ops01 ~] # Rpm-ivh Authorization Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY preparation... ################################# [100%] upgrading/installing... 1: zabbix-release-3.2-1.el7 ################################# [100%]
Upgrade command and Process
[Root @ ops01 etc] # yum -- disablerepo = * -- enablerepo = zabbix install zabbix-server zabbix-agent zabbix-java-gateway loaded plug-in: fastestmirror, langpacksLoading mirror speeds from cached hostfile is working on dependencies --> checking transactions ---> Software Package zabbix. x86_64.0.2.4.7-1.el7 will be replaced ---> package zabbix-agent.x86_64.0.2.4.7-1.el7 will be upgraded ---> package zabbix-agent.x86_64.0.3.2.4-2.el7 will be dropped ---> package zabbix-java-gateway.x86_64.0.2.4.7-1.el7 will be upgraded ---> package zabbix-java-gateway.x86_64.0.3.2.4-2.el7 will be dropped ---> package zabbix-server.x86_64.0.2.4.7-1.el7 will be replaced ---> The software package zabbix-server-mysql.x86_64.0.2.4.7-1.el7 will be upgraded ---> the software package zabbix-server-mysql.x86_64.0.3.2.4-2.el7 will be discarded --> resolve dependencies to complete dependency resolution ================== ========================================================== ========================================================== ========================================================== ========================================================== =============== Package architecture version source size ============================== ========================================================== ========================================================== ========================================================== ========================================================== ========== installing: zabbix-agent x86_64 3.2.4-2. replace zabbix with el7 zabbix 342 k. x86_64 2.4.7-1. el7 zabbix-java-gateway x86_64 3.2.4-2. replace zabbix with el7 zabbix 717 k. x86_64 2.4.7-1. el7 zabbix-server-mysql x86_64 3.2.4-2. replace zabbix with el7 zabbix 1.8 M. x86_64 2.4.7-1. el7 replacement zabbix-server.x86_64 2.4.7-1. el7 transaction summary ================================================= ========================================================== ========================================================== ========================================================== ====================================================== install 3 Software Package total downloads: 2.8 MIs this OK [y/d/N]: yDownloading packages: Warning:/var/cache/yum/x86_64/7/zabbix/packages/zabbix-agent-3.2.4-2.el7.x86_64.rpm: header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY] 189 kB/s | 441 kB 00:00:12 ETAzabbix-agent-3.2.4-2.el7.x86_64.rpm Public Key not installed (1/3): zabbix-agent-3.2.4-2.el7.x86_64.rpm | 342 kB 00:00:01 (2/3 ): zabbix-java-gateway-3.2.4-2.el7.x86_64.rpm | 717 kB 00:00:02 (3/3): zabbix-server-mysql-3.2.4-2.el7.x86_64.rpm | 1.8 MB 00:00:03 bytes ------------------------------------------------------------------ total 497 kB/s | 2.8 MB 00:00:05 from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591 Retrieve key import GPG key 0xA14FE591: User ID: "Zabbix LLC
 
  
"Fingerprint: a184 8f53 52d0 22b9 471d 83d0 082a b56b a14f e591 software package: zabbix-release-3.2-1.el7.noarch (installed) from:/etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591 continue? [Y/N]: Running transaction checkRunning transaction testTransaction test succeededRunning transaction warning: the RPM database has been modified by a non-yum program. ** If seven existing RPM database problems are found, the 'yum check' output is as follows: the centos-release-7-2.1511.el7.centos.2.10.x86_64 is the centos-release-7-0.1406.el7.centos.2.3.x86_64 of the copy filesystem-3.2-20.el7.x86_64 is the filesystem-3.2-18.el7.x86_64 of the copy of the langtable-0.0.31-3.el7.noarch is the langtable-0.0.13-4.el7.noarch of the copy of the langtable-data-0.0.31-3.el7.noarch is the langtable-data-0.0.13-4.el7.noarch. 0.13-4. the copy linux-firmware-20150904-43.git6ebf5d5.el7.noarch of el7.noarch is the copy linux-firmware-20140213-0.3.git4164c23.el7.noarch of the setup-2.8.71-6.el7.noarch which is being installed: setup-2.8.71-4.el7.noarch 1/8 warning:/etc/zabbix/zabbix_java_gateway.conf created as/etc/zabbix/zabbix_java_gateway.conf.rpmnew is installing: zabbix-agent-3.2.4-2.el7.x86_64 2/8 warning:/etc/zabbix _ Agentd. conf created as/etc/zabbix/composer is installing: zabbix-server-mysql-3.2.4-2.el7.x86_64 3/8 warning:/etc/zabbix/zabbix_server.conf created as/etc/zabbix/zabbix_server.conf.rpmnew cleanup: zabbix-java-gateway-2.4.7-1.el7.x86_64 4/8 is deleting: zabbix-server-2.4.7-1.el7.x86_64 5/8 cleanup: zabbix-server-mysql-2.4.7-1.el7.x86_64 6/8 cleanup: zabbix-agent-2.4.7-1.el7.x86_64 7/8 removing: zabbix-2.4.7-1.el7. X86_64 8/8 verification in: zabbix-server-mysql-3.2.4-2.el7.x86_64 1/8 verification in: zabbix-agent-3.2.4-2.el7.x86_64 2/8 verification in: zabbix-java-gateway-3.2.4-2.el7.x86_64 3/8 verification in: zabbix-java-gateway-2.4.7-1.el7.x86_64 4/8 verification in: zabbix-agent-2.4.7-1.el7.x86_64 5/8 verification in: zabbix-2.4.7-1.el7.x86_64 6/8 verification in: zabbix-server-mysql-2.4.7-1.el7.x86_64 7/8 verification in: zabbix-server-2.4.7-1.el7.x86_64 8/8 installed: zabbix-agent.x86_64 0: 3. 2.4-2. el7 Zabbix-java-gateway.x86_64 0: 3. 2.4-2. el7 zabbix-server-mysql.x86_64 0: 3. 2.4-2. el7 substitution: zabbix. x86_64 0: 2. 4.7-1. el7 zabbix-server.x86_64 0: 2. 4.7-1. el7 finished!
 
Parameter description
### When there are many repositories, yum will update the repository first, relatively time-consuming -- disablerepo = * ### disable all warehouses first -- enablerepo = zabbix ### only zabbix warehouses are allowed
Source of zabbix repository name
# Two repository names are available: zabbix and zabbix-non-supportedcat/etc/yum. repos. d/zabbix. repo [zabbix] name = Zabbix Official Repository-$ basearchbaseurl = http://repo.zabbix.com/zabbix/3.2/rhel/7/$basearch/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591[zabbix-non-supported]name=Zabbix Official Repository non-supported-$ basearchbaseurl = bytes
Upgrade web
[Root @ ops01 share] # yum -- enablerepo = zabbix upgrade zabbix-web-mysql ...... transaction summary =================================================== ========================================================== ========================================================== ========================================================== ==================================== install (1 dependent Software Package) upgrade 2 software packages (+ 10 dependent software packages) total downloads: 11 MIs this OK [y/d/N]: yDownloading packages: No Presto metadata available for zabb IxNo Presto metadata available for OS ...... (13/13): zabbix-web-3.2.4-2.el7.noarch.rpm | 3.6 MB 00:00:08 bytes total 1.2 MB/s | 11 MB 00: 00: 09 Running transaction checkRunning transaction testTransaction test succeededRun Ning transaction... updated: zabbix-web.noarch 0: 3. 2.4-2. el7 zabbix-web-mysql.noarch 0: 3. 2.4-2. el7 finished!
Restore the configuration file

Omitted

Restart mysql, zabbix-server java-gateway
[root@ops01 zabbix]# systemctl start mysql[root@ops01 zabbix]# systemctl start zabbix-server[root@ops01 zabbix]# systemctl start zabbix-java-gateway
Zabbix-web faults 3.2.4 new web configuration files, nginx or apache, etc. need to have permissions
[root@ops01 include]# rpm -ql zabbix-web |more/etc/httpd/conf.d/zabbix.conf/etc/zabbix/web/etc/zabbix/web/maintenance.inc.php/etc/zabbix/web/zabbix.conf.php......
This example uses nginx
chown   -R nginx /etc/zabbix/zabbix
Php session permission failure
chmod +x /var/lib/php/session/chmod g+x,u+x /var/lib/php/session/
Summary
Zabbix official repo. By default, the web uses apapche users and groups as the owner and group. Therefore, the owner and group of related files are apache. In this example, nginx is used, nginx users do not have the permission to access the above two directories and files. After the nginx user is changed to the owner

Related Article

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.