Nginx Autoinstaller
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-
wget -c https://www.ruchirablog.com/downloads/lnmp0.9-full.tar.gz
2. Decompress the install package-.
tar zxvf lnmp0.9-full.tar.gz
3. Go to install directory-
cd lnmp0.9-full
4. Start installing-
For ubuntu - sh ubuntu.sh
For Centos - sh centos.sh
For Debian - sh debian.sh
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. /eaccelerator.sh
, 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 /ionCube.sh
Enter to confirm, it will automatically install and restart the web service.
3, the installation imageMagick, execute the following command /imageMagick.sh
Enter to confirm, it will automatically install and restart the web service.
4, install memcached, execute the following command /memcached.sh
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-
/root/lnmp {start | stop | reload | restart | kill | status}
- 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
./vhost.sh
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!
{ 426 comments… read them below or add one }
greaatt!!!
i need this one for newbie like me …lol ..
however how about nginx on centos 5.5 64 bit?
is it debian better for running nginx than centos?
thanks and regards
hello,
This script is for debian. and do you have any specific reason to go with centos? If not try debian. Centos got so popular because cpanel choose it as their default os thats why centos is so popular. Yes i agree its developed and nice os but you should try switching to debian.
But if you must want centos. you can execute the all commands above without
./debian.sh
For ./debian.sh try ./centos.sh it will work without problems on centos but it wont install the latest version of nginx 0.8.53 it will install latest legacy stable version which is 0.7.67 . Regards,
Hi,
I found this Nginx installation script for Centos,
Try centmin provided by BTCentral
http://www.btcentral.org.uk/projects/centmin/
Centmin does a great job too! But the problem is it doesnt installs phpmyadmin,ftp,eaccelarator,ioncube and stuff!
To use lnmp0.5 with centos try ./centos.sh instead of ./debian.sh how ever disadvantage of centos version is it doesnt install latest version 0.8.53 it installs latest legacy stable version 0.7.67
Thanks for this awesome script. It’s working on 1st try without any single error.
How to configure nginx.conf to running multiple domain/host on 1 server? and where is pureftpd.conf located?
thanks again for this great script
Its just very easy friend! Just issue ./vhost.sh command! And enter the domain you are ready to go! 🙂
Bro, i got this error when restart the LNMP:
/root/lnmp: line 70: /usr/local/php/sbin/php-fpm: No such file or directory
dunno exactly what php-fpm is..
Looks like PHP-FPM didnt installed on your server! Are you sure it installed correctly’? Which OS are you using? And PHP-FPM stands for PHP FastCGI Process Manager! Its efficient program to manage php processes and now its a standard on php 5.3.x you can find more info online!
Is it possible to convert this so that it makes all/most of the additional items optional?
eaccelerator , ftp deamons, ioncube are optional! But you can remove other things if you edit the code too!
True but for the script noobies I was thinking of adding prompts (y/n) but no biggie. Any way of adding PHP-FPM and APC?
PHP-FPM is already in the script. And APC doesnt show much advance when comparing with eaccelerator . And you can install eaccelerator in seconds by ./eaccelerator.sh 🙂
Very nice indeed! Any thought on adding Cherokee as an option to Nginx?
cherokee doesn’t have functionality like nginx. And not compatible with many modules like nginx.
Any idea how I go about using a bare bones VPS running this script with Google Apps for Domains for email?
If you need to use google apps (Im using it too) you need to add MX records from DNS provider because this script doesnt include bind or other type of dns config. This script uses third party dns. actually its good than running dns server locally. read this guide about adding A records and MX records to your server with godaddy dns. https://www.ruchirablog.com/setup-dns-with-godaddy/
Same thing applies to other dns providers also! 🙂 Its very easy to use google apps with this!
Hi Ruchira …
does it work on debian 64 bit?
my vps doesnt have debian 32 bit 🙁
thanks
Yes it works on debian 64bit! 🙂
I can confirm this works fine as well. Great script Ruchira!
Thanks Joshua! 🙂 And which OS that you used?
its not work on , error mith mysql wont start 🙁
but i use it on centos 5 32 bit and working 🙂
Thanks a lot ..
btw how to restart FTP? i’ve make changes on FTP user 😀
Centos version only installs Nginx 0.7.57 not the latest version but no worries you wont have any problems with it because its still latest legacy stable version. I recommend you to not install FTP if you are only one who use the server. You can use this guide to upload your files without ftp deamon https://www.ruchirablog.com/upload-files-without-ftp/
to restart ftp “service ****** restart” will do the trick!
@Ruchira, i have the same vps as buzzknow, we don’t have debian 5 32bit. i’ve installed nginx on Debian 5 64bit and got that error (PHP-FPM).. Try on Ubuntu and everything is working fine but if no index.html or index.php, i got Forbidden Access.
access forbidden happens when nginx cant communicate with php. So if you hosting web site you will definitely have index.html or index.php right? 🙂 Did you tried index.ASP or index.CFM files? 😉 😛
yep, when index.html or index.php exist. it’s just fine, but when its doesn’t exist, then Forbidden Access..
hmm.. do you plan to release update? with all latest version (phpmyadmin, php5, mysql, etc.)
Yes Im looking at PHP 5.3.3 I didnt added to 0.5Rb because some users reported to have problems with it. I run some apache sites with 5.3.3 and I felt some problems with 5.3.3 too. But I didnt investigated problems I just switched to 5.2.14 .
But you guys can keep faith. 🙂
@ruchira, i finally install it in centos 5 32bit, working fine like a charm..
btw, how to run mysql daemon? i type:
/etc/init.d/mysqld start
but doesnt affect.. i want to create new mysql user..
Did you created new user on the admin panel of ftp deamon? If yes it should automatically restart the ftp deamon!
Its nice tutorial. Thank you
Hi there,
I am wondering – I am using the following AMI: http://thecloudmarket.com/image/ami-4a0df923–ebs-ubuntu-images-ubuntu-lucid-10-04-amd64-server-20101020.
Will your script work with this? If not, is there a Ubuntu AMI that you can recommend – I would like to work with Ubuntu.
Thanks and be well,
Moshe
Yes it will work on 10.04 but it might not work on 10.04.1 So you can install lucid 10.04 and then upgrade to 10.10 it works easily !
Great – thanks. I’m going to give it a try.
All the best,
Moshe
Dont forget to update us after installing! 🙂 best wishes with your new fast nginx web server 🙂
Bro, please write tutorial about setup nameserver 🙂
Bro, please write tutorial about setup nameserver on nginx 🙂
Well running your own name server is not a wise idea. You can use a free dns provider! If you are using godaddy for your domain registration here is the guide https://www.ruchirablog.com/setup-dns-with-godaddy/ Other registrars like name.com has free dns facility for their clients also! 🙂
Hi,
is it tested spyware free?
-Sam
what kind of spyware are you talking at? 😛 Im using same installation to run this blog 🙂
hi ruchira, how can i changing server header??
thanks 🙂
If you need to fully change server header you need to edit the nginx source files before compiling nginx. You cant change server header in nginx after compiling. But you can remove nginx version number from the header by adding “server_tokens off;” without “” to nginx.conf file.
Ruchi, i wanna edit html error page, where can i find it?
If you are using wordpress you can edit error template from template editor! If you are using some other web site you can search google to find out how to edit nginx error pages! 🙂
hi Ruchira, thanks for creating the script, really-really helped me on my ipv4 server. i try to implement your script into another server, that only use ipv6.
to get the LNMP script i’m using IPv6Gate adding url with .ipv6.sixxs.org , all the link in the script too.
but always get error.. after ntpd / time update.
Current script updates time to shanghai time which is useless (this happens because the main developer setit). Im adding the updated version within next 48 hours to keep current time on the server without updating. At the time of writing im porting the script to centos.
If you want to install this on ipv6 server i think you will have to modify the whole script because source codes pulled from http not apt-get or yum you will have to change the nginx config after installation. You can try editing course code to use ipv6 use notepad++ (its free) if you are using windows. dont use microsoft notepad because this is unix shell script!
if you need more help just reply here! 🙂
hi buddy,
this is my problem : script was succesfully download all files needed, but installation is not. can i proceed with manual installation ?
thanks.
Starting LNMP…
/root/lnmp: line 31: /usr/local/nginx/sbin/nginx: No such file or directory
Nginx is successful start!
/root/lnmp: line 34: /usr/local/php/sbin/php-fpm: No such file or directory
===================================== Check install ===================================
Error: /usr/local/nginx not found!!!
/usr/local/php [found]
Error: /usr/local/mysql not found!!!
strange whats your OS?
my os is debian lenny,
anyway tried to manual installation nginx, got a problem of dependencies
libc6-dev: Depends: libc6 (= 2.7-18lenny4) but 2.7-18lenny6 is to be installed
E: Broken packages
is it fine with your script if i get nginx via apt-get ?
update, my dependencies problem solve with this aptitude install libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev
i will try again on clean server
thanks Ruchira, great script you have.. 🙂
Hello Ruchira,
Thank you for this tutorial, its very help me.
btw would you give me easy tutorial to install ffmpeg.
Regards
Riyan
Its nice to hear that this helped you! installing ffmpeg is depending to your OS and there are many articles on internet explaining that! And you can try searching google normal ffmpeg installation procedure applies to this auto installer too! No changes made to core except its auto installed! 🙂
is get this error:
2010/11/24 13:46:30 [crit] 9502#0: *16 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 217.19.ddd8, server: http://www.dddddd.co.cc, request: “GET /phpmyadmin/ HTTP/1.1”, upstream: “fastcgi://unix:/tmp/php-cgi.sock:”, host: “217.19.ddd”
Can you tell me when do you got this error? in the installation or ?
no, when i try to visit phpmyadmin default install of phpinfo.php
please be specific whats default install of phpinfo.php? and whats your ubuntu version?
with default install i mean just the install instructions from your blog:
i installed it on ubuntu 10.04
./ubuntu.sh
after that i visit http://myip/phpmyadmin
or the phpinfo.php file in /home/wwwroot
and i get 502 Bad Gateway
and this in the errorlog:
2010/11/24 14:24:53 [crit] 823#0: *14 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 217.s9.xxxx, server: http://www.sssss.co.cc, request: “GET /phpinfo.php HTTP/1.1”, upstream: “fastcgi://unix:/tmp/php-cgi.sock:”, host: “www.sssss.co.cc”
Now thats called being specific, It seems like some libraries didnt installed which needed to run php. Im using ubuntu 10.04 and this auto installer to run this blog and its strange to see that you got this kind of error as I tried installing many times on 10.04 and 10.04.1 , So please can you format your vps and retry with fresh ubuntu install?
There is 99% of change that your server got some network connection problem when fetching libraries from ubuntu repositories!
hmm, it was a fresh install
but ok, ill try it
do you install 10.04 server or desktop?
Its server edition! 🙂 Why should I need Desktop edition? 😛
ok
and what packages do you install when you install the system?
I assume none?
yes none manually! Packages set to be installed on auto installer script! Your problem happened because some of them not installed correctly. Im 99% sure this is connection problem or your OS files should be corrupted! Any luck on new install?
reinstalled os and lnmp:
when i visit mydomain.com/phpinfo.php
2010/11/24 16:04:46 [crit] 9788#0: *5 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 217.19.xxxx, server: http://www.xxx.co.cc, request: “GET /phpinfo.php HTTP/1.1”, upstream: “fastcgi://unix:/tmp/php-cgi.sock:”, host: “217.19.xxx”
There should be some kind of error in your OS or network connectivity im 100% sure about this as this is caused by failure to install libraries! Im so sorry. if you can try with debian.
Thanks
Ruchira,
Thanks for this tutorial, it really helped immensely, but I have run into a problem, after running it on CentOS, all the services are running, but when I navigate to my URL it doesn’t resolve. Do you have any ideas on what could be causing this?
did you entered correct domain when prompted? And did you setup A records for your domain? You need to setup A records to your ip to start resolving the domain! Please read this- https://www.ruchirablog.com/setup-dns-with-godaddy/
That article for godaddy. Same procedure applies for other DNS providers too. Contact me if you need further assistance! 🙂
I did set the A record (I am using GoDaddy), a reboot of the server solved the issue. However, PHP is not working, if I try to go to http://myip/phpmyadmin I get an error message saying the page is not found. I added a phpinfo.php page to the directory, but when I try to go to that I get an error message saying the page is temporarily unavailable.
Actually thats not possible. Are you getting the error massage “Access forbidden” or something or page not found? Can you restart LNMP by /root/lnmp restart
When I try to do that I get this error line 70: /usr/local/php/sbin/php-fpm: No such file or directory
on anther vps it does work ok
although i see this error when the scripts finishes
==================== phpMyAdmin install completed ======================
tar: p.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Exiting with failure status due to previous errors
cp: cannot stat `p.php’: No such file or directory
update-rc.d: warning: /etc/init.d/nginx.sh missing LSB information
update-rc.d: see
Adding system startup for /etc/init.d/nginx.sh …
Thank you pointing out the error but you can ignore this as I removed p.php from source because it might lead to security breach! Other things working properly? 🙂
Hello Ruchira,
I have to tried install ffmpeg for more time but not succesfull, always got error. do you Have auto installer for ffmpeg?
and how to host multiple domain in nginx with different user. I mean how to give acces for every user. for example user1 have site 123.com and user2 have site 456.com, how to manage this, user1 can not log to user2’s site files. hope you understand 🙂
thank you
1. sorry I dont have any ffmpeg installer and im not experienced in ffmpeg! please search google to find one fits for nginx.
2. For this easy way is FTP. search google on how to install FTP client on debian. and setup 2 users giving each access to specific directories! 🙂
Im sorry I m use debian 5.32bit for my mechine vps
What DNS server is it using? NSD or BIND ? Also would it be possible to use Percona ? http://www.percona.com/software/percona-server/
its not using any dns server! You can use external dns server or install it manually! 🙂 I prefer external server because reduces time and easy to use!
Any recommended external DNS servers ? any idea about percona ?
well I dont knew about percona until you pointed out! Normal percona procedure will apply for this too because this is same as normal nginx installation.
There are many DNS providers around the web. IF your domain is regitered with godaddy,name.com they provide free dns to customers!
I tried using godaddy a while ago, and its changed and well it doesn’t seem to be working quite right. I’m not sure the exact problem i added the A record and
parked the domain.
http://www.intodns.com/minitheatre.info
did you entered the domain name when prompted by LNMP?
Tried it using Ubuntu and works fine. But using 150MB memory, anyone?
Nevermind. Lowered php-fpm max_children value and now I’m at 80. 🙂
of course! 🙂
Hi Ruchira how to enable php curl on this installation? i uncomment line ;extension=php_curl.dll on php.ini and restart lnmp but always failed.
php_curl.dll? What do you mean by uncomment it? You only have to uncomment ; And I think curl is enabled default on this installation! Please provide details curl isnt working?
oughhh so sorry i didn’t chek phpinfo. I though it’s not enabled by default so i’m try to enable it by uncomment ; on line ;extension=php_curl.dll and restart lnmp. Yeah it’s enabled already 😀
why show error 502!
http://gournadi.tk/phpmyadmin/
Looks like you wiped it before i took a look! 🙂
i saw you’re using w3 total cache..can you show me how nginx.conf for w3 total cache?..i’m really confuse.thanks
Hello,
Yes im using W3Total Cache and I didnt done any configs to nginx.conf because its doesnt require any changes to rewrites like wp super cache. Im using memcached with w3total cache
ruchita, yesterday my wordpress running smoothly, but today i can’t edit anything in my wp-admin menu, it shows “No input file specified. “..already tried any suggestion but didn’t work..could you help me please
This looks like rare problem. Please run
/root/lnmp status
and post result here!
Thanks
the lnmp status is fine, i find out the problem, it’s because didn’t call “wp-admin” directory (straight to the file)..i don’t know why..but after adding
if (!-e $request_filename) {
rewrite ^([_0-9a-zA-Z-]+)?(/wp-.*) $2 last;
}
in my wordpress.conf it working smoothly..
thanks
Oh you forgot to add the permalink redirects 🙂
i think the problem with memcached,it cached the wp-admin. already set “don’t cache for log in user”but seem it doesn’t work..so i should clear my browser cache every time log in to wp-admin.also after moving to lnmp, i cannot verify my website for google webmaster with meta key..still trying to figure this out..but i love with this nginx webserver.thanks
Well I dont have any problems with w3 total cache set to use memcached. What plugin that you use? WP-super cache have some problems with memcached
i use w3 total cache too..
Seems to install everything with a ease but PHP was excluded or something. The start script can’t find it, niether can I ><'
Any thoughts?
CentOS 5,
looks like your server failed to download the php .tar file. Best option is to try installing again on clean server 🙂
Hi Ruchira,
how to activate mail function?
i see on debian.sh there’s a part for confgure nginx, but wihout –with-mail
so we need to to edit this file manual before running autoinstaller?
thanks
What do you mean by mail function?
I mean mail() function on PHP,
with this auto installer i can’t sent mail with native function from PHP.
so how u make it work for sending mail ?
regards
well you can configure exim or use this simple wordpress plugin to send mail with your gmail or google apps account- WP-Mail-SMTP
hi, its me again 🙂
this time i try your script with ubuntu 104 lts, found this error :
2010-12-05 18:20:28 (3.74 MB/s) – `php-5.2.14.tar.gz’ saved [11783970/11783970]
php-5.2.14-fpm-0.5.14.diff.gz not found!!!downloading now……
–2010-12-05 18:20:28– https://www.ruchirablog.com/nginx/php-5.2.14-fpm-0.5.14.diff.gz
Resolving https://www.ruchirablog.com...
Does it hangs saying resolving https://www.ruchirablog.com/………………….. ?
If yes your DNS resolvers are buggy and doesnt resolve domains correctly. Change your resolvers to use googledns or opendns ip address. Search google on how to change dns resolvers in ubuntu
i dont think its a dns problem, but what i do is restore image back, so i have a clean install, and i have all running now. Thanks Ruchira.
🙂
thanks for the script. i try to install it. i hope this run smooth
hello.
i have add a child name server for ns1 and ns2 on my domain panel but how about add a record on dns zone of this server?
i mean we need to add A record for ns1 ns1 and hostname of main domain on server
You dont need to setup NS records in this case! Whats your domain registrar?
got /root/lnmp: line 70: /usr/local/php/sbin/php-fpm: No such file or directory
on centos 5 32bit
Yes im having some issues with latest updates for centos and please use debian for now! Ill update this after I solve the issue!
Thanks
not work in debian5 and ubuntu too right now…i dont know what’s wrong..but last week i install on debian it worrks great
Im aware of this issue few users reported this. Im 99% sure this happened because some libraries changed meanwhile! Tomorrow im going to go one by one to check which caused the problem for some users.
And I have tested with debian 32bit yesterday and didnt had a problem! And lots of users using this script daily and I can see that by my bandwidth logs ( nginx and such software packages pushed about 10 times a day each for this script using 1GB~a day).
So Please tell me what error that you got!
tnx from your reply. my domain register is resellerclub
Does your DNS registrar offer free DNS service? Godaddy and name.com offers that!
While LNMP ask me for a domain name, is it must be different with my hostname?
Is vhost. sh capable to create subdomain too?
For example:
http://www.domain1.com
subomain.domain1.com
http://www.domain2.com
subomain.domain2.com
Well to be honest I didnt tried to create sub domains with vhost.sh but you can try and it might successful! And when it asks for domain name enter your domain name not host name! For example take my blog. Im running same setup on this blog. So my choice for domain option is https://www.ruchirablog.com ! Hope you can understand!
How much space is needed for the latest NGINX Auto Installer?
I have Xen VPS.
Lenny 32 bit.
Memory 128MB, swap 25MB.
Space 2 GB (1,39 GB free after OS Installation)
NGINX Auto Installer always failed in the middle of process and give report not enough space.
While I check my disk space, my 2 GB space is already full.
So, how much space is needed for the latest NGINX Auto Installer?
To be honest I didnt checked exact numbers of disk space this use. But I have installed it on 80MB RAM Debian 5 2GB disk box with 0 problems even ran wordpress on it.
Does your disk custom partitioned? If not its worth to ask with your vps provider. Or try downloading about 1GB file to your vps with wget. You can find 1GB test files from server providers 🙂
Ruchira … tnx from your answer.
ans an important question about nginx
is it a good idea to install it on share hosting?
and other question is nginx can reduce load on download server ?
Nginx doesnt support some modules that people need. So installing nginx only ( without apache ) is not very good unless if you plan to offer pure nginx hosting service not normal shared hosting.
Of course nginx reduces load on any server!
please check this service. you mean:
http://img.graphicno.com/files/z15uslzeu251umnjc3a5.jpg
I cant view that image! says its banned!
sorry.
here you are
http://i54.tinypic.com/20gmlqo.jpg
yeah looks like it! You can enable it and follow this guide to add A records https://www.ruchirablog.com/setup-dns-with-godaddy/ dont worry about the registrar same procedure applies to everything! 🙂
i try to install it on cent os but phpmyadmin cant load.
i have reinstall os 3 times but…
http://67.159.63.109/phpmyadmin
strange! Can you try using ubuntu or debian?
if i have 2 or more domains and IPs, how to assign each domain to each IP, for example:
domain1.com => 1.1.1.1
domain2.com => 2.2..2.2
domain3.com => 3.3.3.3
thanks
thats little bit complicated! You need to configure your Linux OS for this. Please search google!
Hey mate, how do i remove an added domain? also the directory created, just an rm -rf?
yes just remove the directory if you want! There are more steps do completely delete the domain from nginx. But directory remove will be fine! 🙂
hi there,
i’m succsesfully install your script, and having a wordpress site on my domain (vhost).
how i can have a folder without effect of wordpress rewrite permalink ?
i create a rules like this :
location /twitter/ {
rewrite “^/([^\.]*)$” /index.php?q=$1 last;
}
but it doesnt effect, always redirect to /index.php
you dont need to add any redirects if you add wordpress rewrites correctly? What are the lines that you added to nginx.conf to create rewrites?
I have no idea about this, i try to restart but in the end of report, error on line..
Reload LNMP…
Reload Nginx configure…
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful
Nginx program is reloding!
Shutting down MySQL. SUCCESS!
Starting MySQL. SUCCESS!
/root/lnmp: line 70: /usr/local/php/sbin/php-fpm: No such file or directory
is it okay?
its not ok 🙁 It means that php isnt installed successfully! Whats your OS?
I am getting this on Wordpress site when selecting an option inside the admin interface : “No input file specified. “, why? Actually, I had this site working (w/ no probs) but I transferred it to another server.
did you added permalink rewrites to nginx.conf?
Manually? No. But chosed wordpress rw on ./vhost.sh installer. Do have to do it manually?
can you access to your blog? and are you using permalinks?
Yes I can, and permalinks works fine. However the wp admin panel options gives that error whenever I access them.
actually that error happens when there is no such file! How many virtual hosts are there in your installation?
I think there are two, 1 using dabr and 1 wp. Do you think this happened because of I am using two vh? I also check on nginx/conf/vhost dir and the domain is there w/ a correct rewrite.
can please post here the /usr/local/nginx/conf/nginx.conf file here? open it via nano and copy the files paste to text upload the file somewhere and link it here! 🙂
have you solved this? I get the same error on my dashboard
working fine on Debian lenny..
but still have problem starting the pureftpd >.<
whats the problem? I personally dont recommend installing FTP deamon on your server because its very old protocol and you can always use SFTP tp transfer files without FTP.
How to install mail server, Webmail and how to configure Google Apps (Google mail) from your script / Nginx Auto Installer? Please help me. I want to install Roundcube / Settings my domain on Google Apps mail.
Thank you for your Script.
Thanks also LNMP developer.
if you want to enable google apps (im using this too on this blog) it need to be done with your DNS provider! Once you have added MX records your are ready to go! Its easy!
Main problem, My Domain provider is Uk2 Group / ResellBiz.
Another thing is, How to upgrade Wordpress Plug-in without FTP account.
there might be supplying free DNS for you check that out!
You can login to SFTP and upload the plugins to wordpress. you can download new plugin and upload it rewriting the old plugin. thats little bit time consuming but 99% secure than having FTP account! 🙂
suhosin enable but not in phpinfo and i run ./ioncube and ./eaccelerator same again not in phpinfo
i try reboot my VPS , /root/lnmp restart still not in phpinfo
suhosion must be installed on default and will appear in your php info file! Please link me to your vps ip and phpinfo page!
Thanks
how can we use it only for ftp ? i mean without any domain ,,,, ,the problem is how create ftp user
FTP user creation is done on FTP deamon you can follow the guide to install FTP deamon and on that you can create FTP users.
http://109.169.57.120/phpinfo.php
IT seems like your vps failed to grab the sohusin or some kind of other problem! Can you do a reinstall? And whats your OS?
yes I tried reinstall 3 times same result
where I can set suhosin
I see in php.ini does not exist
my os debian
you can try installing suhosin but its not a must. Search google there are many reviews!
How do I get PHP-LDAP working? I need to be able to run ldap_connect(). I am on Debian 5 and did an apt-get install php5-ldap but to no avail.
Any suggestions?
apt-get install on php wont work because php is installed on custom directory without apt-get so you can install it manually by specifying php directory! To be honest Ive never had experience with LDAP but you may find articles on installing it on google 🙂
Actually I figured it out. I did do an apt-get install php5-ldap. Knowing that it wasn’t in use, I found the other version of PHP now installed and found specifically the modules in /usr/lib/php5/ I moved those files into the /usr/local/php/lib/php/extensions/ directory your script made and simply added those moved modules into my php.ini file and restarted LNMP. All is well that ends well. Thanks!
how can i find that guide ? sTNX
Google is your friend! 🙂 Its very easy if you are using debian or ubuntu!
Bro,
I am using Joomla this site- Gournadi.com
Now Nginx / LNMP is works nice. But i can’t enable .htaccess / re write mood on Joomla. Its not working. Thats why i cant short my URL. Please help.
htaccess wont work on nginx. but there is a rewrite method in nginx. Im using wordpress rewrites here on my blog but its different than apache htaccess you can search google for nginx drupal rewrites its possible to run drupal rewrites on nginx. 🙂
Its works nice and super sonic speed web server :p
I am adding few command on nginx.conf
Thanks for suggestion.
Hi bro,
How to change Time Zone after install LNMP? Its not possible re install LNMP again, because my site is running.
Thanks for nice Script. Its helps Us.
whats your LNMP version and OS? 🙂 of course its possible to change time zone you can google about this!
i got this too ruchira, how must i do?? im using Ubuntu 10.04 i386 minimal T_T
try default OS without minimal. there should be some libraries missing on minimal
Hi,
I install the LNMP script successfully (on CentOS 5.3), but I am getting a 502 Bad Gateway error when I try to access PHPmyadmin or any php scripts. What would be the issue here?
Thanks!
can you try this on centos 5.5?
same problem for me on centos final ver 32bit
🙁 Sorry for that! Best bet is trying LNMP original installer on http://www.lnmp.org or try this with debian or ubuntu which gives your latest nginx version unlike centos version!
i am not friend with debian .
can you tell me how can i wget and run installation?
just run wget and then:
./ubuntu.sh
as same as centos ?
yes of course. Use ./debian.sh on my script for debian use ./ubuntu.sh for ubuntu OS.
-bash: wget: command not found
root@dlshowti:~# yum install wget
-bash: yum: command not found
Nima,
Ubuntu Suks. Ubuntu grandfather is Debian so its my suggestion, try Debian. Its very good.
one things, before you install Ruchira Scrirp you must : apt-get update > after > apt-get upgrade
then download and Install Ruchira Script.
My http://www.Gournadi.com is run by this script from Joomla. Its run super fast.
actually you are wrong with this expression. Im running this on ubuntu and note that ubuntu gets many updates and there is huge developers on it. Also keep note that Ubuntu gives latest software packages than any other linux flavor.
Im running this on 512MB XEN guest and my host node runs on ubuntu too.
hi ruchira, why my sqld process and php-cgi eat too much resource CPU??
please see this
http://img140.imageshack.us/img140/9291/myblogprocess.jpg
Are you using LNMP? Or something else? I can see that there is also BIND and some other stuff running. This doesnt seems like you are using LNMP RB
hi Ruchira,
another great post.
I just installed the script and in process of getting DNS set up.
In the meantime how do I do redirect all to http://www.mysite.com . I think now without www it won’t work.
Thanks.
Also one of domains has just propagated but when I go to address it displays your default page, saying it is installed. I check via SFTP and domain name directory is on there home/wwwroot/
What could be wrong?
Thanks.
Why do you think something is wrong? If you are seeing my default page it means its successful! All you need to do is delete my default page and start uploading your website to /wwwroot/ 🙂
when script requested to add your domain dont you entered http://www.mysite.com ? If not its fine too search google for non www to www redirect with nginx. Its easy!
Ok, but I can’t find nginx directory in etc/ I’m looking for sites-enabled folder with my domain. Where is is located?
or do I edit something else?
Thanks.
well looks like you didnt read the post! Adding virtual hosts is very simple in this! just run ./vhost.sh command!
I understand that but which file I need to add rewrite rule for non-www ?
Thanks.
No when adding the domain add it with www. then it will work fine!
Where is nginx.conf located? it’s not in /etc/nginx/ like on lowendbox script.
and where do I put rewrite rules for individual domains?
Thanks.
yeah im using lnmp RB, but why too much eat resource?? can u help me ?:(
i also have been reinstalled that script, but still same
im using debian 32 bit
You arent using lnmp because I can see that there is BIND running and it doesnt even included with lnmp.
okay, if you say im not using that script.
but look this again 🙁
http://img211.imageshack.us/img211/6488/weirdr.jpg
i dont know php-cgi instaleed or not, but that fact is like that. i just reload OS on my vps after that install your script(no install anything just (update and upgrade), and running my blog script again.
any chances to chat with you?? i want you to see my vps configuration.
just email your messenger to my email. thanks 🙂
Whats your OS and who is your VPS provider? Are you using centos install bundled with kloxo?
im using debian 32bit, my vps provider are frantech.ca company. im not install anything, just OS reload, and then install your script
can you try ubuntu?
Hi Ruchira, i runed the script in my dedicated server, but there’s some issues. there’s a script for remove everything installed with nginx installer script?
uninstalling will be little bit hard if you are newbie for linux management! But you can stop the services without uninstalling everything by issuing the command /root/lnmp stop
How about SSL? Do you configure it to work with that? I need the path to configure that. I have OPENSSL installed.
Also for some odd reason PHP mail wouldn’t work, but I used a SMTP library to send mail from the server instead. 😉
In default nginx is compiled with SSL module. Please search google about the detailed steps on SSL setup with nginx.
Yes for some reason original developer doesnt included php mail. In future versions Ill add it. But you can always trust SMTP and it will save you from blacklisting your ip 🙂
i had been try using ubuntu/CentOS but still same.
for CentOS seems php-fpm not installed properly, i dont know what must i do.
i must talk to the provider about this??
Can you give me root access to your VPS and control panel so Ill check it out! If you want use my contact form to contact me with your vps login details!
reza..
coba install paket yg dari lnmp langsung bukan yg dimodif sama ruchira..dulu saya bisa klo paket yg ini skarang saya jg gagal terus
English please! 🙂
ruchira,
can you tell me how to set up a cron job on lnmp?
i need it to empty my lnmp logs automatically..
thanks
it depends on your os not on lnmp 😛 for example here is the guide to add cron jobs on ubuntu https://help.ubuntu.com/community/CronHowto like that you can find articles on centos 🙂
Thanks Ruchira
Ruchira,
Have you used eAccelerator with this?
If I install it and have problems, how would I disable or uninstall it?
Thanks.
Yes I have installed eaccelerator im 100% sure that you will never face any problems with it! Its very nice php caching plugin! Definitely install it! 🙂
ok I’ll try it. It will be used with W3 total cache WP plugin. Thanks.
In case I do have issue how to disable/uninstall?
Thanks.
Ruchira,
I installed eaccelerator that came with your script.
But it doesn’t seem to work.
According to http://eaccelerator.net/wiki/TroubleShooting , in tests it is not loading or working.
Is there anything else I need to do besides running ./Eaccelerator.sh command to get it working?
Thanks.
if you can see it on phpinfo file its working! You dont have to any additional things!
@ruchira
when i click submit on your contact me form, seems error, and redirected to index page. i have been filled 2 times, but no changed, about my login details and request your messenger
thanks
I got your message! Looking in to it now!
No it is not showing in phpinfo. Should I try installing full version via wget?
will that work with your script?
Or do you have any other suggestions.
Thank you.
actually its very strange that it didnt installed successfully! Can you give me the link to your phpinfo page? YEs you can try installing it manually its easy.
here is the link
http://www.e-deal.info/phpinfo.php
It created eaccelerator-cache folder as well but nothing in it.
Thanks.
did you issued
/root/lnmp restart
after installing it?
yes I did.
strange
I get the same error, where php doesn’t isntall.
I have ubuntu 10.04 on a zen operating system…
strange error…
Well, Install Ubuntu 9.04 and run the script! Then upgrade to ubuntu 10.04 by running
apt-get upgrade
🙂managed to install it with new version (V0.5.1RB) the only thing is eacclerator was working but for some reason php.ini wasn’t being written to..so I had to manually add these lines to php.ini for eaccelerator to work.
[eaccelerator]
zend_extension=”/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so”
eaccelerator.shm_size=”1″
eaccelerator.cache_dir=”/usr/local/eaccelerator_cache”
eaccelerator.enable=”1″
eaccelerator.optimizer=”1″
eaccelerator.check_mtime=”1″
eaccelerator.debug=”0″
eaccelerator.filter=””
eaccelerator.shm_max=”0″
eaccelerator.shm_ttl=”3600″
eaccelerator.shm_prune_period=”3600″
eaccelerator.shm_only=”0″
eaccelerator.compress=”1″
eaccelerator.compress_level=”9″
eaccelerator.keys = “disk_only”
eaccelerator.sessions = “disk_only”
eaccelerator.content = “disk_only”
Good luck to everyone and thanks ruchiara 🙂
Hi,
I’ve got problem when accessing wordpress dashboard pages..I always get “No input file specified.” error message…I’ve been looking for the solution using google but still no solution so far. Is it something to do with the permalink conf?
The blog was installed in vhost not as main web
yes it might be a problem with wrong permalinks!
can i translate your post in italian? i’ll give all credits to you!thanks
Im glad you asked this 🙂 I can find many places that copied my posts without getting my permission! Yes feel free to translate it but kind enough to link my page! 🙂
hi ruchira, here the link to the article:
http://www.webnoob.it/2011/01/14/nginx-autoinstaller/
Thanks for keeping credits 🙂 Guys like your type are hard to find these days! 🙂
Ruchira, i think i need your help…
everything was normal for the last 2 months..but something happened today
i got 502 Bad Gateway and i found this in my nginx_error.log
2011/01/15 17:55:35 [emerg] 24393#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/01/15 17:55:35 [emerg] 24393#0: bind() to 0.0.0.0:8011 failed (98: Address already in use)
2011/01/15 17:55:35 [emerg] 24393#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/01/15 17:55:35 [emerg] 24393#0: bind() to 0.0.0.0:8011 failed (98: Address already in use)
2011/01/15 17:55:35 [emerg] 24393#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/01/15 17:55:35 [emerg] 24393#0: bind() to 0.0.0.0:8011 failed (98: Address already in use)
2011/01/15 17:55:35 [emerg] 24393#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/01/15 17:55:35 [emerg] 24393#0: bind() to 0.0.0.0:8011 failed (98: Address already in use)
2011/01/15 17:55:35 [emerg] 24393#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/01/15 17:55:35 [emerg] 24393#0: bind() to 0.0.0.0:8011 failed (98: Address already in use)
2011/01/15 17:55:35 [emerg] 24393#0: still could not bind()
hope you can help me to solve this
what are you running in port 8011? Did you modified ports on nignx.conf?
no i haven’t made any changes in nginx.conf
when i check i got this …
PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 3402/mysqld
tcp 0 0 0.0.0.0:8011 0.0.0.0:* LISTEN 5121/nginx
tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN 3156/memcached
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 5121/nginx
is that mean that nginx work on port 8011 and 80 ??
in my nginx.conf only only listen to port 80
server
{
listen 80;
please remove my previous comment..has been fixed, it listen in my vhost.conf
another question is i always see this error in my log..
2011/01/17 18:22:35 [crit] 29977#0: *4962 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 38.107.163.161, server: http://www.xxxx.com, request: “GET /url/blablabla.html HTTP/1.1”, upstream: “fastcgi://unix:/tmp/php-cgi.sock:”, host: “www.xxxxxx.com”
but the php-cgi.sock file is exist..i’m using debian
hi Ruchira,
how to redirect our website (on vhost) permalink from www to non www
I tried using
if ($host = ‘domain.com’ ) {
rewrite ^/(.*)$ http://domain/$1 permanent;
}
in my domain (vhost) conf file but it keep redirecting to my main domain (different domain on wwwroot folder)
this problem is happening because wrong DNS setup! Check your second domain DNS config search google for more details about nginx multiple vhosts on same ip!
Ruchira,
is there a way to configure this script to use TCP port instead of php.sock ?
What files need changing?
Thanks.
actually why do you want to change that? You wont see much difference on that on Linux systems.
I need it to run social network script that uses it’s own page handlers. It requires special rewrites and I tried it with php.sock and get no file specified error on certain pages.
Thanks.
I dont think changing to TCP socket will work for you but im not 100% sure! How did you found that moving to TCP socket in nginx will fix your problem?
I’m not sure it will fix it but the only rewrite example I found uses fcgi pass through TCP port.
I guess I could install stock Nginx and php, mysql but I was trying to save some time using your script.
Ruchira,
just install fresh on 512MB vps and when I import database in phpMyAdmin I get “504 Gateway Time-out” error?
Any thoughts?
increase your keep-alive timeout limit if your upload takes too much time!
hello, Ive tried bith centos.sh and debian.sh
It installs fine, but when I access /phpmyadmin ,it says 502 bad gateway.
please help,im on centos 5.5
thats common problem happening because of library mismatch with new versions of centos! Can you use centos 5.4 to install and then upgrade to 5.5? Or use ubuntu 10.04 its much better!
not working, php files not open
Thanks man! It’s pretty awesome 🙂 Full automatic installation – that’s what I love 😀
kudos! 🙂
Hi Ruchira,
Thanks for autoinstaller and additional help, thanks to your script and kind assistance have my first two Wordpress sites up and running. I will be starting to port other sites to my new VPS in the comming weeks, after doing some more testing. The vhost script is going to come in very handy, as I have quite a few domains to manage and move. Should be a Doddle now ! 🙂
Thanks again !
Do you know How could I replace a php-cgi installation (made with lowendbox.com/blog/wordpress-cheap-vps-lowendscript) with php-fpm using your script ? if yes, after doing it Could I normally install eAceccelerator using your script?
well its easier to use my script than modifying and mixing it together! If you want to run my script on lowendbox just lower the php max child value after installing! I have tested my script with 80MB XEN from quickweb and loadimpact doesnt even make a blip!
This is exciting. I’m going to try this script right now on my test vps. NGINX configuration is the biggest hurdle I have from making the switch from a shared hosting provider to a real VPS. Thanks for posting.
hi ruchira,
can we login as wwwroot instead of root ?
No it doesnt have proper privileges !
Just noticed that LNMP has been updated to 0.6, not sure the benefits to it though. I wanted to know if it was possible to have the script use the latest versions of Nginx and PHP (as an option).
Some options like Ubuntu specific installer package is already enabled in my modified version since i released it so its nothing new. Difference is he released nginx upgrade script which is little bit useless at this time because LNMP RB runs 0.8.53 but it will be very helpful for centos users and all users in future. So Ill test official LNMP 0.6 briefly and make any necessary changes to my modified release!
All the credits goes to Liccess at http://www.lnmp.org without him this kind of all in one nginx auto installer script wont be possible for now. 🙂
Ruchira,
Awesome! Iove how responsive you are to requests. I had another question, I was reading this article (http://serversreview.net/latest-stable-version-nginx-0-8-54-with-php-5-3-5) and was curious about the 50mb decrease in memory by using php-cli vs php-fpm. Is there also a performance advantage one way or another?+
Sorry for the double post below not sure what happened.
😉
php-fpm is new method of managing php instances and it will be definitely fast than cli. But if you are using a low end box like 80MB RAM CLI is for you. Dont try to squeeze all in to small amound of memory because its useless. try to full use the available memory!
Thanks for the info! I sent an email to the webadmin and website is back up.
LNMP has been updated to 0.6 any improvements worth noting? Also can we manually upgrade php and nginx to the latest and will doing that mess anything up?
Hello, i just curious whether there’s any problem with phpmyadmin and suhosin in this autoinstaller, because suhosin setting must be done carefully to make phpmyadmin works perfectly, thank you.
No nothing is problematic! Next time commenting be sure to use your name not urls! I found your comment on spam queue!
I was playing around with some tweaks after installing your script and I messed a minor detail up. afterwards it was easier to just run your script again. Unfortunately when I did I ran into a number of erros during the install. I ended up having to re-install the OS template and run the script again.
Also, any possibility of adding remote vps setup? I would love to run this script from a central VPS and have it reach out (in batch mode fashsion) to a number of other VPS’s and set them up.
well currently remote setup is impossible. but if you play around bash scripts you maybe able to create it ! 🙂
Great installer
but
Need for margento!!
problem installing database connection error..
thats not a common error! Check your passwords! Database password is also the password that you supplied while installing. Also database administrator password is root on default!
its was innoDB mysql problem solve.
can you release with php 5.3.5
thank you
also APC + Memcache way better
LNMP 0.6 was out..but nothing new on that package..
for anyone who wants to upgrade the nginx version for lnmp, just try this:
wget soft.vpser.net/lnmp/upgrade_nginx.sh;sh upgrade_nginx.sh
./vhost.sh is not works properly.
Please write a tutorial ./vhost.sh and Domain panel, how to set that?
what is the problem that you getting?
needs lib-crypt and lib-mhash adding to the yum installs at the top of censos.sh
can you tell me what version of centos that you using?
5.5×86 64bit
its because the libmhash and libmcrypt links in your centos.sh script are 404’s
yum install libmhash-devel libmcrypt-devel
fixed it for me but you might want to fix those 404’s in the script
Thanks mate! Looks like someone removed those 2 files from my server because proper file permissions not set for those installation files. Now I have added permissions and 2 files.
Thanks again
this *should* fix all of the php not building comments.
for centos/rhel etc. not so sure about the other flavours
yes other using the same thing! Thanks again for pointing this problem! 🙂
sorry lib-crypt-devel and lib-mhash-devel
otherwise the build fails
Hello Kushira,
I have got the problem that many got here, the php not installing:
/usr/local/php/sbin/php-fpm: No such file or directory
How can i manually reinstall it
#more /etc/debian_version
6.0
Can i use apt-get install and which packages should i use ?
Thanks
Oops! I didnt had time to test this script with debian 6. Looks like it got problems. For now can you install debian 5 ( If you are using vps this will be easy) and after the installation update to debian 6? It will work for now. However Ill work on this to get it working with debian 6 but no ETA yet!
Thanks for mentioning this!
Thanks kushira for your fast response
But for example can you install nginx “manually” and then install php5 and with apt-get , whats the difference in installing with apt-get and the manually install ?
Greeting from france
Not much difference but with normal install you can have more custom with your choices while apt-get does predefined thing!
thank you for the auto installer
but when I go to mydomain.com/phpmyadmin and parsing .phpI got 502 Bad Gateway?
I’m using Debian 5 32bit
use debian 4 to install this and upgrade to debian 5 or 6 after installing. Or use ubuntu 10.04 which is same functioning as debian
hey, thanks for the great instructions. I have one small question. How do I get to the mysql console? I want to import a larger database that is to big for phpmyadmin.
when I try
mysql -u root -p mypass -h localhost databasename < sqlfile.sql
I get this error
bash: mysql: command not found
do you mind using bigdump? google it! very easy to use!
Hi Ruchira,
tis lnmp is running smooth on my wordpress with lowend traffic,
but when i tried to install in other box, wordpress with high traffic (400 online in the same time) it become slower and i get high load cpu from php-fpm.
can i see yout php-fpm setting for my example ruchira?
Thanks
give your server data before getting in to conclusion! I mean what are the specs of your server? And what are the mods you done to default php-fpm file?
it is xen vps with 512 memory..i only tried to incrase and decrase php max_children but still no change
Install memecached!
https://www.ruchirablog.com/memcached-wordpress/
https://www.ruchirablog.com/intergrating-memcached-to-wordpress/
There is no way 512MB handling 400 users at a time with wordpress fast like you expect if you not using memcached! Try memcached. if you have atleast 1000 posts you need to upgrade because your ram isnt much to handle memcached instance!
And if you are getting CPU loads less than 50% there is nothing to worry! Dont expect CPU loads to be like 0.1% when you have 400 users online at a time.
e1550 emi354638047593750
IMEI: 354638047593750
Entsperren / Unlock: 63729412
Flashen / Flash: 40798721
Upgrading to 10.10 breaks this, reloading lnmp I get “./lnmp: line 70: /usr/local/php/sbin/php-fpm: No such file or directory”. Also get a 502 on /phpmyadmin. Tried it 3 times.
actually I have tried upgrading to 10.10 months ago and nothing happened!
can you add xcache and memcached
Hello mate, great job with your script,
I have a question, I need to protect one of my folders with but can not find the
configuration sites-available , you can tell me where it is in debian or how to protect my folder htpassswd and file I have to change?
Cheers
hello sir,
i found this site through LEB discussion.
my question is, i have using LEB Nginx script. very easy to install wordpress.
my problem is, i can not install phpmyadmin.
i go to your script, i see phpmyadmin is support, but i dont see the command for installing wordpress.
how to install wordpress, do i need download wordpress installation?
thank you
you can download wordpress and use Filezilla to connect via SFTP and place wordpress files on the server! Its very very easy!
were should i place the files on the server? On /home/wwwroot/ ?
yess!
I keep on getting 502 Bad Gateway while trying to get into phpMyAdmin, clean Linode 512 VPS running Ubuntu 10.04.
Any ideas?
oops. Can you try using 9.04 and install LNMP then upgrade to 10.04? 10.04 isnt working because apt-get upgrade changed some files of old 10.04
Unfortunately Linode does not have Ubuntu 9.04. I might try Debian now.
just digged the linode manager and found that linode got 8.04 🙂 You can use it and then upgrade very easy to 10.04 LTS ! Im using Ubuntu 10.04 and I think its just small leap ahead of updates than Debian
502 Bad Gateway on Ubuntu 8.04…
thats really odd!
Hi, me again. I’ve tried With 8.04 again (after installing updates for it, but didn’t upgraded to 10.04) and the main domain I’ve used works (www.steamunpowered.com) but phpmyadmin still gives 502. The same goes for my other domain (www.stranded.eu).
What could be causing this? I’ve done everything according to the instructions…
this happens because some php libraries missing from the install! I need to investigate this problem and it takes time. Ill get in to it hopefully today and inform you!
My Web access to every number up to 200 people are often in very slow web online ask what I have to set parameters I had to install memcache
vps for my ram so I think 2GB chip I7 LNMP config somewhere by relatively low
hmmm I cant understand your comment!
I can increase my number to nginx to run faster when more people view site?
it will not do much difference if you dont have much CPU cores and RAM
ram 2Gb chip core I7 is enough?
whats your average simultaneous user amount? and do you getting any slow downs? Whats your web site?
whats your average simultaneous user amount? 100 – 200
and my site became very slow
502 Bad Gateway
please help me
i change fastcgi_pass unix:/tmp/php-cgi.sock to fastcgi_pass 127.0.0.1:9000;
is not work
why do you change that?
I think it will not lead to errors 502 Bad Gateway
Hello,
I’ve installed you’re Nginx Autoinstaller in a server 8 go of ram, double core of proc with debian 5 32 bits
It work fine, so thanks guy
I’ve tested it with debian 6 64 bits but the install was corrupted
I’ve just a little problem : the phpmyadmin isn’t installed How can I reinstall it properly please ?
If you got 8GB of ram why are you wasting your RAM? 8GB of ram doesnt supported by 32bit. PHPmyadmin got some problems. Please read other comments! you can try with ubuntu 9.04 or 10.04
The autoinstaller didn’t worked with the debian 6 64 bits. So I’ve tested with the debian 5 32 bits
I didn’t know that 32 bits don’t supported 8 go of ram : I’m confuse
how we can delete domain on nginx?
sorry for my bad english
its little bit complicated! But delete the files via SFTP and then delete the DNS entries on your domain! You wont get trouble!
hi ruchia
please Your email?
I want to ask you about Lnmp thanks
Hi, need to know how about installing php 5.2.17?
How can i update the PHPMyAdmin to latest version after setup of your script?
Also i need to update to latest Nginx as on Centos i got a very old version.
Thank you
error
./configure: line 30026: 6: Bad file descriptor
i installed it on debian 5
hi
how to update packages?
yum upgrade do not work!?
yum wont work on this as this install is a custom one! Yum will only work if we used yum to install files!
I installed on Centos 6 64bit is ok
but is possible to have the last version of all software
db mysql 5.5.
nginx 1.1.0
php 5.3.6
I use this to update nginx to 1.1.0
wget soft.vpser.net/lnmp/upgrade_nginx.sh;sh upgrade_nginx.sh
nginx: nginx version: nginx/1.1.0
=========================================================================
You have successfully upgrade from 0.7.67 to 1.1.0
=========================================================================
LNMP is tool to auto-compile & install Nginx+MySQL+PHP on Linux
But need to update mysql database
and php to last version
regards
did you do a good job.
@idglabs,
After nginx upgrade to 1.1 did you notice any improvements? have any issues?
Thanks.
The Debian/Ubuntu option is clearly broken. PHP is DoA.
CentOS works perfectly.
awesome work, but i am getting 404 errors on trying to download sqlite.bz2 file….. it has tried about 2 mirrors and not one seems to have that file
hmm did you tried lnmp.org mirror?
It seems broken now for Debian 5 🙁
Installed it several times last year with no issues but now it displays many errors like “./configure: line 17737 :5 :bad file descriptor ” and it hangs on “./configure: line 313 :5 :bad file descriptor”
anyone knows what’s up ?
Thanks.
yeah debian 5 latest updates might broke it! You can try http://www.lnmp.org auto installer. they have the newest one!
Thanks Ruchira, I really like your version tho 🙂
Are there any benefits or downfalls that you are aware of for running it on Centos insted of Debian?
Thanks.
absolutely no! There is no much difference. It depends on your flavor 🙂 I like Ubuntu most because its stable, easy to use, apt-get is really nice etc. https://www.ruchirablog.com/uptime.php 🙂 I’m running this blog on ubuntu 10.04 and you can see that im having nearly a year of uptime with it 🙂 Im having about 1500 visitors and 2000 page views a day and server load is not going beyond 2 on average! Which is really nice for XEN VPS with 512MB of ram.
But hey I have boxes running Centos too. and in my experience I found that centos cpu load is fluctuating than my ubuntu setups.
I guess I’ll try Centos since William reports that works still. I really would like to use Debian but have no choice unless it gets fixed or someone finds workaround.
hi ruchira, im trouble when i want to upload plugin, that need
Hostname
FTP Username
FTP Password
Connection Type
how to i configured this one??
thanks 🙂
you need to install FTP deamon to auto update and install plugins/themes/wordpress! You can search for guide to install FTP. Or you can go oldschool by manually upload updated plugins by overwriting old plugins! Thats what I do!
how do i configure the firewall?
# service iptables restart
give no result
#which iptables
/sbin/iptables
content of iptables seems not readable
how do i add rules if needed?
Once you’ve completed the steps in this post. Would you say that your server is secured enough for a Wordpress blog? I plan on switching to Linode and am considering using this as a tutorial to setting up my VPS. I was even thinking about dropping cPanel but I just fear for security.
The best example that you can see is this blog. If you need more security you can install more stuff additionally to this!
The script ran with no visible errors and phpmyadmin comes up properly. Was able to set up a database without any problems. This is our third attempt with setting up nginx on centos. This time we tried not to add a 2nd vhost, but rather place a magento install in the root to see if it would work. The enginx is installed page comes right up at http://96.45.117.141 but as soon as you visit http://96.45.117.141/index.php to load the install, it redirects to the install folder as it should, but then doesn’t show the index.php file, but a 404 instead. When you add the index.php to the url, the server returns “no input specified” http://96.45.117.157/index.php/install/index.php
I can not figure out what the problem is. This is directly following the auto-installer without modifying the conf file. Any insight would be greatly appreciated.
dude,
is it work on ns1. domain.com and ns2 ?
with godady we use dns manege and point ip to domain without host .
then this script will install dns with ns1 and ns2 of that domain ?
read my guide about dns! This will work fine on external dns setup!~
can we rename domain with ./vhost.sh ?i mean park doamin instead of add new domain
which works on /home/wwwroot NOT /home/wwwroot/domain.com
no you cant rename domains!
pureftp is in chinese language. How can I uninstall it?
arggg! Didnt saw that! 🙁 maybe there is a switch for language!
Hello,
i think a auto installer of nginx is a great thing. Thank you. I see after the installation your welcome screen, but I can not call phpmyadmin when i call 127.0.01/phpmyadmin oder locahost. I need your help (:
whats the error coming up?
liked this article Nginx Autoinstaller and i really don’t strive to be that individual… but i do believe maybe your blog could look a little bit better if you would have a litte red in it. Simply just my suggestion, truly appreciated the post otherwise 😛 Thanks, Flyg Till Erbil
hahah nice dude 🙂 Ill consider this when I build next design 🙂
Hi i got the following error when i tried restarting with /root/lnmp restart
Starting php_fpm Failed loading /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/eaccelerator.so: /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/eaccelerator.so: cannot open shared object file: No such file or directory
Failed loading /usr/local/ioncube/ioncube_loader_lin_5.3.so: /usr/local/ioncube/ioncube_loader_lin_5.3.so: undefined symbol: gc_remove_zval_from_buffer
done
Starting MySQL. ERROR! Manager of pid-file quit without updating file.
did you installed ioncube and eaccelerator? if then how? using the shell script or?
Thank for the reply but i got it to work by installing both of those manually. Because it seem that both of them were install but php.conf file keep pointing at the wrong directory.
I would like to know how is the way to configure several domains, like domain.com and domain2.com in nginx.conf configuration for this nginx auto installer?
my site is http://www.upload.co.id and I used your auto nginx…
need your adviser
read the post first!
hello ruchira, i have i7 processor with 16Gb RAM. my site always 502 bad gateway error when peak traffic.
my nginx conf : worker_processes 8; worker_connections 4096;
my php-fpm conf with : max_children : 5;
if I should added a limit of max_children like max_children : 50; to this problem ?
first try it at 10
Install succesfull
phpmyadmin and phpinfo.php work but not index.php Get white page….
Can you help me?
did you removed any files?
Problem fixed. I don’t know why but It’s Php 5.4.0 who give me the white page. I’m returned to php 5.3.10 and it’s work.
I need to use LDAP plugin with wordpress and need to have PHP built with LDAP, can you please tell me the steps, i tried changing the install script but still php was built without LDAP support ( added –with-ldap on line 338 of centos.sh)
thanks for sharing, its very usefull for me.
i have installed it sucessfully, but i have some question.
1. how to upgrade phpmyadmin?
2. can i use powerdns to set up its dns?
yes you can use powerdns.
How to install it?
Thanks for your article and package too 😀
It’s look like easier than before i install manually package 1 by 1 😀
Keep sharing bro 😉
Hi again, i have a question on how to install mail so i can send out forgot password mail and registration mail for my wordpress blog. Could you please teach me how this is done?
simple. just use “wp mail smtp” mail plugin its on wordpress plugins page. and then use your gmail account or google apps account SMTP settings on there 🙂 very easy 🙂
Thanks a lot i’ll try that out and see if it works ASAP.
Okay everything works great, thanks a lot for your help.
very nice, my vps only consumes 13% of 128mb ram and 3% 640mb of swap
This does not use a module that includes
if I may ask for further updates lnmp, there is a feature to update the database mysql and phpmyadmin
if I use the bandwidth of incapsula, how can I be setting up dns?
cname and ip of incapsula?
can work when I use cloudns? or can use the record of the domain registrar (enom)
yes you can update those things. I have no idea about incapsula never used or heard of it. you can use any providers DNS. just setup A records to your IP thats it.
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
Thats highly unlikely to be a problem of this. Check if the logins are correct on your SMTP server
SMTP login is correct , It’s not happening if I using lnmp0.8.
Weird! Maybe you should check the php functions that you use to send mails via smtp. PHP version is newer on 0.9
I did not do any editing at all on the package lnmp0.9 ,as well as lnmp0.8.
I was try on my IP.Board forum and WHMCS when I use lnmp0.9, smtp email facilities can not use. But if I using lnmp0.8 everything worked perfectly.
I’ve been using lnmp0.8 almost 2 years, This is very helpful to me personally 🙂
Hey, why the php mail function goes slowly? Any solution for this?
Thanks
Finally how to create email address and how to add webmail ??
Well im not facing any problems so far.
if you are talking about opcode cache im not getting that error! I have installed eaccelarator and using it to cache php. You can install it like me by using the single command that I gave you!
are you using debian or ubuntu? They dont come with yum. alternative is apt-get install
for ex- apt-get install wget
nginx.conf file is located on /usr/local/nginx/conf/nginx.conf
When adding domains via ./vhost.sh you can specify rewrite tools if you are adding domains for wordpress etc.
Thank you,
now your script automatically redirects non-www to www right? those rewrites are already in the script?
Just add new site/domain with www. right?
Thanks again.
yes!
Thank you so much,
Just couple of more questions 😉
does your script remove innodb support?
and how many sites can you successfully run on this script? (lets say on 512MB VPS)
I think you said this site is running on it, have you tried running more than one on this script?
Thanks.
Yes this doesnt include innodb support!
And how many sites is not the problem! You can run thousands of sites even on shared hosting but traffic is what to care about!
And if you got 512MB XEN VPS You can push 5TB of bandwidth without a problem! And I have ran loadimpact tests against this blog. Im also is on 512MB XEN VPS and my load never goes more than 30% during loadimpact! And it stays on about 1-1.5% on idle! https://www.ruchirablog.com/uptime.php