Pages

Banner1

Monday 5 June 2017

How To Install and phpMyAdmin in Linux


Step One — Install a LAMP Stack

Before we can install phpMyAdmin, we need to install Apache, MySQL, and PHP on our server. Together, along with the underlying operating system, this is known as a LAMP stack (Linux, Apache, MySQL, PHP). We can go ahead and install the necessary components from the default yum repositories by typing:

# sudo yum install httpd mysql-server php php-mysql
A web server, database server, and dynamic processing language will be installed on your server and ready to use.

Step Two — Check the LAMP Stack

Next, we need to check all the components that we have just installed. Start the Web Server and MySQL server and Check all of them using below commands

#service httpd status
#service mysqld status

Step Three — Install phpMyAdmin

Now, we are ready to install the phpMyAdmin package. This software is not available in the CentOS 6 default repositories. However, it is avialable in the EPEL repos (Extra Packages for Enterprise Linux). We can add access to the EPEL repositories to our system by typing:

#sudo yum install epel-release
After accepting the new repository, you can install the phpMyAdmin package by typing:

#sudo yum install phpmyadmin
This will install phpMyAdmin. We still must configure it though.

Step Four — Configure phpMyAdmin

Configure Apache Files: The phpMyAdmin package installs an Apache Virtual Host file that is used to configure web access. Open the file with the following command:

#vim /etc/httpd/conf.d/phpMyAdmin.conf
.....
Require ip your_workstation_IP_address
.....
Allow from your_workstation_IP_address
.....
Require ip your_workstation_IP_address
.....
Allow from your_workstation_IP_address
Save and close the file. You need to restart the server with the following command:
#sudo service httpd restart
Point your web browser to your VPS IP address followed by "/phpmyadmin"
#http://VPS_IP_address/phpmyadmin



After you provide the requested credentials, you will have access to the phpMyAdmin interface:





No comments:

Post a Comment

Exciting Offer