推荐:《PHP视频教程》
快如闪电的安装PHP(centos8)本文只考虑centos8
remi是一个PHP安装仓库。是rpm包。
用了国内镜像会速度极快,下载包的速度:3MB/秒,惊人的快!
无论docker还是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|^@R_419_6135@link|#@R_419_6135@link|' /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安装 PHP
dnf 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
体验到快如闪电的速度了吧!
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<<EOF[Nginx-stable]name=Nginx stable repobaseurl=http://Nginx.org/packages/centos/$releasever/$basearch/gpgcheck=1enabled=1gpgkey=https://Nginx.org/keys/Nginx_signing.keymodule_hotfixes=trueEOFdnf install -y NginxNginx -vsystemctl enable Nginx总结
以上是内存溢出为你收集整理的最快速度安装php(centos8)!<span class="header-link octicon octicon-link"></span>快如闪电的安装php(centos8)全部内容,希望文章能够帮你解决最快速度安装php(centos8)!<span class="header-link octicon octicon-link"></span>快如闪电的安装php(centos8)所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)