반응형
# Windows에서 톰캣 설치 및 환경설정하기
1. 톰캣 다운로드
https://tomcat.apache.org/download-90.cgi
Apache Tomcat® - Apache Tomcat 9 Software Downloads
Welcome to the Apache Tomcat® 9.x software download page. This page provides download links for obtaining the latest version of Tomcat 9.0.x software, as well as links to the archives of older releases. Unsure which version you need? Specification version
tomcat.apache.org
- 아래의 경로로 이동하여 다운로드 하기
2. 압축해제, 설치 및 실행
- 다운받은 폴더 압축해제
{설치 경로}\bin> service.bat install
- 실행
C:\apache-tomcat-9.0.74\bin>startup.bat
- 중지
C:\apache-tomcat-9.0.74\bin>shutdown.bat
3. 포트 변경 및 유저 생성
- 포트 변경
- conf/server.xml
<Connector port="8088" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
maxParameterCount="1000"
/>
- manager/META-INF/context.xml
<Context antiResourceLocking="false" privileged="true" >
<CookieProcessor className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"
sameSiteCookies="strict" />
<!-- <Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" /> -->
<Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/>
</Context>
- host-manager/META-INF/context.xml
<Context antiResourceLocking="false" privileged="true" >
<CookieProcessor className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"
sameSiteCookies="strict" />
<!-- <Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" /> -->
<Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/>
</Context>
- conf/tomcat-users.xml
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="admin" password="admin" roles="manager-gui, manager-script, manager-jmx, manager-status"/>
<user username="deployer" password="deployer" roles="manager-script"/>
<user username="tomcat" password="tomcat" roles="manager-gui"/>
</tomcat-users>
- 끝 -
반응형
'Applications > Apache & Tomcat' 카테고리의 다른 글
Tomcat Shutdown 시 오류 발생... (0) | 2021.11.30 |
---|---|
새로운 .war 파일을 갱신 및 실행 시키는 방법 (0) | 2021.11.30 |
Tomcat 에서 .war 파일을 실행시키는 두가지 방법 (0) | 2021.11.30 |
우분투에 Tomcat 설치 (0) | 2021.11.25 |
EC2 인스턴스에 Apache 웹서버를 띄워보자 (0) | 2021.08.29 |