centos7安装phpmyadmin

  • 执行命令 sudo yum install phpmyadmin
    有时候会安装不成功,提示没有可用软件包,则需要安装Remi源
sudo yum install epel-release -y
sudo rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

安装成功后修改 sudo vim /etc/httpd/conf.d/phpMyAdmin.conf

<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
     Allow from All granted
   </IfModule>

重启Apache,访问http://ip地址/phpMyAdmin/

ps:默认phpMyAdmin的文件路径在 /usr/share/phpMyAdmin,可以为phpMyAdmin配置指定的域名。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容