zoukankan      html  css  js  c++  java
  • CENTOS 7平滑升级PHP到最新版7.3

    安装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(基本不需要调整)

    vi /etc/yum.repos.d/remi.repo
    [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数据源(主要调整位置:enabled=1)

    vi /etc/yum.repos.d/remi-php73.repo
    [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到php7.3

    yum -y upgrade php*

    检查php版本

    php -v

    PHP 7.3.23 (cli) (built: Sep 29 2020 08:33:03) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.23, Copyright (c) 1998-2018 Zend Technologies

    重启php-fpm

    systemctl restart php-fpm

    转载自:https://blog.csdn.net/baidu_35297131/article/details/89960654

  • 相关阅读:
    day02-xml
    day01-java重点复习
    RPM包和YUM仓库管理
    Nginx的下载与安装
    yum源本地部署完后网络部署报错
    RAID和LVM
    磁盘管理
    xargs详解
    locate及find查找命令
    linux的进程和管道符(二)
  • 原文地址:https://www.cnblogs.com/l-zl/p/13804549.html
Copyright © 2011-2022 走看看