WAS/Tomcat

[정보] Tomcat Manager 설정

투칼론 2019. 10. 1. 23:33
반응형
Tomcat은 WebLogic 등 상용 WAS에 비해서 강력하지는 않지만, Tomcat Manager라는 Web기반 관리 콘솔을 제공한다. 설치하면 기본적으로 사용할 수 없고, Tomcat Manager를 사용하기 위해서는 추가적인 설정이 필요하다.

Tomcat 설치 디렉터리/conf/tomcat-users.xml 파일에 아래 4개 라인을 추가해야 한다.

<tomcat-users>
  <role rolename="manager-gui"/>
  <role rolename="manager-script"/>
  <role rolename="manager-status"/>
  <user username="admin" password="admin" roles="manager-gui,manager-script,manager-status"/>
</tomcat-users>


파일을 저장한 후, Tomcat 인스턴스를 재기동해야 한다.

브라우저에서 아래 URL을 입력하면, 계정과 패스워드를 입력하라는 팝업이 뜨면, tomcat-users.xml 파일에 설정한 username과 password를 입력하면 된다. 위의 예시에서는 admin / admin을 입력하면 된다.

   http://IP:포트/manager


 위의 rolename에 올 수 있는 권한 종류는 다음과 같다.

  • 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.