Question

How To Install and Secure phpMyAdmin with Nginx on a CentOS 8

Posted July 1, 2020 1.2k views
CentOS 8

How To Install and Secure phpMyAdmin with Nginx on a CentOS 8.2 server

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

Hello, @muradhuseynli1234

The process will be actually almost the same as the one for the CentOS 7 droplet. We already have an article on how to install and secure the phpMyAdmin installation on LEMP stack server.

What you can do is to first follow our tutorial on how to set Linux, Nginx, MySQL, PHP (LEMP) Stack on CentOS 8 - https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-centos-8 as this part of the prerequisites

Also you need to complete the initial Server Setup Guide for CentOS 8 -

https://www.digitalocean.com/community/tutorials/initial-server-setup-with-centos-8

Once this is done you can go ahead with the Step One — Install phpMyAdmin from the CentOS 7 guide - https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-with-apache-on-a-centos-7-server

The process should be the same for the CentOS 8 droplet as well.

Hope that this helps!

Regards,
Alex

by Justin Ellingwood
While many users require access to a database management system like MySQL or MariaDB, not all users feel comfortable interacting with the SQL prompt on a daily basis. In this guide, we'll discuss how to install and secure phpMyAdmin, a web management interface for MySQL and MariaDB, on a CentOS 7 server. We will leverage the Apache web server for this guide.

sudo yum install phpmyadmin dont working

  • Hello, @muradhuseynli1234

    Could you please provide me with the output of the command? You can also download phpMyAdmin and install it manually:

    First, download the latest version of phpMyAdmin to the Apache web root directory using the following command:

    cd /var/www/html
    wget https://files.phpmyadmin.net/phpMyAdmin/4.9.4/phpMyAdmin-4.9.4-all-languages.zip

    Once downloaded, unzip the downloaded file with the following command:

    unzip phpMyAdmin-4.9.4-all-languages.zip

    Next, rename the extracted directory to phpmyadmin as shown below:

    mv phpMyAdmin-4.9.4-all-languages phpmyadmin

    Next, change the ownership of the phpmyadmin directory to the apache user:

    chown -R apache:apache /var/www/html/phpmyadmin

    Next, rename the config.sample.inc.php file:

    cd /var/www/html/phpmyadmin
    mv config.sample.inc.php config.inc.php

    Next, edit the file and define your secure password:

    vim config.inc.php

    Find the line below and update with your secure password, as shown below:

    $cfg['blowfish_secret'] = 'your-secure-password';

    Save and close the file. Then, import the tables for phpMyAdmin with the following command:

    mysql < sql/create_tables.sql -u root -p

    Hope that helps!

    Regards,
    Alex

Submit an Answer