http://www.tecmint.com/install-lamp-in-centos-7/


문서대로 설치 하면 깔끔하게 설치 됩니다.


아파치는 2.4

PHP는 5.4

DB는 MariaDB 5.5 가 설치 되는군요.


phpmyadmin의 경우 fail2ban을 설치 하려고 epel 저장소를 추가해놨는데 거기에 있네요.


설치는 똑같이 yum install phpmyadmin으로 하고


vim /etc/httpd/conf.d/phpMyAdmin.conf


설정파일에 아파치 2.4 와 2.2용 설정이 둘다 들어 있습니다.

접속할 IP 대역을 지정해야 외부에서 접속이 됩니다.

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

<Directory /usr/share/phpMyAdmin/>
   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip 127.0.0.1 192.168.0.0/24
       Require ip ::1
     </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 192.168.0.1
       Require ip ::1
     </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>

아파치 서비스 재기동을 하고

systemctl restart httpd


http://URL/phpmyadmin/setup/

환경 설정해주고 


http://URL/phpmyadmin/

접속하면 됩니다.