phpMyAdmin is a free software tool written in PHP that is intended to handle the administration of a MySQL or MariaDB database server. You can use phpMyAdmin to perform most administration tasks, including creating a database, running queries, and adding user accounts. In this article, we are going to learn how to install phpMyAdmin on CentOS Stream 9. So, let’s get started.
Checkout the phpMyAdmin Project Here.
Try this wiki on our VPS. Starting at just $5/month with 24x7 In-house customer support.
A system with CentOS Stream 9 installed and running.
rootaccess to the system.
Once you're all set, we'll proceed with phpMyAdmin installation and configuration.
MariaDB is a popular database server. The installation is simple and requires just a few steps as shown.
dnf install mariadb-server mariadb -y systemctl start mariadb systemctl enable mariadb systemctl status mariadb
First, we install the EPEL (Extra Packages for Enterprise Linux) repository,
dnf config-manager --set-enabled crb dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm dnf install https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm
Finally, we install the phpMyAdmin package, Using the following command:
dnf install phpmyadmin
phpMyAdmin inserts it's own configuration into the Apache webserver (httpd), to load this new configuration we restart httpd,
systemctl restart httpd
Edit file phpMyAdmin.conf
And replace at the top :
<Directory /usr/share/phpMyAdmin/> AddDefaultCharset UTF-8 <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> #Require ip 127.0.0.1 #Require ip ::1 Require all granted </RequireAny> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1 </IfModule> </Directory>
Now, press the
Esc key, and type in
:wq! and press the
Enter key to save and exit the file.
Now, restart & check the apache with the following commands:
systemctl restart httpd systemctl status httpd
Now open the IP with /phpmyadmin from your browser, this will redirect you to the phpMyAdmin.
220.127.116.11with the actual IP or domain configured on the server.
Demo screenshot for phpMyadmin:
Now you have successfully installed phpMyAdmin on CentOS Stream 9.