• centos8安装php7.4


    1,配置CentOs8的yum源

    vim /etc/yum.repos.d/CentOS-AppStream.repo

    [AppStream]

    name=CentOS-$releasever - AppStream

    baseurl=http://mirrors.aliyun.com/centos/$releasever/AppStream/$basearch/os/

    gpgcheck=1

    enabled=1

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

    vim /etc/yum.repos.d/CentOS-Base.repo

    [BaseOS]

    name=CentOS-$releasever - Base

    baseurl=http://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/

    gpgcheck=1

    enabled=1

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

    vim /etc/yum.repos.d/CentOS-Epel.repo

    [epel]

    name=CentOS-$releasever - Epel

    baseurl=http://mirrors.aliyun.com/epel/8/Everything/$basearch

    enabled=1

    gpgcheck=1

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

    2,yum源配置成功后

    yum clean all  #命令清除yum缓存元数据

    3,yum makecache   #重新建立yum缓存

    4,安装epel存储库

    sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

    5,确认epel库是否安装成功

    rpm -qa | grep epel

    6,安装remi存储库

    dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm

    7,确认remi存储库是否安装成功

    8,成功添加EPEL和Remi存储库后,执行以下命令以获取可用PHP模块流的列表

    dnf module list php

    9,dnf module reset php   #重置php模块

    10,根据第八步中的php流模块,启用对应php版本的流模块,这里我们安装的是php7.4的版本,所以启用remi-7.4版本的流

    dnf module enable php:remi-7.4   

    11,安装PHP,此命令还安装许多其他软件包

    dnf install php php-cli php-common

    12,查看php是否安装成功

  • 相关阅读:
    python之路---类
    python之路---走台阶(递归)
    python之路---递归函数
    python之路---filter、map、lambda函数
    python之路---封装
    python07--抽象数据类型和python类(P34)
    python06--计算机内存结构与存储管理(P27)
    匹配算法大纲
    并查集及其优化
    Hash技术初涉
  • 原文地址:https://www.cnblogs.com/mayg/p/13932360.html
Copyright © 2020-2023  润新知