yum命令安装php7和相关扩展
程序员文章站
2024-02-23 09:25:52
安装php7和相关扩展
rpm -uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-rel...
安装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
上一篇: JNI语言基本知识
下一篇: PHP中Array相关函数简介