howto setup lnmp on centOS

lnmp is an alternative setup to lamp. The difference between lamp & lnmp is the web server, lamp uses apache whereas lnmp uses nginx. lnmp stands for

  • Linux
  • Nginx
  • Mysql
  • Php

for this tutorial I used LNMP installer script/package written in linux shell (bash shell) for CentOS/RedHat, Debian/Ubuntu. lnmp is ideal for a low end vps for it’s ram savings, even a 128MB(+swap or burst) vps would be enough for a single site (tunning will be needed for most of the services)

After the installation you’ll have the following packages/software installed

  • Nginx
  • MySQL
  • PHP
  • PHPMyAdmin
  • Zend Optimizer
  • eAccelerator (optional)
  • Nginx-RRD
  • vsFTPD (optional)
  • pureftpd (optional)


fetch the latest release
extract the archive
and run the installation script

tar -xzvf lnmp0.7.tar.gz
cd lnmp0.7
./ | tee lnmp.log

enter your domain

Please input domain:

after that you’ll be asked for the root mysql password

Please input the root password of mysql:

press any key to start the installation

Press any key to start...

you’ll have to wait for about 30minutes for the installation to end



your public web dir :  /home/wwwroot

phpmyadmin url :


to add a new virtual host just run



optional packages

to install eaccelerator (from the installation directory)


to install ioncube (from the installation directory)


to install pureftp (from the installation directory)


to install vsftpd (from the installation directory)


Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.