Do you need professional LNMP, Nginx , Memcached ,Nginx Cpanel installation services? Or someone to take care of your server for a reasonable rate? Contact me on admin@ruchirablog.com Pricing start at just $15 for basic LNMP installation.
I have published article about my modified nginx auto installer about little over a year ago. Which can be found here. Which got somewhat famous and counted over 1000 installs. The framework which I was used was came from a chinese developer called licess and the framework now has been evolved a lot and now we can count it as fully fledged auto installer. It now includes latest nginx version ( Which lacked at the time which I modified the script to include the latest and greatest) . And also now it includes separately tweaked installers for debian, centos, and ubuntu, which I had on my modified installer since day one
So its nice to see that he baked 2 options which my modified installer had since day one.
This installer is extremely useful but its not popular in the international community since its written in Chines and no support provided on English. So with this post I just wanted to introduce that great tool to you guys and edit the original source code little bit to remove the time zone rewrites.
What I have edited
- Original installer rewrites the time zone to China. I have removed that so your original time zone will remain on the server.
- Nginx 1.2.9 latest stable version is added
- Removed the server probe script because it can post a security risk
All the credits must go to Licess at www.lnmp.org for the original installer and your donations should go to him.
What does the installer include
- Nginx 1.2.9 ( Upgrade to the latest after the installation )
- PHP 5.2.17 ( Upgrade to the latest after the installation )
- Mysql 5.1.60
- PHPMyAdmin
- Eaccelerator (optional 1 click install)
- VsFTPd, PureFTPd (Optional 1 click install)
- PHP Suhousin Patch
- Memcached (optional)
- Zend Optimizer
install Instructions-
You can use debian/ubuntu/centos 32bit or 64bit. So login via SSH and issue these commands (you must be root user to install LNMP )-
1. Download the installer package-
2. Decompress the install package-.
3. Go to install directory-
4. Start installing-
It will ask some questions like your domain name , mysql root password ( Use your root password if you are newbie) just answer to them promptly.
It will take at least 30 minutes to fully install and then you will see a massage saying install completed. So then you can try navigating to your ip address to see it working.
After installation -
- PHPMyAdmin will be located on http://yourip/phpmyadmin
- Navigate to your url or ip and it will display a test page
1, install eAccelerator, execute the following command.
, follow the prompts to select the version, press Enter, it will automatically install and restart the web service.
2, the installation of ionCube, execute the following command
Enter to confirm, it will automatically install and restart the web service.
3, the installation imageMagick, execute the following command
Enter to confirm, it will automatically install and restart the web service.
4, install memcached, execute the following command
Enter to confirm, it will automatically install and restart the web service.
And a advantage of the new installer is you can upgrade nginx or php with just one shell command.
- To upgrade the nginx execute the following command:.
/upgrade_nginx.sh
It will prompt a thing which you need to enter the nginx version number. Its simply asking which version that you want to upgrade. So head over to http://nginx.org/en/download.html and find whats the newest nginx version and enter the number correctly on the shell prompt. For ex- 1.0.10 and press enter. its just easy!
- PHP upgrade, execute the following command:.
/upgrade_php.sh
prompted, enter your php version number, such as 5.3.6.
You can manage the LNMP by issuing these commands-
- For example if you want to restart lnmp issue
/root/lnmp restart
LNMP files will be located on
mysql: /usr/local/mysql
php: /usr/local/php
nginx: /usr/local/nginx
Site Directory: /home/wwwroot
How to add more domains (Virtual hosts) for this setup?
You can add more domains to your setup with easy steps. You just need to open your SSH client and type
And it will ask you which domain name to add also if you are setting up new domain for wordpress it can automatically add rewrite rules for your permalinks
Just answer for the questions when you run ./vhost.sh
Cant install this yourself? Cant get it to work with WordPress or any framework that you need? Do you want someone to manage your server and security ? I have 4 years of experience with Linux,Lighttpd,Nginx,Apache and WHM Cpanel . Contact me on admin@ruchirablog.com pricing starts at $15.
Here are another guides for full LNMP 0.9 setup!
-
How to upload files to LNMP0.9 without SSH deamon
-
How to setup DNS to point your domain to LNMP 0.9 server ip
-
How to enable and setup IPv6 easily on LNMP 0.9
-
How to install PHP APC caching on LNMP 0.9
So enjoy your server and please add a comment if you are happy with outcome!
PS- To keep in touch with updates (next releases) of this script you can subscribe to my email feed. No advertising or spam will be sent. You can unsubscribe at anytime! ![]()


