Centos7安装phpmyadmin

Centos7安装phpmyadmin

这篇文章主要介绍了Centos7中安装phpmyadmin的方法,具有一定借鉴价值,需要的朋友可以参考下。下面就和我一起来看看Centos7安装phpmyadmin的简单方法吧。

phpmyadmin.yimitest.com    192.168.20.159


yum install epel-release -y


yum install php -y


yum install phpmyadmin -y


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


<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

     Allow from 0.0.0.0

     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

     Allow from 0.0.0.0

     Allow from 127.0.0.1

     Allow from ::1

   </IfModule>

</Directory>


vi /etc/phpMyAdmin/config.inc.php


$cfg['AllowArbitraryServer'] = true; //添加可访问任意mysql服务器

http://192.168.20.160/phpmyadmin

Centos7安装phpmyadmin

关于Centos7中安装phpmyadmin的方法就分享到这里了,希望以上内容可以对大家有一定的参考价值,可以学以致用。如果喜欢本篇文章,不妨把它分享出去让更多的人看到。