Install LEMP Stack (Nginx, MariaDB, php, phpMyAdmin) on Arch Linux & Manjaro

3) Install Nginx

By default you will get Nginx latest version on Arch Linux systems because of Rolling Release, so just fire the below command to install Nginx on Arch Linux. The default Nginx web root directory is /usr/share/nginx/html and main configuration file is located at //etc/nginx/nginx.conf

[Install Nginx]
$ sudo pacman -S nginx

[Start the Nginx service]
$ sudo systemctl start nginx.service

[Enable Nginx in boot]
$ sudo systemctl enable nginx.service

[Check Nginx Status]
$ sudo systemctl status nginx.service

Open your web browser and navigate to http://localhost/ or http://your-server-ip-address/ or
Now, You have successfully installed and configured Nginx on your Arch Linux system.

4) Install MariaDB

MariaDB is the default implementation of MySQL in Arch Linux, provided with the mariadb package , so just fire the below command to install it. MariaDB is open-source relational database management system (RDBMS) which is supporting database access. It’s robust, scalable, and reliable SQL server for high availability databases as free of cost.

[Install MariaDB]
$ sudo pacman -S mysql

Run the following command before starting the mysqld.service to initializes the MariaDB data directory, MariaDB installation directory and creates the system tables.

[Initializes the MariaDB data directory]
$ sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

[Start the MariaDB service]
$ sudo systemctl start mysqld

[Enable MariaDB in boot]
$ sudo systemctl enable mysqld

[Check MariaDB Status]
$ sudo systemctl status mysqld.service

About Magesh Maruthamuthu

Love to play with all Linux distribution

View all posts by Magesh Maruthamuthu

Leave a Reply

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