centos7 安裝phpmyadmin php
一、先安裝epel,否則安裝pgpmyadmin時會出現找不到包。centos
yum install epel-release
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
二、
sudo yum install phpmyadmin
三、修改配置文件
sudo vi /etc/httpd/conf.d/phpMyAdmin.confide
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8測試
<IfModule mod_authz_core.c>ui
<RequireAny> # Require ip 127.0.0.1 #註釋掉 # Require ip ::1 #註釋掉 Require all granted #新添加 </RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>centos7
Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1
</IfModule>
</Directory>rest
<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>code
<RequireAny> #Require ip 127.0.0.1 #註釋掉 #Require ip ::1 #註釋掉 Require all granted #新添加 </RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>ip
Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1
</IfModule>
</Directory>rem
四、重啓httpd使改動生效。sudo systemctl restart httpd五、測試ip/phpmyadmin