Board logo

标题: [分享] wdcp升级PHP到5.6.9(图文) [打印本页]

作者: 23360598    时间: 2016-3-17 17:46     标题: wdcp升级PHP到5.6.9(图文)

刚搭建环境, 就截图分享下,适合新手.
我在腾讯云的原贴 http://bbs.qcloud.com/thread-12768-1-1.html
希望大家支持腾讯云.
当前环境:
      系统版本: centos 6.5 64位
      wdcp版本: wdcp_v2.5.15

开始,就两步:
   1,执行:  wget http://92lp-10003241.file.myqcloud.com/php_up569.sh  (如果失效就下载帖子下面的附件)
   2,执行: sh php_up569.sh
0.png
2.png
3.png

看到上图的version is 5.6.9 说明升级成功了.

php_up569.rar (1.44 KB)

图片附件: 0.png (2016-3-17 17:44, 56.37 KB) / 下载次数 10327
http://wdlinux.cn/bbs/attachment.php?aid=5816&k=8498ac2fe46dc4d8c74a46ad92d8326c&t=1714324253&sid=tRM2Z9



图片附件: 2.png (2016-3-17 17:44, 52.04 KB) / 下载次数 10381
http://wdlinux.cn/bbs/attachment.php?aid=5817&k=99cfc0b9a2e3e2281ac8813595b193cb&t=1714324253&sid=tRM2Z9



图片附件: 3.png (2016-3-17 17:44, 65.97 KB) / 下载次数 10324
http://wdlinux.cn/bbs/attachment.php?aid=5818&k=b768bf9ebdb4b43287270e1a3024bbd3&t=1714324253&sid=tRM2Z9



附件: php_up569.rar (2016-3-17 17:44, 1.44 KB) / 下载次数 153
http://wdlinux.cn/bbs/attachment.php?aid=5819&k=6084cf37f265f2dd793f03282eea7377&t=1714324253&sid=tRM2Z9
作者: yuefujun    时间: 2016-4-3 14:04

回复 1# 23360598


    呵呵怎么上传
作者: heimao2001    时间: 2016-8-30 10:44

谁升级过 ?会不会把原先的网站数据清空?或者打不开原先的网站啊 ?
作者: 272794389    时间: 2016-9-1 09:27

回复 3# heimao2001


   对啊,升级了以后网站能够正常打开,但是点击网站列表什么打得没有内容了
作者: douyaolai    时间: 2016-9-14 16:57

V3版本,PHP5.3升级为5.6成功,感谢楼主!
作者: shenqi    时间: 2016-9-15 01:55

试了下竟然失败了:Q
作者: yongzhi    时间: 2016-11-8 22:39

:)下不了没有金币:'(
作者: yongzhi    时间: 2016-11-8 22:41

有金币了,谢谢楼主
作者: 563594008    时间: 2016-12-7 13:01

谢谢楼主分享!
作者: cbin    时间: 2016-12-10 14:54

这些脚本升级的。。。会不会出问题啊
作者: 1314pc    时间: 2016-12-17 04:26

需要金币中。。。需要金币中。。。需要金币中。。。需要金币中。。。
作者: jackeylee    时间: 2016-12-23 15:03

没有金币,下载不了
作者: hackyy    时间: 2016-12-29 01:47

看看呢!!!!!!
作者: 张扬自主    时间: 2016-12-29 11:56

看看呢。。。。。。。。。。
作者: 不忘初心    时间: 2017-1-19 16:53

厉害啊,大神很吊
作者: 563594008    时间: 2017-1-21 16:28

感谢分享,正好需要!
作者: 82178630@qq.com    时间: 2017-1-22 00:09

没金币了,试试看
作者: hwwdn    时间: 2017-1-22 10:47

升级时间好像挺长的呢。
作者: 向上的葱子    时间: 2017-1-23 10:34

非常感谢楼主分享给我们
作者: shuref    时间: 2017-3-4 20:57

链接失效了,弄个ftp好点
作者: i65u    时间: 2017-3-6 13:52

看到上图的version is 5.6.9 说明升级成功了
作者: redapples    时间: 2017-3-10 14:30

:)我试试,有用再来回复
作者: mmkk    时间: 2017-3-13 00:53

没有金币啊
作者: hehesunemp    时间: 2017-3-15 20:37

需要金币所以回复需要金币所以回复需要金币所以回复需要金币所以回复
作者: xutingzhang    时间: 2017-3-18 10:04

嘎嘎嘎嘎嘎嘎嘎嘎嘎
作者: hkernet    时间: 2017-4-21 00:37

对不起,您的金币不足(小于 0 )。
作者: sewth    时间: 2017-4-29 18:57

厉害啊,大神很吊
作者: bnmsc    时间: 2017-5-7 06:25

怎么弄啊,纯小白不会啊
作者: haojielyb    时间: 2017-6-30 21:24

赞  就是原链接不能下载了
作者: haojielyb    时间: 2017-6-30 21:58

