yum命令安装php7和相关扩展

前端之家收集整理的这篇文章主要介绍了yum命令安装php7和相关扩展前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

安装PHP7和相关扩展

Nginx.org/packages/centos/6/noarch/RPMS/Nginx-release-centos-6-0.el6.ngx.noarch.rpm (Nginx) rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

1.cd /etc/yum.repos.d

2.nano remi.repo

>>> [remi-PHP55] name=Remi's PHP 5.5 RPM repository for Enterprise Linux 6 - $basearch #baseurl=http://rpms.remirepo.net/enterprise/6/PHP55/$basearch/ mirrorlist=http://rpms.remirepo.net/enterprise/6/PHP55/mirror # NOTICE: common dependencies are in "remi-safe" enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi >>>>>

将enabled设置为0;

3.nano remi.repo

>> [remi-PHP70] name=Remi's PHP 7.0 RPM repository for Enterprise Linux 6 - $basearch #baseurl=http://rpms.remirepo.net/enterprise/6/PHP70/$basearch/ mirrorlist=http://rpms.remirepo.net/enterprise/6/PHP70/mirror enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi >>>>>

将enabled设置为1;

4.安装扩展:

PHP-solr PHP-opcache PHP-seasLog PHP-MysqLnd PHP-hprose PHP-mbstring PHP-mcrypt PHP-mongodb PHP-MysqLi PHP-gd PHP-dom PHP-apc PHP-memcache PHP-redis

service PHP-fpm restart && service Nginx restart

原文链接:https://www.f2er.com/php/19449.html

猜你在找的PHP相关文章