Mod_rewrite not work
its nginx not apache
Where is the sites-available?
you dont need to edit that! read the description first and ask the questions!
May I know which option did you change to stop rewrites the time zone to China?
I wish, lnmp.org should release a full package with english language as well.
/ eaccelerator.sh
Where to write these commands?
on your ssh console
Very good autoinstaller
I’ll finish all steps tomorrow…
thank you for provide this free information!
Kindly check your installer, it stops in between where it has to get some files from vsoft.net for installation.
It is unable to grab files at that point of installation. Please check it and let me know.
- Thanks
Very good autoinstaller
I’ll finish all steps tomorrow…
thank you for provide this free information!
So, to add a new domain i just need to ./vhost.sh
And for delete it?
to delete, you need to delete /usr/local/nginx/conf/vhosts/{domain.com configuration file}
and /home/{domain.com directory}
and restart nginx
/etc/init.d/nginx restart
Hello,
I used this auto installer and it worked great. I want to install a control panel because I feel more in control to see things graphically. I want to install ispconfig 3. Can I install ispconf 3 after this installer
I can’t check netstat ?
1- netstat -anp |grep ‘tcp\|udp’ | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -n
2- netstat -n | grep :80 |wc -l
3- netstat -n | grep :80 | grep SYN |wc -l
My Mysql attack.What should I do ?
when i update nginx (1.2.4) & php (5.4.7), i get so many error , i can’t add new domain, see detail below, please help , thanks.
______________________________________________________________________________________________________________________
[root@irawanto lnmp0.8-full]# ./vhost.sh
=========================================================================
Add Virtual Host 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 add virtual host for nginx
For more information please visit http://www.lnmp.org/
=========================================================================
Please input domain:
(Default domain: http://www.lnmp.org):www.kuathost.com
===========================
domain=www.kuathost.com
===========================
Do you want to add more domain name? (y/n)
n
Please input the directory for the domain:www.kuathost.com :
(Default directory: /home/wwwroot/www.kuathost.com):
===========================
Virtual Host Directory=/home/wwwroot/www.kuathost.com
===========================
===========================
Allow Rewrite rule? (y/n)
===========================
n
===========================
You choose rewrite=none
===========================
===========================
Allow access_log? (y/n)
===========================
n
Press any key to start create virtul host…
Create Virtul Host directory……
set permissions of Virtual Host directory……
You select the exist rewrite rule:/usr/local/nginx/conf/none.conf
Test Nginx configure file……
nginx: [warn] the “log_format” directive may be used only on “http” level in /us r/local/nginx/conf/nginx.conf:84
nginx: [warn] the “log_format” directive may be used only on “http” level in /us r/local/nginx/conf/vhost/www.indomorning.com.conf:28
nginx: [warn] the “log_format” directive may be used only on “http” level in /us r/local/nginx/conf/vhost/www.ringsreviews.indomorning.com.conf:28
nginx: [warn] conflicting server name “indomorning.com” on 0.0.0.0:80, ignored
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
Restart Nginx……
nginx: [warn] the “log_format” directive may be used only on “http” level in /us r/local/nginx/conf/nginx.conf:84
nginx: [warn] the “log_format” directive may be used only on “http” level in /us r/local/nginx/conf/vhost/www.indomorning.com.conf:28
nginx: [warn] the “log_format” directive may be used only on “http” level in /us r/local/nginx/conf/vhost/www.ringsreviews.indomorning.com.conf:28
nginx: [warn] conflicting server name “indomorning.com” on 0.0.0.0:80, ignored
=========================================================================
Add Virtual Host for LNMP V0.8 , Written by Licess
=========================================================================
For more information please visit http://www.lnmp.org/
Your domain:www.kuathost.com
Directory of http://www.kuathost.com:/home/wwwroot/www.kuathost.com
=========================================================================
[root@irawanto lnmp0.8-full]# /root/lnmp restart
=========================================================================
Manager for LNMP V0.6 , 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}
=========================================================================
Restarting LNMP…
Starting Nginx…
Test Nginx configure…
Nginx program is reloding!
nginx: [warn] the “log_format” directive may be used only on “http” level in /usr/local/nginx/conf/nginx.conf:84
nginx: [warn] the “log_format” directive may be used only on “http” level in /usr/local/nginx/conf/vhost/www.indomorning.com.conf:28
nginx: [warn] the “log_format” directive may be used only on “http” level in /usr/local/nginx/conf/vhost/www.ringsreviews.indomorning.com.conf:28
nginx: [warn] conflicting server name “indomorning.com” on 0.0.0.0:80, ignored
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
nginx: [warn] the “log_format” directive may be used only on “http” level in /usr/local/nginx/conf/nginx.conf:84
nginx: [warn] the “log_format” directive may be used only on “http” level in /usr/local/nginx/conf/vhost/www.indomorning.com.conf:28
nginx: [warn] the “log_format” directive may be used only on “http” level in /usr/local/nginx/conf/vhost/www.ringsreviews.indomorning.com.conf:28
nginx: [warn] conflicting server name “indomorning.com” on 0.0.0.0:80, ignored
Shutting down MySQL. SUCCESS!
Starting MySQL. SUCCESS!
Gracefully shutting down php-fpm . done
Starting php-fpm Zend Guard Loader requires Zend Engine API version 220090626.
The Zend Engine API version 220100525 which is installed, is newer.
Contact Zend Technologies at http://www.zend.com/ for a later version of Zend Guard Loader.
[12-Oct-2012 03:14:45] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/pdo_mysql.so’ – /usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
this upgrade script was designed in mind that , there will be only few changes to the nginx configuration file and looks like nginx has changed the way it handles log files, since the script only upgrades nginx it doesnt know how to handle the new configs, So you will have to wait
someone could help me fix this error
connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: xxx.xxx.74.26, server: http://www.xxx.xxx.org, request: “GET /announce.php?passkey=bc9f5874093fc78f59e40424405b021
i have installed my server through this script and its work perfect. i have used the Centos 6.3 32bit, all are working fine, php 5.2.17 with optimizor.
but i am facing the issue when configuring shopware site on the server nginx . as i was using .htaccess in apache before and now i have converted my .htaccess to rewrite rule. saved that rewrite rule in a file myrewrite.conf
cp myrewrite.conf /usr/local/nginx/conf/
chmod +x myrewrite.conf
and then run the vhost.sh
and get the myrewirte.conf and include that into the mysite.conf file.
nginx restart successfuly
when i am browsing the site its gives me the 403 error with nginx.1.1.0
when i tail the error log file
the out put is
2012/11/03 07:30:20 [error] 2502#0: *1 directory index of “/var/www/html/mysite.com/” is forbidden, client: 223.29.232.185, server: mysite.com, request: “GET / HTTP/1.1″, host: mysite.com”
please guide how to resolve this error.
thanks in advance.
imran
Ruchira can u update it to newer version of php and nginx ? also ftp ?
@nima goto http://lnmp.org official site and the latest version is 0.9
Hi – This is a fantastic script. Thank you. How can I easily upgrade MySQL? I’m working to install Magento and getting the following error:
PHP Extension pdo_mysql must be loaded
I can’t seem to get this to install.
Thanks,
Mike
thanks.. i like updated stuff
^^ Awesome work – you have my graditute! I was just thinking myself about building something similar and found this script by accident… You Sir just made my day – or spare at least a few dozent hours and some gray hair
glad I helped
Just before doing anything, is there a way to deinstall everything easily?
Nope there is no easy way like ” apt-get remove” since these packages are compiled and installed on your system
Hi,
I have HP Compaq vc4725 Thin Client .
Kindly guide me how to install android and window OS on this. Kindly guide me how to and what type of Hard Disk I can install to it as it has no hard disk.
Regards.
Narender
narender003@aol.in
if we install everything
* Nginx 1.0.10
* PHP 5.2.17
* Mysql 1.5.60
* PHPMyAdmin
* EAccelerator (optional 1 click install)
* Vsftpd, PureFTPd (Optional 1 click install)
* PHP Suhousin Patch
Memcached (optional)
* Zend Optimizer
whether it is set automatically?
meaning that when everything
* Nginx 1.0.10
* PHP 5.2.17
* Mysql 1.5.60
* PHPMyAdmin
* EAccelerator (optional 1 click install)
* Vsftpd, PureFTPd (Optional 1 click install)
* PHP Suhousin Patch
Memcached (optional)
* Zend Optimizer
without any further settings
Sorry I didnt got you?
i installed the nginx successfully.. but i dont know to add a domain to the server.. i am not using godaddy.. i am using another one…
i am trying to add a domain..help me..
Its very easy. Just add a A record from the domain panel pointing to your server IP
i added it.. does it take some time???
check out this scrren shot..
http://www.anony.ws/i/2013/05/13/wbOu.png
name of the A record should be “www” (without quotes) not your domain name
i cant add only the “www”, if i add it it shows with the domain name like this..
ex: http://www.doamin.com
or i add “abc” as a example
abc.domain.com
why????
ah then the domain panel is designed that way. No problems with that. just add with www and it will work