服務器用的是lnmp一鍵安裝包,可是php版本是5.5。項目用的是TP5.1須要php5.6的環境。php
好慌!linux
進入lnmp安裝環境nginx
./upgrade.sh php
而後輸入php版本號redis
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 ======
升級完成,服務恢復正常,當心髒終於穩定了。composer
=======
後續 ,而後並無那麼順利,項目布上去以後報錯。莫名其妙。
後來又將php.ini進行了配置。
安裝了redis的支持。
將nginx進行了些許配置。
最終才正常。php-fpm
更改環境真是讓人崩潰,由於不知道是否能搞定它!!!安裝環境就不同了,安裝後,不成功,大不了重裝。ui