2019独角兽企业重金招聘Python工程师标准>>>
-------------------------------------------php7.0安装教程---------------------------------------------
yum配置
执行命令下载、安装yum源,当前是针对Centos6并且64位版本的源:
[root@iZwz90n2ws2p2jsauv7uk9Z ~]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm [root@iZwz90n2ws2p2jsauv7uk9Z ~]# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
编辑[remi.repo]下的enabled选项从0设为1
[root@iZwz90n2ws2p2jsauv7uk9Z ~]# sed -i '/enabled/s/=0/=1/g' /etc/yum.repos.d/remi.repo
运行如下命令
[root@iZwz90n2ws2p2jsauv7uk9Z ~]# yum clean all [root@iZwz90n2ws2p2jsauv7uk9Z ~]# yum makecache
查看yum上php版本
[root@iZwz90n2ws2p2jsauv7uk9Z ~]# yum list php* |grep php-devel
php70-php-devel.x86_64 7.0.21~RC1-1.el6.remi @remi-test
php-devel.x86_64 5.6.30-2.el6.remi remi-test
php54-php-devel.x86_64 5.4.45-13.el6.remi remi
php55-php-devel.x86_64 5.5.38-7.el6.remi remi
php56-php-devel.x86_64 5.6.30-2.el6.remi remi-test
php71-php-devel.x86_64 7.1.7~RC1-1.el6.remi remi-test
php72-php-devel.x86_64 7.2.0-0.9.alpha2.el6.remi
安装程序(自己可以选择适合的模块)
[root@iZwz90n2ws2p2jsauv7uk9Z ~]# yum install php70 php70-php-devel php70-php-mysql* php70-php-gd php70-php-fpm php70-php-mbstring
启动程序
[root@iZwz90n2ws2p2jsauv7uk9Z ~]# /etc/init.d/php70-php-fpm start
查看运行状态:看到如下表示启动成功
[root@iZwz90n2ws2p2jsauv7uk9Z ~]# ps-ef|grep php
root 19193 1 0 16:49 ? 00:00:00 php-fpm: master process (/etc/opt/remi/php70/php-fpm.conf)
apache 19194 19193 0 16:49 ? 00:00:00 php-fpm: pool www
apache 19196 19193 0 16:49 ? 00:00:00 php-fpm: pool www
apache 19197 19193 0 16:49 ? 00:00:00 php-fpm: pool www
apache 19198 19193 0 16:49 ? 00:00:00 php-fpm: pool www
apache 19199 19193 0 16:49 ? 00:00:00 php-fpm: pool www
apache 19213 19193 0 16:51 ? 00:00:00 php-fpm: pool www
apache 19214 19193 0 16:51 ? 00:00:00 php-fpm: pool www
root 19289 18873 0 17:41 pts/1 00:00:00 grep php