November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

How to install phpmyadmin on centos 7

How to install phpmyadmin on centos 7
Phpmyadmin is an opensource tool to manage MySQL database using web browser. it can perform almost all tasks such as creating,deleting,modifying databases,users,tables and fields .
This guide helps you to install phpmyadmin on centos 7. it contains step by step installation through YUM using EPEL repository.
Prerequisite – LAMP server
Before starting phpmyadmin installation, You must setup LAMP server on your centos 7 server. Copy and paste below command in terminal for quick setup . At the end, you need to provide some inputs .
» leave blank for current mysql password.
» provide new password and press enter for the rest.
yum -y install httpd mariadb-server mariadb php php-mysql php-gd php-pear php-mbstring && systemctl start httpd.service && systemctl enable httpd.service && systemctl start mariadb && systemctl enable mariadb && firewall-cmd –permanent –add-service http && systemctl restart firewalld.service && mysql_secure_installation

You can also refer this guide – Install LAMP server on centos 7 for more detailed setup.

Install phpmyadmin on centos 7
By default, centos 7 repository does not contains phpmyadmin package. we need to enable EPEL repository. Find the latest EPEL for centos 7 from EPEL for Centos 7
Step 1 » Download and install epel-release-7-x.noarch.rpm file . or install directly by copying the rpm link.
[root@rmohan ~]# rpm -ivh http://epel.mirror.net.in/epel/7/x86_64/e/epel-release-7-1.noarch.rpm

Step 2 » Update repositories by issuing below command .
[root@rmohan ~]# yum check-update

Step 3 » Now install phpmyadmin package along with dependencies.
[root@rmohan ~]# yum -y install phpmyadmin

Step 4 » After installation, Open /etc/httpd/conf.d/phpMyAdmin.conf file ( Apache config file for phpmyadmin ) and edit as follows.
Find these lines . ( Found 2 times )
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1
Require ip ::1
</RequireAny>

# Apache 2.4
<RequireAny>
Require ip 127.0.0.1
Require ip ::1
</RequireAny>
Replace with
# Apache 2.4
<RequireAny>
# Require ip 127.0.0.1
# Require ip ::1
Require all granted
</RequireAny>

# Apache 2.4
<RequireAny>
# Require ip 127.0.0.1
# Require ip ::1
Require all granted
</RequireAny>

tep 5 » Restart Apache service .
[root@rmohan ~]# systemctl restart httpd.service

Step 6 » Now open http://serverIP/phpmyadmin in your browser. You can login using root as username and mysql root password.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>