Quickest Easiest Way To Install LNMP Stack on CentOS and Ubuntu
| |Install Nginx, PHP, MySQL on CentOS and Ubuntu Easier with Auto Installer script – In this page I will tell you how to build Linux, Nginx, MySQL, and PHP on either CentOS or Ubuntu in much easier quicker way with the help of Nginx Auto Installer script by Ruchira. Previously I also posted how to the same thing using Tuxlite, an auto installer script for Ubuntu to get either Apache or Nginx installed easily. What’s the differences? Tuxlite is able to install Apache or Nginx (your choice) along with PHPMyAdmin, Varnish Cache, and WordPress while this new one is Nginx-only auto installer along with PHPMyAdmin, Eaccelerator, PureFTPd, VsFTPd, PHP Suhousin Patch, Memcached and Zend Optimizer. You can use it on debian/ubuntu/centos 32bit or 64bit.
How to Use Nginx Auto Installer?
Step 1 – Login to your server and follow my previous guide about Basic setup for CentOS or Ubuntu before you build a live web server. You may and may not follow that tutorial but if you followed, it will give you some basic security tweak to your server.
Before you proceed to the next steps, it is better to explain that all commands in this tutorial are written without the “sudo” prefix. However if you disabled root login and you logged in using another username with root privilege, you can add the “sudo” prefix all by your self. Alternatively you can simply type su, hit Enter and type in your password twice to switch login as root.
You may also need to type this command to go to the root directory:
cd ~
Step 2 – Now download the NGINX Auto Installer package using the wget command:
wget -c http://www.ruchirablog.com/downloads/lnmp0.9-full.tar.gz
screenshot:
Step 3 – Now unpack that package with this command:
tar zxvf lnmp0.9-full.tar.gz
Step 4 – Then go to that folder:
cd lnmp0.9-full
screenshot:
Step 5 – Finally, issue the magic command syntax to install the script:
For Ubuntu OS
sh ubuntu.sh
For CentOS:
sh centos.sh
For Debian:
sh debian.sh
In this guide I use CentOS 6.4 32-bit.
Step 6 – You’ll be asked some questions during install. Just answer them properly but make sure you know/remember with your answer (e.g: mysql root password, etc).
Upon hitting the last Enter key the installation process will begin. Just wait till it finishes.
Step 7 – Once done you’ll see this:
You can test it on your browser by typing domain name or ip address and you’ll see its test page:
F.A.Qs
LNMP files will be located on:
– mysql: /usr/local/mysql
– php: /usr/local/php
– nginx: /usr/local/nginx
– Site Directory: /home/wwwroot
– PHPMyAdmin will be located on http://yourip/phpmyadmin
Post Install
1 – How to install eAccelerator:
/eaccelerator.sh
2 – How to install IonCube:
/ionCube.sh
3 – How to install imageMagick:
/imageMagick.sh
4 – How to install MemCached:
/memcached.sh
5 – How to upgrade Nginx to latest version:
/upgrade_nginx.sh
6 – How to upgrade PHP to latest version:
/upgrade_php.sh
7 – How to add more domains (virtual hosts):
./vhost.sh
Enjoy..
Cheap Web Hosting Offer @ http://izyhost.com
mbak ini kelebihannya apa dibanding nginx yang paketan ? thx. salam kenal . ada FB mbak ?
It is easiest for beginners 🙂
http://servermom.wpengine.com/quickest-easiest-way-to-install-lnmp-stack-on-centos-and-ubuntu/746/
How much time it takes to install this.
after i start ubuntu install it asks
domain i put it
it askd mysql password – i put
then it asks innodb storage – i said yes/no both to see if it sppeds up
After that it keeps on compiling via gcc forever
Plz reply back
Cool guide and script Mom! I didn’t know about that script previously….handy 🙂
wow really great.. seriously i’ve been looking for this all-in-one script..
thanks for share…
how to optimize with wordpress..? sometime get error 505 when accesing permalink
how to set.. multipe domain with this script mom ?