How to install phpMyAdmin on Rocky Linux 2021

0

This tutorial covers how you can install phpMyAdmin on Rocky Linux. We will do our best to make sure you understand this guide. I hope you will like this blog How to install phpMyAdmin on Rocky Linux. If your answer is yes, please share after reading this.

Check out how you can install phpMyAdmin on Rocky Linux

Databases are considerably easier to manage from a graphical interface. If you have migrated your servers from CentOS to Rocky Linux, you might want to install phpMyAdmin. Jack Wallen shows you how.

If you are a database administrator and need to manage MySQL or MariaDB on your datacenter servers, you know the benefit of having a good graphical interface to make your job a little more efficient. And if your servers have migrated from CentOS to Rocky Linux, you might be a little worried about having such a working GUI. Do not worry. There is always phpMyAdmin.

The problem with phpMyAdmin is that installing on Rocky Linux (and most RHEL clones) is not as easy as on Ubuntu. But I’ll help you with that. Once you have gone through this tutorial, you will have phpMyAdmin up and running in a minute.

What you will need

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

How to install Apache and MySQL

Before installing the web and database server, be sure to update Rocky Linux with:

Once the update is complete, reboot (if the kernel is up to date) then 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 restart the php module with:

How to download and unzip phpMyAdmin

Then 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

Make sure to check the official download page to make sure you are downloading the latest version.

Unzip the archive 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 tip, we’ll configure phpMyAdmin. Navigate to the 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 that file, find the line:

$ cfg[‘blowfish_secret’] = “;

Paste the 32-bit secret string between the two single quotes.

Scroll down to Directories to save / download files from the server section and add the following line:

$ cfg[‘TempDir’] = ‘/ tmp’;

Save and close the file.

Create a new tmp directory and give each one the necessary permissions / properties 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 everything granted

#Apache 2.4

Require everything granted

Save and close the file.

How to configure SELinux policies

In order for SELinux to allow traffic to the alternate location (/ usr / share / phpmyadmin), we need to signal it. To do this, run 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 go. 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 to enter your login credentials.

Congratulations, you have just installed phpMyAdmin on Rocky Linux, to facilitate the management of the MySQL database.

On the web www.techrepublic.com

Final words: How to install phpMyAdmin on Rocky Linux

hope you will understand this item How to install phpMyAdmin on Rocky Linux, if your answer is no, you can request anything through the contact forum section linked to this article. And if your answer is yes, then share this article with your family and friends.


Source link

Leave A Reply

Your email address will not be published.