安装phpMyAdmin

1
sudo yum install phpmyadmin

####修改配置

1
sudo vi /etc/httpd/conf.d/phpMyAdmin.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8

<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip xx.xx.xx.xx #在这里加入允许的IP
Require ip 127.0.0.1
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from xx.xx.xx.xx #在这里加入允许的IP
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>
## 重启 Apache
sudo service httpd restart

访问链接 http://xxx.xxx.xxx.xxx/phpmyadmin/