Complete Install Lighttpd Stack Under 15 Minutes On CentOS
Lighttpd is another alternative to Apache and Nginx for those who are seeking speed of a web server without sacrificing performance. This is perfect to run on a low resource server a.k.a low end vps. Previously, I explained step by step tutorial guiding newbie how to install Lighttpd web server on CentOS box but this is the quickest easiest way to install Lighttpd, MariaDB mysql and PHP 5 (php-fpm) on CentOS 7. Done under 15 minutes.
Nginx vs Lighttpd? I believe both has similar performance (and both is faster than Apache) but honestly saying I still prefer Nginx because it has larger amount of users and active community. So, me personal opinion tells you to not using Lighttpd on a production server if you are not planning to learn deeper about it.
In this tutorial I use (or you’ll need):
- A server running CentOS 7. In this guide I use a 512MB DigitalOcean‘s droplet running CentOS 7 x86_64 minimal.
- SSH client. I use Putty but using Terminal on Mac or Linux should be also fine.
- Basic knowledge of common Linux shell command.
- A cup of coffee and about 15 spare time.
Easy Install Lighttpd on CentOS 7
This tutorial will make use of Lighttpd autoinstaller script that will execute needed command and tasks to download and install Lighttpd stack including MariaDB mysql server and PHP5 with fpm. The script is originally posted at FreeVPS.
Step 1 – Login to your server and follow my previous guide about Basic setup for CentOS 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.
Step 2 – Now type this command and hit Enter to issue:
wget http://apps.singul4rity.com/fvps/centos7-llmp.sh -O - |bash
It should automatically start the Lighttpd autoinstaller script:
Step 3 – The script should finish quickly. In my example it was finished under 5 minutes (around 3 minutes) and once done you’ll see something similar like this:
Step 4 – So now you have full LLMP stack installed (Linux, Lighttpd, MySQL, and PHP). What next to do is to setup mysql root password by issuing this command:
For more explanation about this topic you can read my previous guide. Pic:
That’s it. Now you have full LLMP stack installed on your server and ready to use. Here some details after installation:
PHP 5 version: 5.4.16
Lighttpd version: 1.4.35
Used Memory After Install: As you can see that it consumes very low memory so it can also run on low end box running at least 128MB or RAM.
You can try accessing your newly installed LLMP stack on your browser:
That’s it and enjoy!
Glad you like my LLMP script but you should update the URL in your article.
The new URL is http://lxmpstacks.ga/dl/centos7-llmp.sh