对服务器进行php的版本升级
2016-05-27 23:37
791 查看
刚刚对公司的服务器进行php的版本升级,没出问题,从5.2升级到5.6,并且安装yaf框架,把步骤贴出来分享一下,具体操作配置如下:###下载remi包
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###安装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###使用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-php56]
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
###停止相关服务
systemctl stop nginx
ps -ef|grep nginx
systemctl stop php-fpm
ps -ef|grep php-fpm
###更新
yum update -y
yum update php
#这个时候会提醒更新php到5.6 通过以下命令查看是否完成升级###检查版本
php -v
###然后启动服务
systemctl start nginx
systemctl start php-fpm
####安装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###检查
php -m
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###安装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###使用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-php56]
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
###停止相关服务
systemctl stop nginx
ps -ef|grep nginx
systemctl stop php-fpm
ps -ef|grep php-fpm
###更新
yum update -y
yum update php
#这个时候会提醒更新php到5.6 通过以下命令查看是否完成升级###检查版本
php -v
###然后启动服务
systemctl start nginx
systemctl start php-fpm
####安装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###检查
php -m
相关文章推荐
- 一个关于if else容易迷惑的问题
- 升级fedora16beta遇到的问题
- PHP5.2.*防止Hash冲突拒绝服务攻击的Patch
- 深入理解PHP之匿名函数
- JSP/PHP基于Ajax的分页功能实现
- 关于PHP通过PDO用中文条件查询MySQL的问题。
- 什么是设计模式
- PHP数据库长连接mysql_pconnect的细节
- 一行命令轻松升级 Ubuntu
- Php Installing An Expansion
- 初级:如何在终端及图形界面中更新 Ubuntu
- 公司的网络为何如此缓慢
- rem : web app适配的秘密武器
- php7 读取php.ini[4]
- 路由器版本与密码恢复
- 交换机升级排障实例
- 主控端与受控端升级的常见问题
- PHP+Apache在Windows 9x下的安装和配置
- IIS 6 的 PHP 最佳配置方法