您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
免费发信息
三六零分类信息网 > 六盘水分类信息网,免费分类信息发布

最快速度安装php(centos8)!

2024/5/10 10:32:27发布48次查看
推荐:《php视频教程》
快如闪电的安装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.repodnf makecachednf 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 makecachednf 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 makecachednf repolist
安装 phpdnf install -y yum-utilsdnf 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/
安装 nginxcat>/etc/yum.repos.d/nginx.repo< 以上就是最快速度安装php(centos8)!的详细内容。
六盘水分类信息网,免费分类信息发布

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录