linux 编译php5.5,Linux平滑编译升级php5.5至5.6

今天想写自动化测试项目时,安装phpunit 时提示 需要安装php5.6 版本以上。

服务器类型 CentOS 6.5

目前php5.5 要升级到php5.6

首先 连上服务器  先把PHP-fpm服务关闭(其实不影响的,因为程序在内存里面跑 不关也没事的)然后 先把 /apps/svr/php 重命名 以防止如果新版本更新失败 回滚

mv /apps/svr/php   /apps/svr/php5.5

让后再/usr/local/src/下

wget  http://www.php.net/distributions/php-5.6.27.tar.gz

tar -zxvf  php-5.6.27.tar.gz

因为是升级 所以 php很多依赖包我都已经装过了  先贴上我的 configure 配置参数

./configure --prefix=/apps/svr/php --with-config-file-path=/apps/svr/php/etc --with-mysql=/apps/svr/mysql --with-mysqli=/apps/svr/mysql/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock --with-pdo-mysql=/apps/svr/mysql --with-gd --with-png-dir=/apps/lib/libpng --with-jpeg-dir=/apps/lib/jpeg --with-freetype-dir=/apps/lib/freetype --with-xpm-dir=/usr/  --with-zlib-dir=/apps/lib/zlib --with-t1lib=/apps/lib/t1lib --with-iconv --enable-libxml --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-opcache --enable-mbregex --enable-fpm --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-session --with-mcrypt --with-curl --enable-ctype

make

make install  接下来的步骤跟安装php5.5 一样。

memcache 版本不支持

找到对应的版本

0818b9ca8b590ca3270a3433284dd417.png

0818b9ca8b590ca3270a3433284dd417.png

找到linux 版本下载安装

tar -zxvf memcache-3.0.8.tgz

cd memcache-3.0.8

/apps/svr/php/bin/phpize

./configure --enable-memcache --with-php-config=/usr/local/php/bin/php-config --with-zlib-dir

make

make install

成功

redis 也找到对应的版本下载安装即可

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值