LLMP Stack is an open-source platform that is used to run web sites and servers. LLMP also based in the name it includes Linux for OS, Lighttpd for a web server, MariaDB for Data Management and PHP for programming language. LLMP is fast and secure, and its the best alternative of LAMP and LEMP Stack.
In this article, we will explain to you How To Install Linux, Lighttpd, MariaDB, PHP(LLMP) Stack on CentOS 7.
Before you begin, you will need:
- Create a new Instance with CentOS 7
Step 1 - Install Lighttpd
To install it, we need to enable Epel repositories because Lighttpd is not available in CentOS 7. First, install the Epel repository:
yum install epel-release
Now Lighttpd is available, and you can install it by running this command:
yum install lighttpd
After, enable and start the lighttpd web server:
systemctl enable lighttpd systemctl start lighttpd
To check if Lighttpd is working open your browser and go to
http://your_server_ip. You will get this:
If is there any error, open /etc/lighttpd/lighttpd.conf
server.use-ipv6 = "enable"
server.use-ipv6 = "disable"
Restart webserver to take changes:
systemctl restart lighttpd
Step 2 - Install MariaDB
Now, we will install MariaDB for the database management system. To install run:
yum install mariadb mariadb-server
After, start and enable MariaDB:
systemctl start mariadb systemctl enable mariadb
Now, its recommended to run MariaDB secure installation script:
We have just installed MariaDB so just hit enter because we haven't the root password yet. To set the root password type Y and press Enter, after type password two times: After, you will get four question that you need to answer, answer by your preferences:
You have successfully installed MariaDB on CentOS 7.
Step 3 - Install PHP
Now, we need to install PHP as a programming language and some PHP modules. You can install PHP and a group of PHP modules by running this command:
yum install php lighttpd-fastcgi php-fpm php-gd php-mysql php-cli php-xml php-pdo php-imap php-xmlrpc php-pear
After, we need to change the PHP configuration file because it is designed for Apache by default:
Change user and group from
lighttpd as below:
Close file by pressing
Y to save and hit Enter.
Now, start and enable PHP:
systemctl start php-fpm systemctl enable php-fpm
To check if PHP is working properly, run:
systemctl status php-fpm
You have successfully installed LLMP Stack (Linux, Lighttpd, MariaDB, and PHP) on CentOS 7. Now you can run websites and servers.