phpMyAdmin
phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web
Prechecklist:
Install php
yum -y install php
make sure we have all these packages:
rpm -qa | grep php
php-common-5.4.16-42.el7.x86_64
php-fedora-autoloader-1.0.0-1.el7.noarch
php-mysql-5.4.16-42.el7.x86_64
php-5.4.16-42.el7.x86_64
php-mbstring-5.4.16-42.el7.x86_64
php-php-gettext-1.0.12-1.el7.noarch
php-bcmath-5.4.16-42.el7.x86_64
php-pdo-5.4.16-42.el7.x86_64
php-cli-5.4.16-42.el7.x86_64
php-tidy-5.4.16-7.el7.x86_64
php-gd-5.4.16-42.el7.x86_64
php-tcpdf-dejavu-sans-fonts-6.2.13-1.el7.noarch
phpMyAdmin-4.4.15.10-1.el7.noarch
php-xml-5.4.16-42.el7.x86_64
php-process-5.4.16-42.el7.x86_64
php-tcpdf-6.2.13-1.el7.noarch
yum install php-mysqlnd .
(A module for PHP applications that use MySQL databases)
Install apache webserver on centos
yum -y install httpd
systemctl start httpd
systemctl enable httpd
systemctl status httpd
Installation steps for phpMyAdmin:
Add the EPEL Repository:
CentOS and Red Hat Enterprise Linux 6.x
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
sudo rpm -Uvh epel-release-6*.rpm
CentOS and Red Hat Enterprise Linux 7.x
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -Uvh epel-release-latest-7*.rpm
Install phpMyAdmin
yum -y update
yum -y install phpmyadmin
Basic configuration for phpMyAdmin
vi /etc/httpd/conf.d/phpMyAdmin.conf
By default, the configuration for phpMyAdmin only allows access from the server on which it is installed. Find the following sections and change each IP address to the one you found in Step 3, or another IP address that will be connecting to phpMyAdmin remotely:
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1
Require ip ::1
Replace the above block ,with the below mentioned code
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
# Require ip 127.0.0.1
# Require ip ::1
Require all granted
Database configuration file
vi /etc/phpMyadmin/config.inc.php
changes:
$cfg['Servers'][$i]['host'] : Mention the endpoint of database
$cfg['Servers'][$i][‘port’] : Mention the port number
$cfg['Servers'][$i]['extension'] : ‘mysqli ‘; // The php MYSQL extension to use
Restart apache:
systemctl restart httpd
No comments:
Post a Comment