CentOS / RHEL: Install and Configure phpMyAdmin Administration Of MySQL Database Server
Tutorial details | |
---|---|
Difficulty | Easy (rss) |
Root privileges | Yes |
Requirements | None |
Estimated completion time | 10m |
Step #1: Turn on EPEL repo
phpMyAdmin is not included in default RHEL / CentOS repo. So turn on EPEL repo as described here:
$ cd /tmp
$ wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm
Step #2: Install phpMyAdmin on a CentOS / RHEL Linux
Type the following yum command to download and install phpMyAdmin:
Sample outputs:
# yum search phpmyadmin
# yum -y install phpmyadmin
Sample outputs:
Loaded plugins: rhnplugin Setting up Install Process Resolving Dependencies There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them. --> Running transaction check ---> Package phpMyAdmin.noarch 0:3.5.1-1.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================== Package Arch Version Repository Size ================================================================================================== Installing: phpMyAdmin noarch 3.5.1-1.el6 epel 4.2 M Transaction Summary ================================================================================================== Install 1 Package(s) Total download size: 4.2 M Installed size: 17 M Downloading Packages: phpMyAdmin-3.5.1-1.el6.noarch.rpm | 4.2 MB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : phpMyAdmin-3.5.1-1.el6.noarch 1/1 Verifying : phpMyAdmin-3.5.1-1.el6.noarch 1/1 Installed: phpMyAdmin.noarch 0:3.5.1-1.el6
Install MySQL server on a CentOS/RHEL
You need download and install MySQL server on CentOS/RHEL using the following yum command:
Turn on and start the mysql service, type:
# yum install mysql-server mysql
Turn on and start the mysql service, type:
# chkconfig mysqld on
# service mysqld start
Set root password and secure mysql installation by running the following command:
# mysql_secure_installation
Step #3: Configure phpMyAdmin
You need to edit /etc/httpd/conf.d/phpMyAdmin.conf file, enter:
It allows only localhost by default. You can setup HTTPD SSL as described here (mod_ssl) and allow LAN / WAN users or DBA user to manage the database over www. Find line that read follows
# vi /etc/httpd/conf.d/phpMyAdmin.conf
It allows only localhost by default. You can setup HTTPD SSL as described here (mod_ssl) and allow LAN / WAN users or DBA user to manage the database over www. Find line that read follows
Require ip 127.0.0.1
Replace with your workstation IP address:
Require ip 10.1.3.53
Again find the following line:
Allow from 127.0.0.1
Replace as follows:
Allow from 10.1.3.53
Save and close the file. Restart Apache / httpd server:
Open a web browser and type the following url:
OR
Sample outputs:
# service httpd restart
Open a web browser and type the following url:
https://your-server-ip/phpMyAdmin/
OR
http://your-server-ip/phpMyAdmin/
Sample outputs:
Please note that you will be prompted for a username and password. You need to provide your database username and password to login into the user interface. If you want to manage all database use mysql admin user account called root. phpMyAdmin configuration file is located at /etc/phpMyAdmin/config.inc.php. You can edit this file using a text editor:
All directives are explained in Documentation.html and on phpMyAdmin wiki.
# vi /etc/phpMyAdmin/config.inc.php
All directives are explained in Documentation.html and on phpMyAdmin wiki.
Check out related media
This tutorial is also available in video format:
(Video.01: Installing phpMyAdmin Demo)
And, there you have it, the phpMyAdmin installed and working correctly on the latest version of CentOS / Red Hat Enterprise Linux to manage your database software from the Internet.
Tidak ada komentar:
Posting Komentar