How to Install phpMyAdmin on Rocky Linux – Guide

Databases are considerably easier to manage from a GUI. If you have migrated your CentOS servers to Rocky Linux, you may want to install phpMyAdmin. Jack Wallen shows you how. If you are a database administrator and need to manage MySQL or MariaDB on your data center servers, you know the benefits of having a good GUI to make the task a little more efficient. And if your servers have migrated from CentOS to Rocky Linux, you might be a little worried about getting such a GUI up and running. Do not worry. There is always phpMyAdmin. The problem with phpMyAdmin is that installation on Rocky Linux (and most RHEL clones) is not as simple as on Ubuntu. But I will help you with this. after going through it tutorial, you will have phpMyAdmin up and running in a minute

what will you need

To install phpMyAdmin you will need a running Rocky Linux instance and a user with sudo privileges. That’s it. Let’s go to work.

How to install Apache and MySQL

Before installing the web and database server, make sure you update Rocky Linux with: After the update is complete, reboot (if the kernel is updated) and install the web server with:

How to install PHP

Now we need to install PHP, which is done in a very different way than Ubuntu. First, let’s redefine the php module with:

How to download and unzip phpMyAdmin

Next, we will download the phpMyAdmin file with the command: wget https://files.phpmyadmin.net/phpMyAdmin/5.1.1/phpMyAdmin-5.1.1-all-languages.zip Be sure to check the official download page to ensure you are downloading the latest version. Unzip the file with: unzip phpMyAdmin – * – all-languages.zip If unzip is not installed, install it with: sudo dnf install unzip -y Move and rename the newly created directory with: sudo mv phpMyAdmin – * – all languages ​​/ usr / share / phpmyadmin

How to configure phpMyAdmin

for our next trick, let’s configure phpMyAdmin. Change to phpmyadmin directory with: cd / usr / share / phpmyadmin Copy the sample configuration file with the command: Sudo mv config.sample.inc.php config.inc.php Now we need to generate a 32-bit secret string with: openssl rand -base64 32 Copy the resulting string. Open the phpMyAdmin configuration file with the command: sudo nano config.inc.php In this file, look for the line: $cfg[‘blowfish_secret’] = ”; Paste the 32-bit secret string between the two single quotes. Scroll down to the save / load file server section directories and add the following line: $cfg[‘TempDir’] = ‘/tmp’; Save and close the file. Create a new tmp directory and give everything the necessary permissions / ownership with the following commands: sudo mkdir / usr / share / phpmyadmin / tmp sudo chown -R apache: apache / usr / share / phpmyadmin sudo chmod 777 / usr / share / phpmyadmin / tmp

How to create an apache configuration file

Our next step is to create an Apache configuration file with the command: sudo nano /etc/httpd/conf.d/phpmyadmin.conf In this file, paste the following: Alias ​​​​/ phpmyadmin / usr / share / phpmyadmin

AddDefaultCharset UTF-8

Apache 2.4

require all granted

Apache 2.4

require all granted

Save and close the file.

How to set SELinux policies

In order for SELinux to allow traffic to the alternate location (/usr/share/phpmyadmin), we need to alert it. To do this, issue the command: sudo chcon -Rv –type = httpd_sys_content_t / usr / share / phpmyadmin / * Restart Apache with the command: sudo systemctl restart httpd

How to access the phpMyAdmin web interface

Now everything should be ready to use. Open a web browser and point it to http: // SERVER / phpmyadmin (where SERVER is the IP address of your hosting server) and you will be prompted for login credentials. Congratulations, you’ve just installed phpMyAdmin on Rocky Linux, to ease MySQL database administration. Please share this article if you like it!

Final note

I hope you like the guide How to Install phpMyAdmin on Rocky Linux. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.

How to Install phpMyAdmin on Rocky Linux  2022  - 35How to Install phpMyAdmin on Rocky Linux  2022  - 84How to Install phpMyAdmin on Rocky Linux  2022  - 22How to Install phpMyAdmin on Rocky Linux  2022  - 46