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

image.png

猜你喜欢

转载自blog.51cto.com/yimiyinei/2464747