Nginx Autoinstaller is a ready made script to install a server with Nginx webserver, MySQL and PHP.
- How to install Nginx,MySQL,PHP using LNMP-Nginx Autoinstaller
- How to upgrade Nginx to latest version
LNMP Nginx autoinstall also provide script to upgrade php to latest version in the same way it provide for Nginx.
Procedure:
- Check latest version number of php from php.net
- We are going to use php5.3.x latest version which is 5.3.15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
root@venus:~/lnmp0.8-full# ./upgrade_php.sh ========================================================================= Upgrade PHP for LNMP, Written by Licess ========================================================================= LNMP is tool to auto-compile & install Nginx+MySQL+PHP on Linux For more information please visit http://www.lnmp.org/ ========================================================================= Current PHP Version:5.2.17 You can get version number from http://www.php.net/ (Please input PHP Version you want):5.3.15 ================================================== You want to upgrade php version to 5.3.15 ================================================== Press any key to start...or Press Ctrl+c to cancel ============================check files================================== Error: php-5.3.15.tar.gz not found!!!download now...... --2012-07-22 16:50:08-- http://us2.php.net/distributions/php-5.3.15.tar.gz Resolving us2.php.net... 64.71.164.5, 2001:470:0:b9::4047:a405 Connecting to us2.php.net|64.71.164.5|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 14806681 (14M) [application/x-gzip] Saving to: `php-5.3.15.tar.gz' 100%[===================================================================>] 14,806,681 5.08M/s in 2.8s 2012-07-22 16:50:11 (5.08 MB/s) - `php-5.3.15.tar.gz' saved [14806681/14806681] Download php-5.3.15.tar.gz successfully! autoconf-2.13.tar.gz [found] ============================check files================================== autoconf-2.13/ autoconf-2.13/ChangeLog autoconf-2.13/AUTHORS . . . |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
Build complete. Don't forget to run 'make test'. Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/ Modify php.ini...... Install ZendGuardLoader for PHP 5.3 --2012-07-22 16:55:19-- http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz Resolving downloads.zend.com... 174.35.52.139, 174.35.52.134 Connecting to downloads.zend.com|174.35.52.139|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 396699 (387K) [application/x-gzip] Saving to: `ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz' 100%[===================================================================>] 396,699 1.75M/s in 0.2s 2012-07-22 16:55:20 (1.75 MB/s) - `ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz' saved [396699/396699] ZendGuardLoader-php-5.3-linux-glibc23-i386/ ZendGuardLoader-php-5.3-linux-glibc23-i386/php-5.3.x/ ZendGuardLoader-php-5.3-linux-glibc23-i386/php-5.3.x/ZendGuardLoader.so ZendGuardLoader-php-5.3-linux-glibc23-i386/README.txt Write ZendGuardLoader to php.ini...... Creating new php-fpm configure file...... Copy php-fpm init.d file...... download new lnmp manager...... --2012-07-22 16:55:20-- http://soft.vpser.net/lnmp/ext/lnmp4php5.3 Resolving soft.vpser.net... 96.44.153.111 Connecting to soft.vpser.net|96.44.153.111|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 2609 (2.5K) [application/octet-stream] Saving to: `lnmp4php5.3' 100%[===================================================================>] 2,609 --.-K/s in 0s 2012-07-22 16:55:20 (283 MB/s) - `lnmp4php5.3' saved [2609/2609] Download new nginx init.d file...... --2012-07-22 16:55:20-- http://soft.vpser.net/lnmp/ext/init.d.nginx Resolving soft.vpser.net... 96.44.153.111 Connecting to soft.vpser.net|96.44.153.111|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1483 (1.4K) [application/octet-stream] Saving to: `init.d.nginx' 100%[===================================================================>] 1,483 --.-K/s in 0s 2012-07-22 16:55:20 (278 MB/s) - `init.d.nginx' saved [1483/1483] Remove old start files and Add new start file..... update-rc.d: using dependency based boot sequencing rm: cannot remove `/etc/init.d/nginx.sh': No such file or directory update-rc.d: using dependency based boot sequencing update-rc.d: using dependency based boot sequencing Starting php-fpm done ========================================================================= You have successfully upgrade from 5.2.17 to 5.3.15 ========================================================================= LNMP is tool to auto-compile & install Nginx+MySQL+PHP on Linux ========================================================================= For more information please visit http://www.lnmp.org/ ========================================================================= |
1 2 3 4 5 |
root@venus:~/lnmp0.8-full# php -v PHP 5.3.15 (cli) (built: Jul 22 2012 16:54:55) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies |
Comment Policy:
Your words are your own, so be nice and helpful if you can. Please, only use your real name, not your business name or keywords. Using business name or keywords instead of your real name will lead to the comment being deleted. Anonymous commenting is not allowed either. Limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.