• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

centos8安装php7.4

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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是否安装成功


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
php解析文本文件呈现在表格上发布时间:2022-07-10
下一篇:
关于NGINX下开启PHP-FPM输出PHP错误日志的设置(已解决)发布时间:2022-07-10
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap