linux 7.2升级7.3

原文地址: https://www.jianshu.com/p/6a4492a9cd03

检查 PHP 版本

php -v

安装 Remi 和 EPEL 数据源

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

rpm -Uvh https://rpms.remirepo.net/enterprise/remi-release-7.rpm

检查 Remi 是否启用

vim /etc/yum.repos.d/remi.repo

查看 [remi] 区域的代码块是否启用,相同则不用更改:

[remi]

name=Remi's RPM repository for Enterprise Linux 7 - $basearch

#baseurl=http://rpms.remirepo.net/enterprise/7/remi/$basearch/

#mirrorlist=https://rpms.remirepo.net/enterprise/7/remi/httpsmirror

mirrorlist=http://cdn.remirepo.net/enterprise/7/remi/mirror

enabled=0

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi 

检查 Remi PHP7.3 是否启用:

vi /etc/yum.repos.d/remi-php73.repo

查看[remi-php73] 区域的代码块是否启用,相同则不用更改:

[remi-php73]

name=Remi's PHP 7.3 RPM repository for Enterprise Linux 7 - $basearch

#baseurl=http://rpms.remirepo.net/enterprise/7/php73/$basearch/

mirrorlist=https://rpms.remirepo.net/enterprise/7/php73/httpsmirror

mirrorlist=http://cdn.remirepo.net/enterprise/7/php73/mirror

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi  

开始平滑升级 PHP 7.2 到 PHP 7.3

yum -y upgrade php*

等待升级,输出下面内容表示升级完成

*

*

*

Replaced:

  mod_php72w.x86_64 0:7.2.24-1.w7

  php72w-cli.x86_64 0:7.2.24-1.w7

  php72w-common.x86_64 0:7.2.24-1.w7

  php72w-devel.x86_64 0:7.2.24-1.w7

  php72w-embedded.x86_64 0:7.2.24-1.w7

  php72w-fpm.x86_64 0:7.2.24-1.w7

  php72w-gd.x86_64 0:7.2.24-1.w7

  php72w-mbstring.x86_64 0:7.2.24-1.w7

  php72w-mysqlnd.x86_64 0:7.2.24-1.w7

  php72w-opcache.x86_64 0:7.2.24-1.w7

  php72w-pdo.x86_64 0:7.2.24-1.w7

  php72w-pear.noarch 1:1.10.4-1.w7

  php72w-pecl-igbinary.x86_64 0:2.0.5-1.w7

  php72w-pecl-memcached.x86_64 0:3.0.4-1.w7

  php72w-process.x86_64 0:7.2.24-1.w7

  php72w-xml.x86_64 0:7.2.24-1.w7

Complete!

重启 PHP

systemctl restart php-fpm

至此平滑升级成功。



作者:中v中
链接:https://www.jianshu.com/p/6a4492a9cd03
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
posted @ 2022-11-09 10:24  迷失在路上  阅读(32)  评论(0编辑  收藏  举报