网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

如何安装php(centos8)-创新互联

这篇文章主要介绍如何安装php(centos8),文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

主要从事网页设计、PC网站建设(电脑版网站建设)、wap网站建设(手机版网站建设)、成都响应式网站建设公司、程序开发、微网站、小程序开发等,凭借多年来在互联网的打拼,我们在互联网网站建设行业积累了丰富的成都网站设计、网站制作、外贸营销网站建设、网络营销经验,集策划、开发、设计、营销、管理等多方位专业化运作于一体,具备承接不同规模与类型的建设项目的能力。

                                                     

快如闪电的安装php(centos8)

本文只考虑centos8

remi是一个php安装仓库。是rpm包。

用了国内镜像会速度极快,下载包的速度:3MB/秒,惊人的快!

无论docker还是centos环境都非常的快!!


首先,安装阿里的 centos 仓库。

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.reporm -f  /etc/yum.repos.d/CentOS-centosplus.reporm -f  /etc/yum.repos.d/CentOS-PowerTools.reporm -f  /etc/yum.repos.d/CentOS-Extras.reporm -f  /etc/yum.repos.d/CentOS-AppStream.repo
dnf makecache
dnf repolist

安装阿里的 epel 仓库。

dnf install -y epel-releasesed -i 's|^#baseurl=https://download.fedoraproject.org/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*
dnf makecache
dnf repolist

安装阿里的 remi 的仓库

dnf install -y https://mirrors.aliyun.com/remi/enterprise/remi-release-8.rpmsed -i  's/https*:\/\/rpms.remirepo.net/https:\/\/mirrors.aliyun.com\/remi/g'  /etc/yum.repos.d/remi*sed -i 's/#baseurl/baseurl/g' /etc/yum.repos.d/remi*

快如闪电的最关键是下一句,清除镜像列表!!否则又去读取国外的镜像了。

sed -i 's|^mirrorlist|#mirrorlist|' /etc/yum.repos.d/remi*

dnf makecache
dnf repolist

安装 php

dnf install -y yum-utils

dnf install -y php74 php74-php-devel  php74-php-fpm  php74-php-mbstring php74-php-memcache php74-php-memcached php74-php-redis  php74-php-mysqlnd  php74-php-pdo  php74-php-bcmath php74-php-xml php74-php-gd php74-php-gmp php74-php-igbinary php74-php-imagick   php74-php-mcrypt  php74-php-pdo_mysql php74-php-posix php74-php-simplexml  php74-php-opcache php74-php-xsl php74-php-xmlwriter php74-php-xmlreader php74-php-swoole php74-php-zip php74-php-phalcon  php74-php-yaml php74-php-yar php74-php-yaf php74-php-uuid

体验到快如闪电的速度了吧!


最后安装阿里的 composer 镜像源

ln -s /usr/bin/php74 /usr/bin/phpcurl -o /usr/local/bin/composer https://mirrors.aliyun.com/composer/composer.pharchmod +x /usr/local/bin/composer

注意观察,确认安装成功,且大版本是2.0

composer -V

立刻设置composer 的镜像源为阿里

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

安装 nginx

cat>/etc/yum.repos.d/nginx.repo<

以上是如何安装php(centos8)的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注创新互联行业资讯频道!


新闻标题:如何安装php(centos8)-创新互联
转载源于:http://bjjierui.cn/article/gosop.html

其他资讯