nickjoIT

tomcat manager 에서 deploy 가능하게 설정 - CI 에서 build 후 deploy 시 필요 본문

PROGRAMING/AWS

tomcat manager 에서 deploy 가능하게 설정 - CI 에서 build 후 deploy 시 필요

nickjo 2017. 6. 6. 11:37

개요

tomcat 의 manager 기능은 보안문제때문에 기본적으로 막혀있다.

jenkins 나 bamboo 등의 CI 에서 빌드와 배포를 수행하려면 이 기능을 켜야 한다.

보안상 취약하므로 id/pwd 를 잘 관리해야 하며 manager context 로 들어올 수 있는 client ip 를 제한해야 한다. (Web 서비스 구축시 보안 유의사항 참고)

 

설정

  1. tomcat 설치 폴더로 이동
  2. vi conf/vi tomcat-users.xml 
  3. 다음과 같이 tomcat-users 에 권한과 user 를 지정 

    <tomcat-users>
      <role rolename="manager-gui"/>
      <role rolename="manager-script"/>
      <role rolename="manager-status"/>
      <user username="myManagerId" password="secretP^wd" roles="manager-gui,manager-script,manager-status"/>
    </tomcat-users>

    Browser 에서 연결할 경우 manager-gui 권한이 필요하고 CI 등의 외부에서 연결하려면 manager-script 권한 필요

  4. 저장후 재구동
  5. http://myserver/manager  컨텍스트에 Browser 로 연결후 manager-id/secretP^wd 로 로그인하여 동작 확인

 

권한 종류

  • manager-gui — Access to the HTML interface.
  • manager-status — Access to the "Server Status" page only.
  • manager-script — Access to the tools-friendly plain text interface that is described in this document, and to the "Server Status" page.
  • manager-jmx — Access to JMX proxy interface and to the "Server Status" page.

 

Ref


'PROGRAMING > AWS' 카테고리의 다른 글

prompt name change  (0) 2017.09.27
CentOS 7 서비스 관리  (0) 2017.08.27
우분투 Tomcat7에 WAR 배포 하기  (0) 2017.06.06
Unlock Jenkins 해결법  (0) 2017.04.03
AWS Xshell을 이용하여 접속  (0) 2017.04.03
Comments