CentOS7安装phpMyAdmin

来源:互联网 发布:淘宝详情页图片拉长 编辑:程序博客网 时间:2024/06/06 06:55

首先,通过命令行方式直接安装

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地址的访问控制

原创粉丝点击