`
pcajax
  • 浏览: 2106869 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

闲来无事,就把lnmp的php升级到php-5.2.17最新稳定版本

阅读更多
本教程主要是对安装了lnmp一键安装包的用户,从php-5.2.16升级到php-5.2.17最新稳定版本." O# O2 ~$ \1 @# p% T4 F
①准备工作, 需要下载php-5.2.17.tar.gz , suhosin-patch-5.2.17-0.9.7.patch.gz ,php-5.2.17-fpm-0.5.14.diff.gz
②登陆你的SSH,d( M+ T  }: ?9 [  c
  cd lnmp0.5
  1. wget http://cn2.php.net/get/php-5.2.17.tar.gz/from/cn.php.net/mirror

  1. wget http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz[url=http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz

  1. wget  https://api.opensuse.org/public/source/home:Taylor925:branches:home:Taylor925:branches:home:csbuild:Apache/php5/suhosin-patch-5.2.17-0.9.7.patch.gz
y

c
注意如果以上文件无法在ssh中下载,建议下载到本地后通过Winscp上传. 之后在编译安装升级.1 |8 o( W+ j3 t) k6 i" ^+ q

③解压缩下载的文件.% s& U- a" \( c- W+ g& {2 ]4 B2 Z
  
  1. tar zxvf php-5.2.17.tar.gd
7 A/ Z4 |+ V/ ~% M' z
  
  1. gzip -d ./suhosin-patch-5.2.17-0.9.7.patch.gz

  
  1. gzip -cd php-5.2.17-fpm-0.5.14.diff.gz | patch -d php-5.2.17 -p1
% T# Q: y+ {9 b, E- z* E
  
  1. cd php-5.2.17/
4 b1 L! d7 N8 ~! Y
  
  1. patch -p 1 -i ../suhosin-patch-5.2.16-0.9.7.patch

④开始编译安装:9 K8 [" e; D: \8 Z, {) t
  1. ./buildconf --force


  1. ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql  --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --enable-discard-path --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-mime-magic --enable-suhosin

w1 K) n+ n% K
  1. make install
8 L* J2 Y: `/ K
) l9 G( b3 A* Z% A
不出意外,便安装成功.4 ]' m: b, A1 C: ?
⑤查看下探针发现php-5.2.17就成功了。^
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics