Nginx Autoinstaller

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.

trans Nginx AutoinstallerThis 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 http://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 icon smile Nginx Autoinstaller Just answer for the questions when you run ./vhost.sh

new lnmp Nginx Autoinstaller

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!

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! icon smile Nginx Autoinstaller
 Nginx Autoinstaller

Enter your email address:
I'm Ruchira Sahan and all posts on this blog are completely my thoughts and writings. I love DIY and Technology. So feel free to contact me for anything about this blog and don't forget to add a comment if this blog helped you! Thanks
 Nginx Autoinstaller
Ruchira
View all posts by Ruchira
  • http://buzzknow.com buzzknow

    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

    • http://www.ruchirablog.com Ruchira

      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,

    • http://joglohosting.com JH

      Hi,
      I found this Nginx installation script for Centos,
      Try centmin provided by BTCentral
      http://www.btcentral.org.uk/projects/centmin/

      • http://www.ruchirablog.com Ruchira

        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

  • http://newbieshare.com newbie site

    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

    • http://www.ruchirablog.com Ruchira

      Its just very easy friend! Just issue ./vhost.sh command! And enter the domain you are ready to go! :)

  • http://www.keephide.us keephide

    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..

    • http://www.ruchirablog.com Ruchira

      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!

  • Nnyan

    Is it possible to convert this so that it makes all/most of the additional items optional?

    • http://www.ruchirablog.com Ruchira

      eaccelerator , ftp deamons, ioncube are optional! But you can remove other things if you edit the code too!

      • Ruchira

        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?

        • http://www.ruchirablog.com Ruchira

          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 :)

          • Nnyan

            Very nice indeed! Any thought on adding Cherokee as an option to Nginx?

            • http://www.ruchirablog.com Ruchira

              cherokee doesn’t have functionality like nginx. And not compatible with many modules like nginx.

          • Nnyan

            Any idea how I go about using a bare bones VPS running this script with Google Apps for Domains for email?

            • http://www.ruchirablog.com Ruchira

              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. http://www.ruchirablog.com/setup-dns-with-godaddy/

              Same thing applies to other dns providers also! :) Its very easy to use google apps with this!

  • http://buzzknow.com buzzknow

    Hi Ruchira …

    does it work on debian 64 bit?

    my vps doesnt have debian 32 bit :(

    thanks

    • http://www.ruchirablog.com Ruchira

      Yes it works on debian 64bit! :)

    • http://www.boniface.me Joshua B.

      I can confirm this works fine as well. Great script Ruchira!

      • http://www.ruchirablog.com Ruchira

        Thanks Joshua! :) And which OS that you used?

  • http://buzzknow.com buzzknow

    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 :D

    • http://www.ruchirablog.com Ruchira

      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 http://www.ruchirablog.com/upload-files-without-ftp/

      to restart ftp “service ****** restart” will do the trick!

  • http://www.keephide.us keephide

    @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.

    • http://www.ruchirablog.com Ruchira

      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? ;) :P

  • http://www.keephide.us keephide

    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.)

    • http://www.ruchirablog.com Ruchira

      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. :)

  • http://www.keephide.us keephide

    @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..

    • http://www.ruchirablog.com Ruchira

      Did you created new user on the admin panel of ftp deamon? If yes it should automatically restart the ftp deamon!

  • http://www.murshed.net Fahim Murshed

    Its nice tutorial. Thank you

  • Moshe

    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

    • http://www.ruchirablog.com Ruchira

      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 !

      • Moshe

        Great – thanks. I’m going to give it a try.

        All the best,

        Moshe

        • http://www.ruchirablog.com Ruchira

          Dont forget to update us after installing! :) best wishes with your new fast nginx web server :)

  • http://www.keephide.us keephide

    Bro, please write tutorial about setup nameserver :)

  • http://www.keephide.us keephide

    Bro, please write tutorial about setup nameserver on nginx :)

    • http://www.ruchirablog.com Ruchira

      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 http://www.ruchirablog.com/setup-dns-with-godaddy/ Other registrars like name.com has free dns facility for their clients also! :)

  • Sam

    Hi,

    is it tested spyware free?

    -Sam

    • http://www.ruchirablog.com Ruchira

      what kind of spyware are you talking at? :P Im using same installation to run this blog :)

  • http://www.r3z4prof.me r3z4prof

    hi ruchira, how can i changing server header??
    thanks :)

    • http://www.ruchirablog.com Ruchira

      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.

  • http://www.keephide.us keephide

    Ruchi, i wanna edit html error page, where can i find it?

    • http://www.ruchirablog.com Ruchira

      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! :)

  • http://www.bayoe.web.id bayoewebid

    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.

    • http://www.ruchirablog.com Ruchira

      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! :)

      • http://www.bayoe.web.id bayoewebid

        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!!!

        • http://www.ruchirablog.com Ruchira

          strange whats your OS?

          • http://www.bayoe.web.id bayoewebid

            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 ?

            • http://www.bayoe.web.id bayoewebid

              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.. :)

  • riyan

    Hello Ruchira,

    Thank you for this tutorial, its very help me.
    btw would you give me easy tutorial to install ffmpeg.

    Regards

    Riyan

    • http://www.ruchirablog.com Ruchira

      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! :)

  • sandoz

    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”

    • http://www.ruchirablog.com Ruchira

      Can you tell me when do you got this error? in the installation or ?

  • sandoz

    no, when i try to visit phpmyadmin default install of phpinfo.php

    • http://www.ruchirablog.com Ruchira

      please be specific whats default install of phpinfo.php? and whats your ubuntu version?

  • sandoz

    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”

    • http://www.ruchirablog.com Ruchira

      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!

  • sandoz

    hmm, it was a fresh install
    but ok, ill try it

  • sandoz

    do you install 10.04 server or desktop?

    • http://www.ruchirablog.com Ruchira

      Its server edition! :) Why should I need Desktop edition? :P

  • sandoz

    ok
    and what packages do you install when you install the system?
    I assume none?

    • http://www.ruchirablog.com Ruchira

      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?

  • sandoz

    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”

    • http://www.ruchirablog.com Ruchira

      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

  • http://d-and-x.net cloksin

    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?

    • http://www.ruchirablog.com Ruchira

      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- http://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! :)

      • http://d-and-x.net cloksin

        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.

        • http://www.ruchirablog.com Ruchira

          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

          • http://d-and-x.net cloksin

            When I try to do that I get this error line 70: /usr/local/php/sbin/php-fpm: No such file or directory

  • sander

    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 …

    • http://www.ruchirablog.com Ruchira

      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? :)

  • riyan

    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

    • http://www.ruchirablog.com Ruchira

      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! :)

  • riyan

    Im sorry I m use debian 5.32bit for my mechine vps

  • http://www.minitheatre.org/ Dregond Rahl

    What DNS server is it using? NSD or BIND ? Also would it be possible to use Percona ? http://www.percona.com/software/percona-server/

    • http://www.ruchirablog.com Ruchira

      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!

      • http://www.minitheatre.org/ Dregond Rahl

        Any recommended external DNS servers ? any idea about percona ?

        • http://www.ruchirablog.com Ruchira

          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!

          • http://www.minitheatre.org/ Dregond Rahl

            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

            • http://www.ruchirablog.com Ruchira

              did you entered the domain name when prompted by LNMP?

  • http://www.myarcade.ws/ Marl

    Tried it using Ubuntu and works fine. But using 150MB memory, anyone?

  • http://www.myarcade.ws/ Marl

    Nevermind. Lowered php-fpm max_children value and now I’m at 80. :)

    • http://www.ruchirablog.com Ruchira

      of course! :)

  • http://newbieshare.com Newbie

    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.

    • http://www.ruchirablog.com Ruchira

      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?

  • http://newbieshare.com Newbie Site

    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 :D

  • http://murshed.net Fahim

    why show error 502!

    http://gournadi.tk/phpmyadmin/

    • http://www.ruchirablog.com Ruchira

      Looks like you wiped it before i took a look! :)

  • http://popgasm.info egi

    i saw you’re using w3 total cache..can you show me how nginx.conf for w3 total cache?..i’m really confuse.thanks

    • http://www.ruchirablog.com Ruchira

      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

  • http://sharedumb.com dani

    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

    • http://www.ruchirablog.com Ruchira

      This looks like rare problem. Please run
      /root/lnmp status

      and post result here!
      Thanks

      • dani

        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

        • http://www.ruchirablog.com Ruchira

          Oh you forgot to add the permalink redirects :)

          • dani

            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

            • http://www.ruchirablog.com Ruchira

              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

              • dani

                i use w3 total cache too..

              • http://www.ruchirablog.com Ruchira

                Well im not facing any problems so far.

  • Exone

    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,

    • http://www.ruchirablog.com Ruchira

      looks like your server failed to download the php .tar file. Best option is to try installing again on clean server :)

  • http://woothy.com Woothy

    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

    • http://www.ruchirablog.com Ruchira

      What do you mean by mail function?

      • http://woothy.com Woothy

        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

        • http://www.ruchirablog.com Ruchira

          well you can configure exim or use this simple wordpress plugin to send mail with your gmail or google apps account- WP-Mail-SMTP

  • http://www.bayoe.web.id bayoewebid

    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– http://www.ruchirablog.com/nginx/php-5.2.14-fpm-0.5.14.diff.gz
    Resolving http://www.ruchirablog.com...

    • http://www.ruchirablog.com Ruchira

      Does it hangs saying resolving http://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

      • http://www.bayoe.web.id bayoewebid

        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.

        • http://www.ruchirablog.com Ruchira

          :)

  • http://www.xenbox.net xen box

    thanks for the script. i try to install it. i hope this run smooth

  • nima

    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

    • http://www.ruchirablog.com Ruchira

      You dont need to setup NS records in this case! Whats your domain registrar?

  • popism

    got /root/lnmp: line 70: /usr/local/php/sbin/php-fpm: No such file or directory
    on centos 5 32bit

    • http://www.ruchirablog.com Ruchira

      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

      • popism

        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

        • http://www.ruchirablog.com Ruchira

          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!

  • nima


    Ruchira:

    You dont need to setup NS records in this case! Whats your domain registrar?

    tnx from your reply. my domain register is resellerclub

    • http://www.ruchirablog.com Ruchira

      Does your DNS registrar offer free DNS service? Godaddy and name.com offers that!

  • Rain

    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

    • http://www.ruchirablog.com Ruchira

      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 http://www.ruchirablog.com ! Hope you can understand!

  • Lady Marmalade

    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?

    • http://www.ruchirablog.com Ruchira

      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 :)

  • nima

    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 ?

    • http://www.ruchirablog.com Ruchira

      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!

  • nima


    Ruchira:

    Does your DNS registrar offer free DNS service? Godaddy and name.com offers that!

    please check this service. you mean:
    http://img.graphicno.com/files/z15uslzeu251umnjc3a5.jpg

    • http://www.ruchirablog.com Ruchira

      I cant view that image! says its banned!

  • nima


    Ruchira:

    I cant view that image! says its banned!

    sorry.
    here you are
    http://i54.tinypic.com/20gmlqo.jpg

  • nima

    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

    • http://www.ruchirablog.com Ruchira

      strange! Can you try using ubuntu or debian?

  • http://www.cekpr.com spam

    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

    • http://www.ruchirablog.com Ruchira

      thats little bit complicated! You need to configure your Linux OS for this. Please search google!

  • http://www.myarcade.ws/ Marl

    Hey mate, how do i remove an added domain? also the directory created, just an rm -rf?

    • http://www.ruchirablog.com Ruchira

      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! :)

  • http://www.bayoe.web.id bayoewebid

    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

    • http://www.ruchirablog.com Ruchira

      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?

  • john

    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?

    • http://www.ruchirablog.com Ruchira

      its not ok :( It means that php isnt installed successfully! Whats your OS?

  • http://www.myarcade.ws Marl

    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.

    • http://www.ruchirablog.com Ruchira

      did you added permalink rewrites to nginx.conf?

  • http://www.myarcade.ws/ Marl

    Manually? No. But chosed wordpress rw on ./vhost.sh installer. Do have to do it manually?

    • http://www.ruchirablog.com Ruchira

      can you access to your blog? and are you using permalinks?

      • http://www.myarcade.ws/ Marl

        Yes I can, and permalinks works fine. However the wp admin panel options gives that error whenever I access them.

        • http://www.ruchirablog.com Ruchira

          actually that error happens when there is no such file! How many virtual hosts are there in your installation?

          • http://www.myarcade.ws/ Marl

            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.

            • http://www.ruchirablog.com Ruchira

              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! :)

              • bagus

                have you solved this? I get the same error on my dashboard

              • http://www.ruchirablog.com Ruchira

                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!

  • john

    working fine on Debian lenny..
    but still have problem starting the pureftpd >.<

    • http://www.ruchirablog.com Ruchira

      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.

  • http://www.gournadi.com Fahim Murshed

    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.

    • http://www.ruchirablog.com Ruchira

      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!

  • http://www.gournadi.com Fahim Murshed

    Main problem, My Domain provider is Uk2 Group / ResellBiz.

    Another thing is, How to upgrade WordPress Plug-in without FTP account.

    • http://www.ruchirablog.com Ruchira

      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! :)

  • http://www.google.com null

    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

    • http://www.ruchirablog.com Ruchira

      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

  • nima

    how can we use it only for ftp ? i mean without any domain ,,,, ,the problem is how create ftp user

    • http://www.ruchirablog.com Ruchira

      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://www.google.com null
    • http://www.ruchirablog.com Ruchira

      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?

      • http://www.google.com null

        yes I tried reinstall 3 times same result

        where I can set suhosin
        I see in php.ini does not exist

        • http://www.google.com null

          my os debian

        • http://www.ruchirablog.com Ruchira

          you can try installing suhosin but its not a must. Search google there are many reviews!

  • http://simplerain.com Dovy

    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?

    • http://www.ruchirablog.com Ruchira

      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 :)

      • http://simplerain.com Dovy

        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!

  • nima


    Ruchira:

    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.

    how can i find that guide ? sTNX

    • http://www.ruchirablog.com Ruchira

      Google is your friend! :) Its very easy if you are using debian or ubuntu!

  • http://gournadi.com Fahim Murshed

    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.

    • http://www.ruchirablog.com Ruchira

      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. :)

      • http://www.gournadi.com Fahim Murshed

        Its works nice and super sonic speed web server :p

        I am adding few command on nginx.conf

        Thanks for suggestion.

  • Rifat Wahid Alif

    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.

    • http://www.ruchirablog.com Ruchira

      whats your LNMP version and OS? :) of course its possible to change time zone you can google about this!

  • http://www.r3z4prof.me r3z4prof


    john:

    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?

    i got this too ruchira, how must i do?? im using Ubuntu 10.04 i386 minimal T_T

    • http://www.ruchirablog.com Ruchira

      try default OS without minimal. there should be some libraries missing on minimal

  • ruvs

    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!

    • http://www.ruchirablog.com Ruchira

      can you try this on centos 5.5?

      • nima

        same problem for me on centos final ver 32bit

        • http://www.ruchirablog.com Ruchira

          :( 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!

          • nima

            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 ?

            • http://www.ruchirablog.com Ruchira

              yes of course. Use ./debian.sh on my script for debian use ./ubuntu.sh for ubuntu OS.

              • nima

                -bash: wget: command not found
                root@dlshowti:~# yum install wget
                -bash: yum: command not found

              • http://www.ruchirablog.com Ruchira

                are you using debian or ubuntu? They dont come with yum. alternative is apt-get install
                for ex- apt-get install wget

            • http://www.gournadi.com Fahim Murshed

              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.

              • http://www.ruchirablog.com Ruchira

                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.

  • http://www.r3z4prof.me r3z4prof

    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

    • http://www.ruchirablog.com Ruchira

      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

  • http://elggfactory.com/features.php Damir-ElggFactory

    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.

    • http://elggfactory.com/features.php Damir-ElggFactory

      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.

      • http://www.ruchirablog.com Ruchira

        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/ :)

    • http://www.ruchirablog.com Ruchira

      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!

      • http://elggfactory.com/features.php Damir-ElggFactory

        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.

        • http://www.ruchirablog.com Ruchira

          well looks like you didnt read the post! Adding virtual hosts is very simple in this! just run ./vhost.sh command!

          • http://elggfactory.com/features.php Damir-ElggFactory

            I understand that but which file I need to add rewrite rule for non-www ?

            Thanks.

            • http://www.ruchirablog.com Ruchira

              No when adding the domain add it with www. then it will work fine!

              • http://elggfactory.com/features.php Damir-ElggFactory

                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.

              • http://www.ruchirablog.com Ruchira

                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.

              • http://www.elggfactory.com/ Damir-ElggFactory

                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.

              • http://www.ruchirablog.com Ruchira

                yes!

              • http://www.elggfactory.com/ Damir-ElggFactory

                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.

              • http://www.ruchirablog.com Ruchira

                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! http://www.ruchirablog.com/uptime.php

  • http://www.r3z4prof.me r3z4prof


    Ruchira:

    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

    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

    • http://www.ruchirablog.com Ruchira

      You arent using lnmp because I can see that there is BIND running and it doesnt even included with lnmp.

  • http://www.r3z4prof.me r3z4prof

    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 :)

    • http://www.ruchirablog.com Ruchira

      Whats your OS and who is your VPS provider? Are you using centos install bundled with kloxo?

  • http://www.r3z4prof.me r3z4prof

    im using debian 32bit, my vps provider are frantech.ca company. im not install anything, just OS reload, and then install your script

    • http://www.ruchirablog.com Ruchira

      can you try ubuntu?

  • Armando

    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?

    • http://www.ruchirablog.com Ruchira

      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

  • http://simplerain.com Dovy

    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. ;)

    • http://www.ruchirablog.com Ruchira

      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 :)

  • http://www.r3z4prof.me r3z4prof

    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??

    • http://www.ruchirablog.com Ruchira

      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!

    • http://muncang.com egi

      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

      • http://www.ruchirablog.com Ruchira

        English please! :)

  • http://muncang.com egi

    ruchira,
    can you tell me how to set up a cron job on lnmp?
    i need it to empty my lnmp logs automatically..
    thanks

    • http://www.ruchirablog.com Ruchira

      it depends on your os not on lnmp :P 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 :)

      • http://muncang.com egi

        Thanks Ruchira

  • http://www.elggfactory.com/ Damir-ElggFactory

    Ruchira,

    Have you used eAccelerator with this?

    If I install it and have problems, how would I disable or uninstall it?

    Thanks.

    • http://www.ruchirablog.com Ruchira

      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! :)

      • http://www.elggfactory.com/ Damir-ElggFactory

        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.

  • http://www.elggfactory.com/ Damir-ElggFactory

    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.

    • http://www.ruchirablog.com Ruchira

      if you can see it on phpinfo file its working! You dont have to any additional things!

  • http://www.r3z4prof.me r3z4prof

    @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

    • http://www.ruchirablog.com Ruchira

      I got your message! Looking in to it now!

  • http://www.elggfactory.com/ Damir-ElggFactory

    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.

    • http://www.ruchirablog.com Ruchira

      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.

      • http://www.elggfactory.com/ Damir-ElggFactory

        here is the link
        http://www.e-deal.info/phpinfo.php

        It created eaccelerator-cache folder as well but nothing in it.

        Thanks.

        • http://www.ruchirablog.com Ruchira

          did you issued

          /root/lnmp restart

          after installing it?

          • http://www.elggfactory.com/ Damir-ElggFactory

            yes I did.

  • Trazx

    strange
    I get the same error, where php doesn’t isntall.

    I have ubuntu 10.04 on a zen operating system…

    strange error…

    • http://www.ruchirablog.com Ruchira

      Well, Install Ubuntu 9.04 and run the script! Then upgrade to ubuntu 10.04 by running

      apt-get upgrade

      :)

  • Trazx

    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 :)

  • bagus

    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

    • http://www.ruchirablog.com Ruchira

      yes it might be a problem with wrong permalinks!

  • http://www.webnoob.it atthila

    can i translate your post in italian? i’ll give all credits to you!thanks

    • http://www.ruchirablog.com Ruchira

      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! :)

  • http://muncang.com egi

    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

    • http://www.ruchirablog.com Ruchira

      what are you running in port 8011? Did you modified ports on nignx.conf?

      • http://muncang.com egi

        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;

        • http://muncang.com egi

          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

  • bagus

    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)

    • http://www.ruchirablog.com Ruchira

      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!

  • http://www.elggfactory.com/ Damir-ElggFactory

    Ruchira,

    is there a way to configure this script to use TCP port instead of php.sock ?
    What files need changing?

    Thanks.

    • http://www.ruchirablog.com Ruchira

      actually why do you want to change that? You wont see much difference on that on Linux systems.

      • http://www.elggfactory.com/ Damir-ElggFactory

        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.

        • http://www.ruchirablog.com Ruchira

          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?

          • http://www.elggfactory.com/ Damir-ElggFactory

            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.

  • http://www.elggfactory.com/ Damir-ElggFactory

    Ruchira,

    just install fresh on 512MB vps and when I import database in phpMyAdmin I get “504 Gateway Time-out” error?

    Any thoughts?

    • http://www.ruchirablog.com Ruchira

      increase your keep-alive timeout limit if your upload takes too much time!

  • http://linksnappy.com bilal

    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

    • http://www.ruchirablog.com Ruchira

      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!

  • frean

    not working, php files not open

  • JaRo

    Thanks man! It’s pretty awesome :) Full automatic installation – that’s what I love :D

    • http://www.ruchirablog.com Ruchira

      kudos! :)

  • http://www.olivierlebreton.com/ Oliver

    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 !

  • Zarafolas

    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?

    • http://www.ruchirablog.com Ruchira

      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!

  • http://www.wpsparkle.com Jacqueline

    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.

  • http://www.bayoe.web.id bayoewebid

    hi ruchira,
    can we login as wwwroot instead of root ?

    • http://www.ruchirablog.com Ruchira

      No it doesnt have proper privileges !

  • Nnyan

    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).

    • http://www.ruchirablog.com Ruchira

      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. :)

      • Nnyan

        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.

        • http://www.ruchirablog.com Ruchira

          404 Not Found

          The server can not find the requested page:

          serversreview.net/latest-stable-version-nginx-0-8-54-with-php-5-3-5 (port 80)

          Please forward this error screen to serversreview.net’s WebMaster.
          Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at serversreview.net Port 80

          ;)

          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!

          • Nnyan

            Thanks for the info! I sent an email to the webadmin and website is back up.

  • Nnyan

    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?

  • Bayu

    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.

    • http://www.ruchirablog.com Ruchira

      No nothing is problematic! Next time commenting be sure to use your name not urls! I found your comment on spam queue!

  • Nnyan

    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.

    • http://www.ruchirablog.com Ruchira

      well currently remote setup is impossible. but if you play around bash scripts you maybe able to create it ! :)

  • LOse

    Great installer
    but
    Need for margento!!
    problem installing database connection error..

    • http://www.ruchirablog.com Ruchira

      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!

      • LOse

        its was innoDB mysql problem solve.
        can you release with php 5.3.5
        thank you

        • LOse

          also APC + Memcache way better

  • egi

    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

  • Tai Pe N

    ./vhost.sh is not works properly.

    Please write a tutorial ./vhost.sh and Domain panel, how to set that?

    • http://www.ruchirablog.com Ruchira

      what is the problem that you getting?

  • me

    needs lib-crypt and lib-mhash adding to the yum installs at the top of censos.sh

    • http://www.ruchirablog.com Ruchira

      can you tell me what version of centos that you using?

      • callum

        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

        • http://www.ruchirablog.com Ruchira

          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

          • callum

            this *should* fix all of the php not building comments.

            • callum

              for centos/rhel etc. not so sure about the other flavours

              • http://www.ruchirablog.com Ruchira

                yes other using the same thing! Thanks again for pointing this problem! :)

  • me

    sorry lib-crypt-devel and lib-mhash-devel

  • me

    otherwise the build fails

  • khal

    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

    • http://www.ruchirablog.com Ruchira

      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!

      • khal

        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

        • http://www.ruchirablog.com Ruchira

          Not much difference but with normal install you can have more custom with your choices while apt-get does predefined thing!

  • http://www.bitpoin.com denir

    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

    • http://www.ruchirablog.com Ruchira

      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

  • Dan

    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

    • http://www.ruchirablog.com Ruchira

      do you mind using bigdump? google it! very easy to use!

  • egi

    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

    • http://www.ruchirablog.com Ruchira

      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?

  • egi

    it is xen vps with 512 memory..i only tried to incrase and decrase php max_children but still no change

    • http://www.ruchirablog.com Ruchira

      Install memecached!
      http://www.ruchirablog.com/memcached-wordpress/
      http://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.

  • gazy

    e1550 emi354638047593750

    • http://www.ruchirablog.com Ruchira

      IMEI: 354638047593750

      Entsperren / Unlock: 63729412
      Flashen / Flash: 40798721

  • Mike McGhee

    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.

    • http://www.ruchirablog.com Ruchira

      actually I have tried upgrading to 10.10 months ago and nothing happened!

  • onel0ve

    can you add xcache and memcached

  • TioPepe

    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

  • http://www.cintanet.org pain

    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

    • http://www.ruchirablog.com Ruchira

      you can download wordpress and use Filezilla to connect via SFTP and place wordpress files on the server! Its very very easy!

      • Jose

        were should i place the files on the server? On /home/wwwroot/ ?

        • http://www.ruchirablog.com Ruchira

          yess!

  • stranded

    I keep on getting 502 Bad Gateway while trying to get into phpMyAdmin, clean Linode 512 VPS running Ubuntu 10.04.

    Any ideas?

    • http://www.ruchirablog.com Ruchira

      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

      • stranded

        Unfortunately Linode does not have Ubuntu 9.04. I might try Debian now.

        • http://www.ruchirablog.com Ruchira

          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

  • stranded

    502 Bad Gateway on Ubuntu 8.04…

    • http://www.ruchirablog.com Ruchira

      thats really odd!

      • stranded

        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…

        • http://www.ruchirablog.com Ruchira

          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!

  • http://www.joinebook.com atulaus

    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

    • http://www.ruchirablog.com Ruchira

      hmmm I cant understand your comment!

      • http://www.joinebook.com atulaus

        I can increase my number to nginx to run faster when more people view site?

        • http://www.ruchirablog.com Ruchira

          it will not do much difference if you dont have much CPU cores and RAM

          • http://www.joinebook.com atulaus

            ram 2Gb chip core I7 is enough?

            • http://www.ruchirablog.com Ruchira

              whats your average simultaneous user amount? and do you getting any slow downs? Whats your web site?

              • http://www.joinebook.com atulaus

                whats your average simultaneous user amount? 100 – 200
                and my site became very slow

  • http://www.joinebook.com atulaus

    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

    • http://www.ruchirablog.com Ruchira

      why do you change that?

      • http://www.joinebook.com atulaus

        I think it will not lead to errors 502 Bad Gateway

  • dante

    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 ?

    • http://www.ruchirablog.com Ruchira

      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

      • dante

        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

  • pandjie

    how we can delete domain on nginx?
    sorry for my bad english

    • http://www.ruchirablog.com Ruchira

      its little bit complicated! But delete the files via SFTP and then delete the DNS entries on your domain! You wont get trouble!

  • http://www.joinebook.com atulaus

    hi ruchia
    please Your email?
    I want to ask you about Lnmp thanks

  • shaifful

    Hi, need to know how about installing php 5.2.17?

  • Dimitris

    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

  • gepe

    error
    ./configure: line 30026: 6: Bad file descriptor
    i installed it on debian 5

  • reza

    hi
    how to update packages?
    yum upgrade do not work!?

    • http://www.ruchirablog.com Ruchira

      yum wont work on this as this install is a custom one! Yum will only work if we used yum to install files!

  • http://www.idglabs.net idglabs

    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.

    • http://www.elggfactory.com/ Damir-ElggFactory

      @idglabs,
      After nginx upgrade to 1.1 did you notice any improvements? have any issues?
      Thanks.

  • William

    The Debian/Ubuntu option is clearly broken. PHP is DoA.

    CentOS works perfectly.

  • Matthew

    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

    • http://www.ruchirablog.com Ruchira

      hmm did you tried lnmp.org mirror?

  • http://www.elggfactory.com/ Damir-ElggFactory

    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.

    • http://www.ruchirablog.com Ruchira

      yeah debian 5 latest updates might broke it! You can try http://www.lnmp.org auto installer. they have the newest one!

      • http://www.elggfactory.com/ Damir-ElggFactory

        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.

        • http://www.ruchirablog.com Ruchira

          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. http://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.

  • http://www.elggfactory.com/ Damir-ElggFactory

    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.

  • http://www.r3z4prof.me r3z4prof

    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 :)

    • http://www.ruchirablog.com Ruchira

      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!

  • http://wuzzap.net gunnzolder

    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?

  • Chris

    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.

    • http://www.ruchirablog.com Ruchira

      The best example that you can see is this blog. If you need more security you can install more stuff additionally to this!

  • RJ

    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.

  • nima

    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 ?

    • http://www.ruchirablog.com Ruchira

      read my guide about dns! This will work fine on external dns setup!~

  • nima

    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

    • http://www.ruchirablog.com Ruchira

      no you cant rename domains!

  • peter

    pureftp is in chinese language. How can I uninstall it?

    • http://www.ruchirablog.com Ruchira

      arggg! Didnt saw that! :( maybe there is a switch for language!

  • Jens

    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 (:

    • http://www.ruchirablog.com Ruchira

      whats the error coming up?

  • http://www.squidoo.com/resorres91 Flyg Till Erbil

    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 :P Thanks, Flyg Till Erbil

    • http://www.ruchirablog.com Ruchira

      hahah nice dude :) Ill consider this when I build next design :)

  • Andy

    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.

    • http://www.ruchirablog.com Ruchira

      did you installed ioncube and eaccelerator? if then how? using the shell script or?

      • Andy

        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.

  • http://www.upload.co.id Erick

    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

    • http://www.ruchirablog.com Ruchira

      read the post first!

  • popo

    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 ?

    • http://www.ruchirablog.com Ruchira

      first try it at 10

  • Hoggart Simon

    Install succesfull
    phpmyadmin and phpinfo.php work but not index.php Get white page….
    Can you help me?

    • http://www.ruchirablog.com Ruchira

      did you removed any files?

      • Hoggart Simon

        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.

  • Kailash Sharma

    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)

  • http://satriahost.com/ Arif A

    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?

    • http://www.ruchirablog.com Ruchira

      yes you can use powerdns.

      • http://satriahost.com/ Arif A

        How to install it?

  • Chairul

    Thanks for your article and package too :D
    It’s look like easier than before i install manually package 1 by 1 :D

    Keep sharing bro ;)

  • Echiomega

    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?

    • http://www.ruchirablog.com Ruchira

      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 :)

      • Echiomega

        Thanks a lot i’ll try that out and see if it works ASAP.

        • Echiomega

          Okay everything works great, thanks a lot for your help.

  • http://hy1p.com/ DeathBat6661

    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)

    • http://www.ruchirablog.com Ruchira

      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.

  • Axl Mait

    Mod_rewrite not work

    • http://www.ruchirablog.com Ruchira

      its nginx not apache

  • Nadeem Qureshi

    Where is the sites-available?

    • http://www.ruchirablog.com Ruchira

      you dont need to edit that! read the description first and ask the questions!

  • http://www.bloggingbite.com BloggingBite.com

    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.

  • vasil

    / eaccelerator.sh
    Where to write these commands?

    • http://www.ruchirablog.com Ruchira

      on your ssh console

    • unkn0wn

      Very good autoinstaller :-)
      I’ll finish all steps tomorrow…

      thank you for provide this free information!

  • Karam

    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

  • unkn0wn

    Very good autoinstaller :-)
    I’ll finish all steps tomorrow…

    thank you for provide this free information!

  • unkn0wn

    So, to add a new domain i just need to ./vhost.sh

    And for delete it?

    • http://www.myliteraturetechlife.com Webhosting blog

      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

  • Amy

    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

  • Tran Duc

    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 ?

  • irawanto

    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

    • http://www.ruchirablog.com Ruchira

      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

  • carlos

    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

  • http://wdnec.com imran

    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

  • nima

    Ruchira can u update it to newer version of php and nginx ? also ftp ?

    • hebrew878

      @nima goto http://lnmp.org official site and the latest version is 0.9

  • Mike

    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

  • http://lazaac.com Lazaac

    thanks.. i like updated stuff :)

  • NeoLizzard

    ^^ 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 :D

    • http://www.ruchirablog.com Ruchira

      glad I helped :)

  • http://www.facebook.com/profile.php?id=510485448 Jean-Philippe Murray

    Just before doing anything, is there a way to deinstall everything easily?

    • RuchiraBlog

      Nope there is no easy way like ” apt-get remove” since these packages are compiled and installed on your system

  • Narender

    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

  • http://www.okenesia.com eko

    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

    • http://www.ruchirablog.com Ruchira

      Sorry I didnt got you?

  • Chathula

    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.. :D

    • http://www.ruchirablog.com Ruchira

      Its very easy. Just add a A record from the domain panel pointing to your server IP

      • Chathula

        i added it.. does it take some time???

        check out this scrren shot..

        http://www.anony.ws/i/2013/05/13/wbOu.png

        • http://www.ruchirablog.com Ruchira

          name of the A record should be “www” (without quotes) not your domain name

          • Chathula

            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????

            • http://www.ruchirablog.com Ruchira

              ah then the domain panel is designed that way. No problems with that. just add with www and it will work

  • RuchiraBlog

    Thats highly unlikely to be a problem of this. Check if the logins are correct on your SMTP server

    • Jullie Baresta

      SMTP login is correct , It’s not happening if I using lnmp0.8.

      • RuchiraBlog

        Weird! Maybe you should check the php functions that you use to send mails via smtp. PHP version is newer on 0.9

        • Jullie Baresta

          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 :)

  • Matt

    Hey, why the php mail function goes slowly? Any solution for this?

    Thanks

  • Matt

    Finally how to create email address and how to add webmail ??