lnmp升级php

引言

服务器用的是lnmp一键安装包,但是php版本是5.5。项目用的是TP5.1需要php5.6的环境。

好慌!

进行升级操作

进入lnmp安装环境

./upgrade.sh php

然后输入php版本号

5.6.39

然后程序就可以下载升级了,等待了将近5分钟的时间,我的内心是煎熬的,因为这个是线上的服务器,出错了,是要掉脑袋的。

Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
Installing PHP CLI binary:        /usr/local/php/bin/
Installing PHP CLI man page:      /usr/local/php/php/man/man1/
Installing PHP FPM binary:        /usr/local/php/sbin/
Installing PHP FPM config:        /usr/local/php/etc/
Installing PHP FPM man page:      /usr/local/php/php/man/man8/
Installing PHP FPM status page:   /usr/local/php/php/php/fpm/
Installing PHP CGI binary:        /usr/local/php/bin/
Installing PHP CGI man page:      /usr/local/php/php/man/man1/
Installing build environment:     /usr/local/php/lib/php/build/
Installing header files:           /usr/local/php/include/php/
Installing helper programs:       /usr/local/php/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/php/lib/php/
[PEAR] Archive_Tar    - installed: 1.4.3
[PEAR] Console_Getopt - installed: 1.4.1
[PEAR] Structures_Graph- installed: 1.1.1
[PEAR] XML_Util       - installed: 1.4.2
[PEAR] PEAR           - installed: 1.10.5
Warning! a PEAR user config file already exists from a previous PEAR installation at '/root/.pearrc'. You may probably want to remove it.
Wrote PEAR system config file at: /usr/local/php/etc/pear.conf
You may want to add: /usr/local/php/lib/php to your php.ini include_path
/root/lnmp1.3-full/src/php-5.6.39/build/shtool install -c ext/phar/phar.phar /usr/local/php/bin
ln -s -f phar.phar /usr/local/php/bin/phar
Installing PDO headers:           /usr/local/php/include/php/ext/pdo/
Copy new php configure file.
Modify php.ini......
config-set succeeded
config-set succeeded
All settings correct for using Composer
Downloading...

Composer (version 1.8.0) successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer

Install ZendGuardLoader for PHP 5.6...
zend-loader-php5.6-linux-x86_64.tar.gz [found]
Write ZendGuardLoader to php.ini......
Download Opcache Control Panel...
Creating new php-fpm configure file......
Copy php-fpm init.d file......
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://lnmp.org              |
+-------------------------------------------+
Starting LNMP...
Starting nginx...  done
Starting MySQL.                                            [确定]
Starting php-fpm  done
======== upgrade php completed ======

升级完成,服务恢复正常,小心脏终于稳定了。

=======
后续 ,然后并没有那么顺利,项目布上去之后报错。莫名其妙。
后来又将php.ini进行了配置。
安装了redis的支持。
将nginx进行了些许配置。
最终才正常。

更改环境真是让人崩溃,因为不知道是否能搞定它!!!安装环境就不一样了,安装后,不成功,大不了重装。

posted @ 2018-12-24 11:52  TBHacker  阅读(1100)  评论(0编辑  收藏  举报