Introduction
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.
Prerequisites
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://
example.com or http://
your_server_ip. You will get this:
If is there any error, open /etc/lighttpd/lighttpd.conf
$nano /etc/lighttpd/lighttpd.conf
And change
$server.use-ipv6 = "enable"
To
$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:
$mysql_secure_installation
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:
$nano /etc/php-fpm.d/www.conf
Change user and group from apache
to lighttpd
as below:
Close file by pressing CTRL+X
, type 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
Conclusion
You have successfully installed LLMP Stack (Linux, Lighttpd, MariaDB, and PHP) on CentOS 7. Now you can run websites and servers.
0 COMMENTS