贴上了源码 大家自己 复制大sh 里吧  

  1. #!/bin/bash
  2. # PHP 5.6.9 update scripts

  3. if [ ! $1 ];then
  4.         Ver=5.6.9
  5. else
  6.         Ver=$1
  7. fi

  8. Debugfile=20121212

  9. echo "THANK YOU FOR USING UPDATE SCRIPT"
  10. echo "YOU ARE GOING TO UPDATE YOUR PHP TO ${Ver}"
  11. echo "YOU CAN JUST HAVE A REST"
  12. echo "IT MAY TAKE A LOT OF TIME"
  13. echo
  14. #read -p "PRESS ENTER IF YOU REALLY WANT TO UPDATE"
  15. read -p "DO YOU REALLY WANT TO UPDATE? (Y/N)" yn
  16. if [ "$yn" == "Y" ] || [ "$yn" == "y" ]; then
  17.         echo "PHP IS NOW UPDATING!"
  18. else
  19.         exit
  20. fi
  21. echo
  22. echo "-------------------------------------------------------------"
  23. echo

  24. ###yum
  25. yum install -y libmcrypt-devel libjpeg-devel libpng-devel freetype-devel curl-devel openssl-devel libxml2-devel zip unzip

  26. ###
  27. if [ ! -f php-${Ver}.tar.gz ];then
  28.         wget -c http://us1.php.net/distributions/php-${Ver}.tar.gz
  29. fi
  30. if [ ! -f iconv_ins.sh ];then
  31.         wget -c http://down.wdlinux.cn/in/iconv_ins.sh
  32.         sh iconv_ins.sh
  33. fi

  34. ###
  35. if [ -f /www/wdlinux/mysql/lib/libmysqlclient.so.18 ];then
  36.         if [ -d /usr/lib64 ];then
  37.                 LIBNCU="/usr/lib64"
  38.         else
  39.                 LIBNCU="/usr/lib"
  40.         fi
  41.         ln -sf /www/wdlinux/mysql/lib/libmysqlclient.so.18 $LIBNCU
  42. fi

  43. tar zxvf php-${Ver}.tar.gz
  44. cd php-${Ver}
  45. if [ -d /www/wdlinux/apache_php ];then
  46. echo "START CONFIGURING PHP ON NGINX"
  47. sleep 3
  48. make clean
  49.         ./configure --prefix=/www/wdlinux/apache_php-${Ver} --with-config-file-path=/www/wdlinux/apache_php-${Ver}/etc --with-iconv=/usr --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt=/usr --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-ftp --enable-sockets --enable-zip --with-apxs2=/www/wdlinux/apache/bin/apxs --with-mysqli=/www/wdlinux/mysql/bin/mysql_config --with-pdo-mysql=/www/wdlinux/mysql --enable-opcache --enable-bcmath --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd
  50. [ $? != 0 ] && echo "NO! CONFIGURE ERROR! TRY AGAIN OR ASK IN THE BBS! :(" && exit
  51. echo "START MAKE"
  52. sleep 3
  53. make
  54. [ $? != 0 ] && echo "NO! MAKE ERROR! TRY AGAIN OR ASK IN THE BBS! :(" && exit
  55. echo "START MAKE INSTALL"
  56. sleep 3
  57. make install
  58. [ $? != 0 ] && echo "NO! MAKE INSTALL ERROR! TRY AGAIN OR ASK IN THE BBS! :(" && exit
  59. cp php.ini-production /www/wdlinux/apache_php-${Ver}/etc/php.ini
  60. sed -i 's/short_open_tag = Off/short_open_tag = On/g' /www/wdlinux/apache_php-${Ver}/etc/php.ini
  61. rm -f /www/wdlinux/apache_php
  62. ln -sf /www/wdlinux/apache_php-${Ver} /www/wdlinux/apache_php
  63. if [ ! -d /www/wdlinux/apache_php-${Ver}/lib/php/extensions ];then
  64.         mkdir -p /www/wdlinux/apache_php-${Ver}/lib/php/extensions/no-debug-zts-${Debugfile}
  65.         ln -sf /www/wdlinux/apache_php-${Ver}/lib/php/extensions/no-debug-zts-${Debugfile} /www/wdlinux/apache_php-${Ver}/lib/php/extensions/no-debug-non-zts-${Debugfile}
  66. fi
  67. service httpd restart
  68. fi

  69. if [ -d /www/wdlinux/nginx_php ];then
  70. echo "START CONFIGURING PHP ON APACHE"
  71. sleep 3
  72. make clean
  73.         ./configure --prefix=/www/wdlinux/nginx_php-${Ver} --with-config-file-path=/www/wdlinux/nginx_php-${Ver}/etc --with-iconv=/usr --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt=/usr --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-ftp --enable-sockets --enable-zip --enable-fpm --with-mysqli=/www/wdlinux/mysql/bin/mysql_config --with-pdo-mysql=/www/wdlinux/mysql --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd
  74. [ $? != 0 ] && echo "NO! CONFIGURE ERROR! TRY AGAIN OR ASK IN THE BBS! :(" && exit
  75. echo "START MAKE"
  76. sleep 3
  77. make
  78. [ $? != 0 ] && echo "NO! MAKE ERROR! TRY AGAIN OR ASK IN THE BBS! :(" && exit
  79. echo "START MAKE INSTALL"
  80. sleep 3
  81. make install
  82. [ $? != 0 ] && echo "NO! MAKE INSTALL ERROR! TRY AGAIN OR ASK IN THE BBS! :(" && exit
  83. cp php.ini-production /www/wdlinux/nginx_php-${Ver}/etc/php.ini
  84. sed -i 's/short_open_tag = Off/short_open_tag = On/g' /www/wdlinux/nginx_php-${Ver}/etc/php.ini
  85. service php-fpm stop
  86. rm -f /www/wdlinux/nginx_php
  87. ln -sf /www/wdlinux/nginx_php-${Ver} /www/wdlinux/nginx_php
  88. cp /www/wdlinux/nginx_php-${Ver}/etc/php-fpm.conf.default /www/wdlinux/nginx_php-${Ver}/etc/php-fpm.conf
  89. sed -i 's/user = nobody/user = www/g' /www/wdlinux/nginx_php/etc/php-fpm.conf
  90. sed -i 's/group = nobody/group = www/g' /www/wdlinux/nginx_php/etc/php-fpm.conf
  91. sed -i 's/;pid =/pid =/g' /www/wdlinux/nginx_php/etc/php-fpm.conf
  92. cp -f sapi/fpm/init.d.php-fpm /www/wdlinux/init.d/php-fpm
  93. chmod 755 /www/wdlinux/init.d/php-fpm
  94. if [ ! -d /www/wdlinux/nginx_php-${Ver}/lib/php/extensions ];then
  95.         mkdir -p /www/wdlinux/nginx_php-${Ver}/lib/php/extensions/no-debug-zts-${Debugfile}
  96.         ln -sf /www/wdlinux/nginx_php-${Ver}/lib/php/extensions/no-debug-zts-${Debugfile} /www/wdlinux/nginx_php-${Ver}/lib/php/extensions/no-debug-non-zts-${Debugfile}
  97. fi
  98. fi
  99. cd ..
  100. rm -rf php-${Ver}/
  101. rm -rf php-${Ver}.tar.gz
  102. rm -rf iconv_ins.sh
  103. echo
  104. echo "------------------------------------------------------"
  105. echo "PHP UPDATE FINISH! :D"
  106. echo "NOW YOUR PHP VERSION IS ${Ver}!"
  107. echo "THANK YOU FOR USING"
  108. echo
  109. echo "WDCP (C) COPYRIGHT"
  110. echo
  111. echo "PS: I THINK YOU NEED RESTART SERVER AFTER UPDATE."
  112. echo
