[ Server ][ Linux ] CentOS 7 apm auto install 설치 이후 phpMyAdmin 설치 방법 > linux

본문 바로가기

사이트 내 전체검색

linux

[ Server ][ Linux ] CentOS 7 apm auto install 설치 이후 phpMyAdmin 설치 방법

작성일 18-12-11 16:55

페이지 정보

작성자 웹지기 조회 10,396회 댓글 0건

본문

일반적으로 인터넷에 올라와있는 방법으로 했더니 오류가 발생한다.

Error: Package: php-recode-5.4.45-16.el7.remi.x86_64 (remi)

           Requires: php-common(x86-64) = 5.4.45-16.el7.remi

           Installed: php-common-7.2.13-2.el7.remi.x86_64 (@remi-php72)

               php-common(x86-64) = 7.2.13-2.el7.remi

           Available: php-common-5.4.16-46.el7.x86_64 (base)

               php-common(x86-64) = 5.4.16-46.el7

           Available: php-common-5.4.45-15.el7.remi.x86_64 (remi)

               php-common(x86-64) = 5.4.45-15.el7.remi

           Available: php-common-5.4.45-16.el7.remi.x86_64 (remi)

               php-common(x86-64) = 5.4.45-16.el7.remi

이러한 형태로 많은 줄의 오류가 발생한다.

 

결국 아파치님께서 조언해 주셨다.

yum -y --enablerepo=remi,remi-php73 install phpmyadmin ( phpmyadmin 부분은 원하는 이름으로 == > phpMyAdmin )

 

phpMyAdmin 설치이후 설정을 몇가지 해줘야 외부에서 접속이 가능하다

기본적인 접속 주소는

http://PUBLIC_IP_DOMAIN/설정한 이름 으로 접속을 하면,

Forbidden

You don't have permission to access /phpMyAdmin/setup/ on this server.

이러한 화면을 만난다거나 아예 접속이 안되는 것을 볼 수 있다.

 

본인은 설치시 폴더를 phpMyAdmin 으로 입력했으므로  

http://PUBLIC_IP_DOMAIN/phpMyAdmin 이 된다.

 

phpMyAdmin.conf 파일에서 사용하는 부분에 대한 부분을 제외 하고 주석 처리한다.

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

    #Alias /phpMyAdmin /usr/share/phpMyAdmin

    #Alias /phpmyadmin /usr/share/phpMyAdmin

    Alias /원하는이름( _pma ) /usr/share/phpMyAdmin

 

 

다음과 같이 require 를 입력해주고 그다른 부분에 대한 사항은 주석으로 바꿔준다.

내용을 바꿔준 후 httpd 재시작 후 접속이 되는지 확인해본다. aaa.com/_pma

<Directory /usr/share/phpMyAdmin/>

   AddDefaultCharset UTF-8


   <IfModule mod_authz_core.c>

     # Apache 2.4

     #Require local

     Require all granted

   </IfModule>

   <IfModule !mod_authz_core.c>

     # Apache 2.2

     Order Deny,Allow

     Deny from All

     #Allow from 127.0.0.1

     #Allow from ::1

     Require all granted

   </IfModule>

</Directory>


다음의 문장 하단에도 AllowOverride All를 추가해 준다.    

   <Directory /usr/share/phpMyAdmin/> 

   AllowOverride All

 

다음 파일을 만들고 내용을 추가한다.

/usr/share/phpMyAdmin/.htaccess

   AuthType Basic

   AuthName "Admin Login"

   AuthUserFile /etc/httpd/pma_pass

   Require valid-user

 

phpMyAdmin에서 사용할 부분에 대한 비밀번호입력을 만들고 아파치를 재시작한다.

htpasswd -c /etc/httpd/pma_pass username

systemctl restart httpd

 

[이 게시물은 웹지기님에 의해 2019-03-15 15:32:56 knowledge에서 이동 됨]

추천0

비추천 0

댓글목록

등록된 댓글이 없습니다.

전체 103건 1 페이지

이미지 목록

게시물 검색
Copyright © 즐거운 코딩 생활 ( funyphp ). All rights reserved.
PC 버전으로 보기