当我想访问我的 phpMyAdmin 时,我总是会收到此消息。
w3m localhost/phpmyadmin
Forbidden
You don't have permission to access /phpmyadmin/ on this server.
Apache/2.2.15 (CentOS) Server at localhost Port 80
安装步骤:
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2- 2.el6.rf.x86_64.rpm
yum install phpmyadmin
添加别名
vi /etc/httpd/conf.d/phpmyadmin.conf
Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin
从 cookie 更改为 http
vi /usr/share/phpmyadmin/config.inc.php
[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]
重新开始
/etc/init.d/httpd restart
SELinux - /etc/httpd
drwxr-xr-x. root root system_u:object_r:httpd_config_t:s0 .
drwxr-xr-x. root root system_u:object_r:etc_t:s0 ..
drwxr-xr-x. root root system_u:object_r:httpd_config_t:s0 conf
drwxr-xr-x. root root system_u:object_r:httpd_config_t:s0 conf.d
lrwxrwxrwx. root root system_u:object_r:httpd_log_t:s0 logs -> ../../var/log/httpd
lrwxrwxrwx. root root system_u:object_r:httpd_modules_t:s0 modules -> ../../usr/lib64/httpd/modules
lrwxrwxrwx. root root system_u:object_r:httpd_config_t:s0 run -> ../../var/run/httpd
SELinux - /usr/share/phpmyadmin
drwxr-xr-x. root root system_u:object_r:usr_t:s0 .
drwxr-xr-x. root root system_u:object_r:usr_t:s0 ..
-rw-r--r--. root root system_u:object_r:usr_t:s0 browse_foreigners.php
-rw-r--r--. root root system_u:object_r:usr_t:s0 calendar.php
-rw-r--r--. root root system_u:object_r:usr_t:s0 changelog.php
-rw-r--r--. root root system_u:object_r:usr_t:s0 chk_rel.phph
.
.
.
-rw-r--r--. root root system_u:object_r:usr_t:s0 view_create.php
操作系统
centos-release-6-0.el6.centos.5.x86_64