PhpMyAdmin is a popular web interface for web developers to manage MySQL databases. This tutorial will guide you through on how to install and secure PhpMyAdmin on your CentOS web server.
Pre-requisites
This guide assumes that you already have Apache and MySQL installed on your CentOS web server.
(Optional) Note that if you want to access PhpMyAdmin using SSL, then you will need to configure SSL certificate by referring to the following guide.
Setting up an SSL Secured Web Server with CentOS
1. Add EPEL Repositories
PhpMyAdmin is not included in CentOS packages, therefore you will need to add EPEL (Extra Packages for Enterprise Linux) to your web server.
cd ~ wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
(Optional) Run the following command to install wget if you haven’t install wget yet
sudo yum install wget
Command to install EPEL packages to your web server
sudo rpm -ivh epel-release*
Check that EPEL has been added to your repository
yum repolist
You should see the following
repo id repo name status base CentOS-6 - Base 6575 epel Extra Packages for Enterprise Linux 6 - x86_64 11746 extras CentOS-6 - Extras 38 updates CentOS-6 - Updates 159
Once done remove the respository configuration package
rm epel-release*
2. Download PhpMyAdmin
Command to download PhpMyAdmin
sudo yum install phpmyadmin
3. Configure PhpMyAdmin
Find your IP Address first
Then edit PhpMyAdmin config file
sudo nano /etc/httpd/conf.d/phpMyAdmin.conf
Modify the following 4 lines in the config file
. . . Require ip your_workstation_IP_address . . . Allow from your_workstation_IP_address . . . Require ip your_workstation_IP_address . . . Allow from your_workstation_IP_address . . .
Then save and close the config file
4. Open PhpMyAdmin in your Web Browser
Open the following url in your web browser
YOUR_IP_ADDRESS/phpmyadmin
That’s it you are done!
Feel free to contact me at [email protected] if you have any questions.
0 Comments