您的位置:首页 > 运维架构 > Linux

CentOS7安装phpMyAdmin

2015-09-18 20:18 411 查看
首先,通过命令行方式直接安装

yum install phpmyadmin php-mcrypt


第二,将/etc/httpd/conf.d/phpMyAdmin.conf文件中关于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>


第三,访问地址:http://xxxx.com/phpMyAdmin/setup

在其中进行服务器基本信息的设置。以前的版本中,这一步需要用VIM手动去修改配置文件。但是这次不用了。

第四,登录phpMyAdmin成功

第五,记得修复第二步的配置文件中,关于第三步那个setup地址的访问控制
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: