Why?


Search This Blog

Friday, July 24, 2015

Centos 7 Install phpMyAdmin

Centos 7 Install phpMyAdmin

My base install has selinux=disabled, iptables off, eth0 interface setup for static , ntp working, httpd installed, MariaDB (MySQL) installed, and PHP installed. All of those things have been verified as working 100%. I have how to do all those things in this blog.

login as root

Add the the repository that is for your OS. Do this in your home directory. if root then it should be /root

# yum -y localinstall --nogpgcheck https://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

Install phpMyAdmin

# yum -y install phpMyAdmin

phpMyAdmin by default allowed to access from localhost only. If you want to make it accessible from remote computers edit

# vi /etc/httpd/conf.d/phpMyAdmin.conf

and update all Require ip 127.0.0.1 and Allow from 127.0.0.1 with your network like below or enable phpMyAdmin access for everyone.

Example:

<Directory /usr/share/phpMyAdmin/>
    <IfModule !mod_authz_core.c>
     Order Deny,Allow
     Deny from All
     Allow from 192.168.1.0/24
     Allow from ::1
   </IfModule>
</Directory>


Now restart httpd

# systemctl restart httpd.service

Now login into your phpMyAdmin console with your web browser with:

http://my_ip_address/phpMyAdmin

Of course that means use the IP address of the server you just installed phpMyAdmin on.

When I setup MySQL I allowed root login and gave it a password. You must use a MySQL account with a password when accessing your MySQL through phpMyAdmin.

If your still getting denied:

You need to follow the following steps:

Find lines that read follows

Require ip 127.0.0.1

Replace with your workstation IP address:

Again find the following lines:

Allow from 127.0.0.1

Replace as follows:

Allow from 10.1.3.53

Also find deny from all and comment it in the entire file.
Save and close the file. Restart Apache httpd server

Thanks!

No comments:

Post a Comment