• WordPress
  • cPanel
  • Softaculous
  • KVM Virtualization
  • Vmware Virtualization
  • Proxmox
Sunday, June 15, 2025
LinuxBoost
  • Home
  • Almalinux
  • CentOS
  • Debian
  • Fedora
  • Ubuntu
  • Red Hat Enterprise Linux
  • Rocky Linux
  • OpenSUSE
  • Arch Linux
  • Oracle Linux
No Result
View All Result
LinuxBoost
  • Home
  • Almalinux
  • CentOS
  • Debian
  • Fedora
  • Ubuntu
  • Red Hat Enterprise Linux
  • Rocky Linux
  • OpenSUSE
  • Arch Linux
  • Oracle Linux
LinuxBoost
  • Home
  • Almalinux
  • CentOS
  • Debian
  • Fedora
  • Ubuntu
  • Red Hat Enterprise Linux
  • Rocky Linux
  • OpenSUSE
  • Arch Linux
  • Oracle Linux

How to Install phpMyAdmin on Arch Linux

in Arch Linux, Linux OS
How to Install phpMyAdmin on Arch Linux

phpMyAdmin is a widely-used, web-based tool for managing MySQL and MariaDB databases. It offers an intuitive interface for database administrators, making it easy to perform operations such as creating, modifying, and deleting databases, tables, and users. In this tutorial, we will walk you through the process of how to install phpMyAdmin on your Arch Linux system.

Prerequisites

Before we start, make sure you have the following installed and configured on your Arch Linux system:

  1. MySQL or MariaDB: Ensure you have either MySQL or MariaDB installed and running.
  2. Apache or Nginx: A web server like Apache or Nginx must be installed and configured.
  3. PHP: Ensure PHP is installed and configured to work with your web server.

How to Install phpMyAdmin on Arch Linux

Install phpMyAdmin

First, we need to install phpMyAdmin from the Arch Linux repository. Open your terminal and run the following command:

sudo pacman -S phpmyadmin

This command will install phpMyAdmin and its dependencies on your system.

Configure phpMyAdmin on Arch Linux

Next, we need to configure phpMyAdmin to work with your web server. In this tutorial, we will cover the configuration process for both Apache and Nginx.

Apache

  1. Create a symbolic link to the phpMyAdmin configuration file:
sudo ln -s /etc/webapps/phpmyadmin/apache.example.conf /etc/httpd/conf/extra/phpmyadmin.conf

Edit the Apache configuration file /etc/httpd/conf/httpd.conf and include the phpMyAdmin configuration file by adding the following line at the end of the file:

Include conf/extra/phpmyadmin.conf

Restart the Apache web server to apply the changes:

  1. sudo systemctl restart httpd

Nginx

  1. Create a symbolic link to the phpMyAdmin configuration file:bash
sudo ln -s /etc/webapps/phpmyadmin/nginx.example.conf /etc/nginx/sites-available/phpmyadmin.conf

Create another symbolic link to enable the phpMyAdmin site:

sudo ln -s /etc/nginx/sites-available/phpmyadmin.conf /etc/nginx/sites-enabled/phpmyadmin.conf

Edit the Nginx configuration file /etc/nginx/nginx.conf and include the phpMyAdmin configuration file by adding the following line inside the http block:

include sites-enabled/*;

Restart the Nginx web server to apply the changes:

sudo systemctl restart nginx

Configure PHP

In order to use phpMyAdmin, you must enable the mysqli extension in your PHP configuration. Edit the /etc/php/php.ini file and uncomment the following line (remove the semicolon at the beginning of the line):

extension=mysqli

Finally, restart your web server to apply the changes:

  • For Apache:bash
sudo systemctl restart httpd

For Nginx:

sudo systemctl restart nginx

Secure phpMyAdmin with .htaccess (Apache only)

If you are using Apache, you can add an extra layer of security by restricting access to the phpMyAdmin installation using an .htaccess file. To do this, follow the steps below:

  1. Open the /etc/httpd/conf/extra/phpmyadmin.conf file and add the following lines inside the <Directory> block:css
AllowOverride All

Restart the Apache web server to apply the changes:

sudo systemctl restart httpd

Create an .htaccess file inside the /usr/share/webapps/phpmyadmin directory:

sudo nano /usr/share/webapps/phpmyadmin/.htaccess

Add the following lines to the .htaccess file, replacing your-username and your-password with your desired credentials:

AuthType Basic
AuthName "Restricted Access"
AuthUserFile /usr/share/webapps/phpmyadmin/.htpasswd
Require valid-user

Save and close the .htaccess file.

Install the apache-tools package to use the htpasswd command:

sudo pacman -S apache-tools

Create an .htpasswd file with the specified username and password:

sudo htpasswd -c /usr/share/webapps/phpmyadmin/.htpasswd your-username 

You will be prompted to enter and confirm the password for the user.

Access phpMyAdmin using Web Browser

Now that phpMyAdmin is installed and configured, you can access it via your web browser by visiting http://your-server-ip-or-domain/phpmyadmin. If you have configured .htaccess for Apache, you will be prompted for the username and password you specified earlier.

Once logged in, you can start managing your MySQL or MariaDB databases using the user-friendly phpMyAdmin interface.

Conclusion

In this tutorial, we have demonstrated how to install and configure phpMyAdmin on Arch Linux with both Apache and Nginx web servers. By following these steps, you should now have a fully functional phpMyAdmin installation to manage your MySQL or MariaDB databases with ease. For more information on managing your Arch Linux system, be sure to check out other helpful tutorials at LinuxBoost.

ShareTweet
Previous Post

How to Install PHP on Arch Linux

Next Post

How to Install Git on Arch Linux

Related Posts

How to Install Tomcat on Rocky Linux

How to Install Apache Tomcat on Rocky Linux

How to Set up NTP Server on Rocky Linux

How to Set up NTP Server on Rocky Linux

How to Install Bacula Backup Server on Rocky Linux

How to Install Bacula Backup Server on Rocky Linux

Leave a Reply Cancel reply

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

Golden Host VPS
  • Privacy Policy
  • Terms and Conditions
  • About Us
  • Contact Us

Copyright © 2023 linuxboost.com All Rights Reserved.

  • Privacy Policy
  • Terms and Conditions
  • About Us
  • Contact Us

Copyright © 2023 linuxboost.com All Rights Reserved.