Install phpMyAdmin 4.3.3 on Fedora 21

ADVERTISEMENT

phpMyAdmin
phpMyaAdmin is the web based administration tool for managing the MySQL, MariaDB and Drizzle servers, it helps in performing databases activities such as creating, deleting ,querying , tables, columns, relations, indexes, users, permissions, etc. This guide will help you to install phpMyAdmin on Fedora 21.

Before installing phpMyAdmin, you must have LAMP installed on the server. Here is the tutorial on Installing LAMP on Fedora 21.

ADVERTISEMENT
Article will continue after the ad

Installing phpMyAdmin:

Install phpMyAdmin using the following command.

# yum -y install phpmyadmin

Configuring phpMyAdmin:

By-default phpMyAdmin places the web config file in /etc/httpd/conf.d directory; it has the rules and access permission. phpMyAdmin can be accessed only from the localhost, to change that; we have to edit the phpMyadmin.conf file. In Fedora 21, web access is managed by mod_authz_core.c module; so normal allow or deny rules wont work even if you modify.

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

Default config will look like below.

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
 
<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
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1
     Allow from ::1
   </IfModule>
</Directory>
 
<Directory /usr/share/phpMyAdmin/setup/>
   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip 127.0.0.1
       Require ip ::1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1
     Allow from ::1
   </IfModule>
</Directory>

Please comment out Require ip 127.0.0.1 and Require ip ::1 then add Require all granted just below to commented line, it will look like below.

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
<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
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>
<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
# Require ip 127.0.0.1
# Require ip ::1
Require all granted
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>

Restart the apache service.

systemctl reload httpd.service

Configure firewall to allow http request from the external network.

firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --reload

Accessing phpMyAdmin:

Now access the phpMyAdmin from the browser, url will be http://your-ip-address/phpMyAdmin. Login as root or admin user.

CentOS 7 - phpMyadmin Login Page
Fedora 21 – phpMyadmin Login Page

You will get the database page.

Fedora 21 - phpMyAdmin Home Page
Fedora 21 – phpMyAdmin Home Page

That’s All. Hope this helped you, we welcome your comments.

ADVERTISEMENT

POSTS YOU MAY LIKE -:)

Share This Post

Shares