I have been planning to move my websites from apache web server to nginx since nginx is much faster then apache. I found Nginx Autoinstaller which is a script available to make a nginx based server within few minutes.
Nginx Autoinstaller includes:-
- Nginx
- MySQL
- PHP
- PHPMyAdmin
- Zend Optimizer
- eAccelerator
- Apache (optional)
- ionCube (optional)
- PureFTPd (optional)
- imageMagick (optional)
- memcached (optional)
LNMP installer is available for CentOS, Ubuntu, and Debian.
Setup:
We are going to use LNMP on Debian 6.2 OpenVZ vps by semoweb, for which I have already posted review and Benchmark.
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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
root@venus:~# wget -c http://soft.vpser.net/lnmp/lnmp0.8-full.tar.gz --2012-07-21 23:45:43-- http://soft.vpser.net/lnmp/lnmp0.8-full.tar.gz 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: 84138666 (80M) [application/octet-stream] Saving to: `lnmp0.8-full.tar.gz' 100%[===================================================================>] 84,138,666 3.20M/s in 26s 2012-07-21 23:46:10 (3.10 MB/s) - `lnmp0.8-full.tar.gz' saved [84138666/84138666] root@venus:~# tar zxvf lnmp0.8-full.tar.gz lnmp0.8-full/ lnmp0.8-full/apache.sh lnmp0.8-full/autoconf-2.13.tar.gz lnmp0.8-full/centos.sh lnmp0.8-full/ChangeLog lnmp0.8-full/conf/ lnmp0.8-full/conf/config.inc.php lnmp0.8-full/conf/dabr.conf lnmp0.8-full/conf/discuz.conf lnmp0.8-full/conf/discuzx.conf lnmp0.8-full/conf/fcgi.conf lnmp0.8-full/conf/httpd-default.conf lnmp0.8-full/conf/httpd-mpm.conf lnmp0.8-full/conf/httpd-vhosts.conf lnmp0.8-full/conf/httpd.conf lnmp0.8-full/conf/index.html lnmp0.8-full/conf/memcached-init lnmp0.8-full/conf/memcached.php lnmp0.8-full/conf/nginx.conf lnmp0.8-full/conf/nginx_a.conf lnmp0.8-full/conf/none.conf lnmp0.8-full/conf/php-fpm.conf lnmp0.8-full/conf/proxy.conf lnmp0.8-full/conf/pure-ftpd.conf lnmp0.8-full/conf/pureftpd-mysql.conf lnmp0.8-full/conf/rpaf.conf lnmp0.8-full/conf/sablog.conf lnmp0.8-full/conf/script.mysql lnmp0.8-full/conf/typecho.conf lnmp0.8-full/conf/vsftpd.conf lnmp0.8-full/conf/wordpress.conf lnmp0.8-full/conf/wp2.conf lnmp0.8-full/debian.sh lnmp0.8-full/eaccelerator-0.9.5.3.tar.bz2 lnmp0.8-full/eaccelerator-0.9.6.1.tar.bz2 lnmp0.8-full/eaccelerator.sh lnmp0.8-full/httpd-2.2.17.tar.gz lnmp0.8-full/ImageMagick-6.7.1-6.tar.gz lnmp0.8-full/imageMagick.sh lnmp0.8-full/imagick-3.0.1.tgz lnmp0.8-full/init.d.nginx lnmp0.8-full/init.d.php-fpm5.2 lnmp0.8-full/ionCube.sh lnmp0.8-full/ioncube_loaders_lin_x86-64.tar.gz lnmp0.8-full/ioncube_loaders_lin_x86.tar.gz lnmp0.8-full/libiconv-1.13.1.tar.gz lnmp0.8-full/libmcrypt-2.5.8.tar.gz lnmp0.8-full/lnmp lnmp0.8-full/lnmpa lnmp0.8-full/mcrypt-2.6.8.tar.gz lnmp0.8-full/memcache-3.0.6.tgz lnmp0.8-full/memcached.sh lnmp0.8-full/mhash-0.9.9.9.tar.gz lnmp0.8-full/mysql-5.1.60.tar.gz lnmp0.8-full/nginx-1.0.10.tar.gz lnmp0.8-full/p.tar.gz lnmp0.8-full/pcre-8.12.tar.gz lnmp0.8-full/PDO_MYSQL-1.0.2.tgz lnmp0.8-full/php-5.2.17-fpm-0.5.14.diff.gz lnmp0.8-full/php-5.2.17.tar.gz lnmp0.8-full/phpmyadmin-latest.tar.gz lnmp0.8-full/pure-ftpd-1.0.35.tar.gz lnmp0.8-full/pureftpd lnmp0.8-full/pureftpd.sh lnmp0.8-full/readme lnmp0.8-full/ubuntu.sh lnmp0.8-full/uninstall.sh lnmp0.8-full/upgrade_lnmpa_php.sh lnmp0.8-full/upgrade_nginx.sh lnmp0.8-full/upgrade_php.sh lnmp0.8-full/User_manager_for-PureFTPd_v2.1_CN.zip lnmp0.8-full/vhost.sh lnmp0.8-full/vhost_lnmpa.sh lnmp0.8-full/vsftpd-2.2.2.tar.gz lnmp0.8-full/vsftpd.sh lnmp0.8-full/ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz lnmp0.8-full/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz lnmp0.8-full/ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz lnmp0.8-full/ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz root@venus:~# cd lnmp0.8-full / root@venus:~/lnmp0.8-full# sh debian.sh ========================================================================= LNMP V0.8 for Debian VPS , Written by Licess ========================================================================= A tool to auto-compile & install Nginx+MySQL+PHP on Linux For more information please visit http://www.lnmp.org/ ========================================================================= Please input domain: (Default domain: www.lnmp.org):venus.test.com =========================== domain=venus.test.com =========================== Where are your servers located? asia,america,europe,oceania or africa (Default area: america): =========================== area=america =========================== Please input the root password of mysql: (Default password: root):***** =========================== mysqlrootpwd=****** =========================== Press any key to start... dpkg: warning: ignoring request to remove libmysqlclient15off which isn't installed. dpkg: warning: ignoring request to remove libmysqlclient15-dev which isn't installed. dpkg: warning: ignoring request to remove mysql-common which isn't installed. rc apache2-doc 2.2.16-6+squeeze3 Apache HTTP Server documentation rc apache2.2-common 2.2.16-6+squeeze3 Apache HTTP Server common files |
After a long installation logs, it ends. It took several minutes to complete but no so long.
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 |
update-rc.d: using dependency based boot sequencing update-rc.d: using dependency based boot sequencing update-rc.d: using dependency based boot sequencing Starting MySQL. Starting php_fpm done Starting nginx daemon: nginx. ===================================== Check install =================================== /usr/local/nginx [found] /usr/local/php [found] /usr/local/mysql [found] ========================== Check install ================================ Install LNMP V0.8 completed! enjoy it. ========================================================================= LNMP V0.8 for Debian VPS , Written by Licess ========================================================================= For more information please visit http://www.lnmp.org/ lnmp status manage: /root/lnmp {start|stop|reload|restart|kill|status} default mysql root password:**** phpinfo : http://venus.test.com/phpinfo.php phpMyAdmin : http://venus.test.com/phpmyadmin/ Prober : http://venus.test.com/p.php The path of some dirs: mysql dir: /usr/local/mysql php dir: /usr/local/php nginx dir: /usr/local/nginx web dir : /home/wwwroot ========================================================================= ========================================================================= Manager for LNMP V0.8 , Written by Licess ========================================================================= LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux This script is a tool to Manage status of lnmp For more information please visit http://www.lnmp.org Usage: /root/lnmp {start|stop|reload|restart|kill|status} ========================================================================= Nginx is runing! php-fpm is runing! MySQL running (30458). Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:587 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN tcp6 0 0 :::22 :::* LISTEN |
And we have a ready server to host any php/mysql based website/script/blog/forum etc with the power of Nginx webserver.
1 2 3 4 5 |
root@venus:~# php -v PHP 5.2.17 (cli) (built: Jul 22 2012 00:02:21) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, 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.