程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> PHP編程 >> PHP綜合 >> yum命令安裝php7和相關擴展

yum命令安裝php7和相關擴展

編輯:PHP綜合

安裝php7和相關擴展

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm 
rpm -ivh http://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.安裝擴展:

yum install 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

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved