Install and Configure phpMyAdmin with Nginx on CentOS 7

Published on April 12, 2019 46 sec read

Today, I’ll show you how to Install and Configure phpMyAdmin with Nginx on CentOS 7. Let’s follow these steps:

Step 1 : Login to Server

At first, we need to login to our server via SSH. Open your terminal and run this command:

ssh [email protected] -p PORT

Step 2 : Install phpMyAdmin

First, we need to install EPEL repository. By typing this command, install EPEL repository if not installed:

sudo yum install epel-release

After installing EPEL repository, now we can install phpMyAdmin by typing this command:

sudo yum install phpmyadmin

We have successfully installed phpMyAdmin to our server. We need to create a symbolic link from the installation files to our Nginx document root directory. Hit this command:

sudo ln -s /usr/share/phpMyAdmin /usr/share/nginx/html

Now, restart the PHP processor:

sudo systemctl restart php-fpm

To access the phpMyAdmin interface type this on a browser:


Step 3 : Configure phpMyAdmin

If you notice an error like this ‘needs blowfish_secret passphrase‘, then you need to add blowfish_secret to the phpMyAdmin configuration file.

Open /usr/share/nginx/html/phpMyAdmin/libraries/config.default.php and add a secret passphrase here:

$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */  

You can use this tool to generate the passphrase BLOWFISH PASSWORD HASH GENERATOR.

That’s it. Thank you.


Hey, I'm Md Obydullah. I build open-source projects and write on Laravel, Linux server, modern JavaScript and more on web development.


Leave a Reply

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