复制代码

作者: igpp    时间: 2017-8-28 23:35

很好的东东..
作者: xhc1014    时间: 2017-10-11 13:21

回复 5# douyaolai

请教下 怎么操作呢
作者: fenge1314    时间: 2017-10-28 21:23

谁升级过 ?会不会把原先的网站数据清空?或者打不开原先的网站啊 ?
作者: laneclip    时间: 2017-11-20 14:58

需要金币中。。。需要金币中。。。需要金币中。。。需要金币中。。。
作者: jenfy    时间: 2017-11-27 17:24

准备试试,发现没金币,WRNMMP!
作者: j8hacker    时间: 2017-11-28 15:58

us1无法解析啊
作者: benjaminlixi    时间: 2017-11-30 23:37

asfwget http://92lp-10003241.file.myqcloud.com/php_up569.sh
作者: pashioner    时间: 2017-12-4 14:13

这样有金币吗
作者: pashioner    时间: 2017-12-4 15:11

哥,你好,请问升级php到5.6之前需要关闭服务器吗,升级完之后需要重启服务器吗?
作者: 1913938233    时间: 2018-3-31 11:04

试试看,感谢大神奉献
作者: spbynla    时间: 2018-5-29 16:59

有金币了,谢谢楼主
作者: cheanshun    时间: 2018-7-6 21:41

没金币!!!!!!!!!!!!
作者: shanda    时间: 2018-10-30 13:10

呵呵怎么上传
作者: supershh    时间: 2019-1-8 15:19

厉害啊,大神很吊
作者: xdc300    时间: 2019-3-11 15:45

怎么拿金币
作者: laq199321    时间: 2019-8-23 10:12

回复 1# 23360598


    这些脚本升级的。。。会不会出问题啊
作者: xiaoke7788    时间: 2019-10-12 02:13

不知道这个能不能用
作者: mirror    时间: 2023-11-15 17:04

金币怎么弄




欢迎光临 WDlinux官方论坛 (http://wdlinux.cn/bbs/) Powered by Discuz! 7.2