How to install LAMP Server on Arch Linux 2017 Server

Hello, today we will show you how to install LAMP Server on Arch Linux 2017 Server. Please don’t get confuse with the term I used here. Arch Linux Server refers to a headless Arch Linux with no Desktop Environment installed. We want to try how this Arch Linux performs as a server on a working environment. We believed that Arch Linux is a rock solid distribution and its not only great for Desktop but also for Server use. Installing LAMP Server on Arch Linux wasn’t hard. All packages are available in Pacman repository. With a little efforts, we can have a powerful web server on top of Arch Linux.

Before we go through the installation steps, you may want to check out our other tutorial to install LAMP Server on other distributions below:

LAMP stands for Linux Apache MySQL/MariaDB and PHP. After we have LAMP Server on Arch Linux, we can then install some appliance such as Owncloud, Nextcloud, Pydio, and many more.

Steps to install LAMP Server on Arch Linux 2017

  • Install Apache web server
  • Install MySQL Server (MariaDB)
  • Install PHP

Step 1. Install Apache web server on Arch Linux

Now start and enable Apache


Now open a web browser and point it to the Arch Linux IP address. You should see something like this

install lamp server on arch linux

Step 2. Install MariaDB Server

Now install MariaDB with the following command


After installing MariaDB, execute the following command first. Otherwise, you will get error when trying to enable the service.

Secure MySQL installation


Step 3. Install PHP

Use this command to install PHP on Arch Linux


So now we have installed Apache, MySQL and PHP. And now we have a fully functioning LAMP Server. We hope this article is useful for you who want to build a web server on Arch Linux. Thanks to read the tutorial how to install LAMP Server on Arch Linux 2017 and stay tuned on this blog to get more article like this.


After installing PHP, we need to configure it, otherwise it will not work properly.

Add the following lines to the conf file

Next, comment the following line

#LoadModule mpm_event_module modules/

Next uncomment the following line

LoadModule mpm_prefork_module modules/

Finally restart httpd service

systemctl restart httpd

That’s it.


  1. Got this message:
    httpd: Syntax error on line 538 of /etc/httpd/conf/httpd.conf: Cannot load modules/ into server: /etc/httpd/modules/ cannot open shared object file: No such file or directory

1 Trackback / Pingback

  1. Arch Linux Tutorial - How to install Owncloud 10 on Arch Linux 2017

Leave a Reply

Your email address will not be published.