Configure phpmyadmin nginx centos 7

Configure phpmyadmin nginx centos 7

phpMyAdmin is a free, open source and web interface based database management tool for managing MySQL and MariaDB. You can manage MySQL databases, user accounts and privileges, import and export data and much more using phpmyadmin interface. This guide will help you to install phpMyAdmin with Nginx on CentOS 7.

Prerequisites

  • Logged in on CentOS server as non-root user account with sudo privileges.
  • Ensure that LEMP (Linux, Nginx, MySQL and PHP) stack is installed on your CentOS system.

We strongly recommended to access your phpMyAdmin installation over HTTPS connections to prevent from unecessary attacks. If your domain is not secure with an SSL/TLS certificate, you can Follow this guide to Secure Nginx with Let’s Encrypt on CentOS.

Installing phpMyAdmin with Nginx on CentOS

At first, We will enable EPEL repository to install phpMyAdmin from EPEL repository. phpMyAdmin package is not available on CentOS 7 core repositories. Run below command:

sudo yum install epel-release

Once EPEL repository enabled you can install the phpMyAdmin and it’s dependencies with the below command:

sudo yum install phpmyadmin

Wait until installation finished. After that we will create a symbolic link to access phpMyAdmin interface from installation files. We are linking it to our document root directory by typing:

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

Next, We should also need to restart our PHP processor to take effects:

sudo systemctl restart php-fpm

phpMyAdmin installation is completed and now you can open it.

Accessing phpMyAdmin

You can access the phpMyAdmin interface by open web browser and type your server’s public IP address or domain name followed by /phpmyadmin:

https://ip_address_or_your_domain/phpmyadmin

Log in to the interface with the administrative username and password which you created on previous step and hit on Go button.

Configure phpmyadmin nginx centos 7

When you log in, you’ll see the phpMyAdmin user interface, which will look something like this:

Configure phpmyadmin nginx centos 7

Conclusion

Finally, you have successfully installed phpMyAdmin with Nginx on CentOS 7 system. If you have any questions or suggestions feel free to leave a comment below.

If our content helps you, please consider buying us a coffee

Configure phpmyadmin nginx centos 7

Thank you for your support.

  • Configure phpmyadmin nginx centos 7

  • Configure phpmyadmin nginx centos 7

  • Configure phpmyadmin nginx centos 7

In today’s guide we will teach you on how to install and configure phpMyAdmin Manually on CentOS 7 with Nginx & PHP-FPM running inside the machine.

As we know that to do database management easily we can take advantage of free open-source software tools such as phpMyAdmin and Adminer. Without these two tools, we should be familiar with the MySQL or MariaDB variable system through the command line interface.

phpMyAdmin is a free open-source software tool written in PHP language. phpMyAdmin is intended to handle the administration of MySQL or MariaDB over the Web-based interface. It supports a wide range of operations on MySQL and MariaDB. Frequently used operations (managing databases, tables, columns, relations, indexes, users, permissions, etc) can be performed via the graphical user interface or GUI. While you still have the ability to directly execute any SQL statement via CLI or command line interface only.

Before moving into the installation procedure make sure to meet the following requirements:

PREREQUISITES:

* VPS, CLoud or Bare Metal
* Running under distro CentOS 7
* Must have NGINX and PHP-FPM installed on the machine
* Superuser Privileges (Root Access)
* Server IPv4 Address & Its Password
* Gnome Terminal for Linux Desktop
* PuTTy SSH Client for Windows or MacOS

1.) Let’s Download phpMyAdmin

First of all please directly download the latest stable release of phpMyAdmin using wget command.

$ cd /usr/share
$ wget https://files.phpmyadmin.net/phpMyAdmin/5.2.0/phpMyAdmin-5.2.0-all-languages.zip

2.) Extract phpMyAdmin Archive File

Then you can extract the phpMyAdmin-5.2.0-all-languages.zip file using the unzip command.

$ unzip phpMyAdmin-5.2.0-all-languages.zip

3.) Move phpMyAdmin Installation Directory

After that we can move the “phpMyAdmin-5.2.0-all-languages” installation directory to phpmyadmin directory.

$ mv phpMyAdmin-5.2.0-all-languages phpmyadmin

4.) Create A Symbolic Link

Create a symbolic link between your phpMyAdmin folder or directory to the public folder or documents root of your NGINX web server or your domain’s docs root (in cPanel WHM it’s called public_html), using the following two command lines.

$ ln -s /usr/share/phpmyadmin /usr/share/nginx/html
$ ln -s /usr/share/phpmyadmin /var/www/yourdomain.com/public

Make sure to replace yourdomain.com with your actual domain names if you want to run phpMyAdmin under yourdomain.com.

5.) Restart NGINX and PHP-FPM

After that you can restart both the NGINX web server and PHP-FPM services.

$ service nginx restart
$ service php-fpm restart

6.) Access your phpMyAdmin

Finally you can access phpMyAdmin for the first time at the following URL:

>> http://server_IPv4_address/phpmyadmin

OR

>> https://yourdomain.com/phpmyadmin

CONCLUSION:

Installing and configuring phpMyAdmin manually on CentOS 7 is quite easy. Simply follow the instructions above and you will then have phpMyAdmin installed on your VPS or Cloud Server with a CentOS 7-based distro. This is very useful for those of you who are new to or not familiar with the command lines on the Linux operating systems, but you need a Graphical User Interface (GUI) in order to manage your database.