How to install LAMP Server on Manjaro Linux 0.8.10

This tutorial is going to show you how to install LAMP Server on Manjaro 0.8.10. LAMP Server is the package we need to turn Manjaro into a powerful web server with MariaDB or MySQL as the database backend, PHP, and Apache2 web server. Installing LAMP Server on Manjaro 0.8.10 is pretty easy. Please follow these steps to install LAMP Server on Manjaro 0.8.10.

This is a quick how to tutorial. For more information about LAMP or Manjaro, please visit the official website of those packages or distribution. Other version of Manjaro Linux also can use this tutorial to get LAMP Server up and running.

A. Install Apache2

First, we will install Apache2 on Manjaro 0.8.10. Open Terminal and login as root


Paste these commands to install Apache2

pacman -Sy
pacman -S apache


Now restart Apache2 server with this command

systemctl restart httpd

Next we will create a test page for the web server. Create a new file /srv/http/index.html.

nano /srv/http/index.html

Paste these lines to the new file:

Now open your web browser and type: http://localhost. You should see the following page displayed.

install apache on manjaro


B. Install MariaDB

Now we need to install MariaDB as the database backend. Use the following command to install MariaDB on Manjaro

pacman -S mariadb

C. Install PHP and PHP-Apache

Use the following command to install PHP and PHP-Apache package

pacman -S php php-apache

Next, we need to edit httpd.conf file

nano /etc/httpd/conf/httpd.conf

Add the following lines to it

Now we need to test if php is working correctly

nano /srv/http/info.php

Add the following lines

Restart apache

systemctl restart httpd

Now open web browser and type http://localhost/info.php

install php on manjaro

OK Now you have LAMP Server up and running on Manjaro Linux. Enjoy


One Comment

  1. Before the command:
    systemctl restart httpd

    I had to run the command:
    systemctl enable httpd

    Otherwise I got trouble (errors)

Leave a Reply

Your email address will not be published. Required fields are marked *