zoukankan      html  css  js  c++  java
  • 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是否安装成功

  • 相关阅读:
    什么是聚集索引,什么是非聚集索引,什么又是主键?
    给.net添加MultiPage、TabStrip、Toolbar、treeView,treeview等控件
    一个洗牌程序算法,随机交换位置【经典】
    overload和override都叫重载,都在什么情况下用阿?
    补间形状和补间动画
    电子时钟
    绘图板
    查询XML数据
    纯代码生成按钮
    小球滚动,方块上移
  • 原文地址:https://www.cnblogs.com/mayg/p/13932360.html
Copyright © 2011-2022 走看看