手机php版本升级,升级php版本步骤

升级php的版本,从5.2升级到5.6,并且安装yaf框架,操作配置如下:

0. ###备份模块列表:

cd /home/hejp/tools

php -m >php_m.txt

1. ###下载remi包###安装remi包

rpm -ivh remi-release-7.rpm

rpm -ivh epel-release-7-5.noarch.rpm

rpm -qa|grep remi-release

rpm -qa|grep epel-release

wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-

5.noarch.rpm

2. ###安装remi包

rpm -ivh remi-release-7.rpm

rpm -ivh epel-release-7-5.noarch.rpm

rpm -qa|grep remi-release

rpm -qa|grep epel-release

3. ###使用Remi repo

vim /etc/yum.repos.d/remi.repo

[remi]

name=Les RPM de remi pour Enterprise Linux 6 - $basearch

#baseurl=http://rpms.famillecollet.com/enterprise/6/remi/$basearch/

mirrorlist=http://rpms.famillecollet.com/enterprise/6/remi/mirror

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

[remi-php5.6]

name=Les RPM de remi de PHP 5.5 pour Enterprise Linux 6 - $basearch

#baseurl=http://rpms.famillecollet.com/enterprise/6/php55/$basearch/

mirrorlist=http://rpms.famillecollet.com/enterprise/6/php55/mirror

# WARNING: If you enable this repository, you must also enable "remi"

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

#把enabled设为1.使之起作用。 注意:如果想吧PHP5.4升级为PHP5.5,则把

[remi-php55]的enabled设置为1

4. ###停止相关服务

systemctl stop nginx

ps -ef|grep nginx

systemctl stop php-fpm

ps -ef|grep php-fpm

5. ###更新

yum update -y

yum update php

#这个时候会提醒更新php到5.6 通过以下命令查看是否完成升级

6. ###检查版本

php -v

7. ###然后启动服务

systemctl start nginx

systemctl start php-fpm

8. ####安装yaf框架:

wget https://pecl.php.net/get/yaf-2.3.5.tgz

tar zxvf yaf-2.3.5.tgz

cd yaf-2.3.5/

/usr/bin/phpize

./configure --with-php-config=/usr/bin/php-config

make

make install

9. ###检查模块:

php -m

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值