반응형
1. /usr/local/apache-tomcat-7.0.11 에 설치
2. CATALINA_HOME 환경변수 세팅
3. conf/tomcat-users.xml 수정
<role rolename="admin-gui"/>
4. instance 폴더 생성
mkdir $CATALINA_HOME/instances
mkdir $CATALINA_HOME/instances/instance1
mkdir $CATALINA_HOME/instances/instance1/conf
mkdir $CATALINA_HOME/instances/instance1/logs
mkdir $CATALINA_HOME/instances/instance1/temp
mkdir $CATALINA_HOME/instances/instance1/webapps
mkdir $CATALINA_HOME/instances/instance1/work
5. 파일 복사
cp /usr/local/apache-tomcat-7.0.11/conf/server.xml $CATALINA_HOME/instances/instance1/conf
cp /usr/local/apache-tomcat-7.0.11/conf/web.xml $CATALINA_HOME/instances/instance1/conf
cp /usr/local/apache-tomcat-7.0.11/conf/context.xml $CATALINA_HOME/instances/instance1/conf
cp /usr/local/apache-tomcat-7.0.11/conf/tomcat-users.xml $CATALINA_HOME/instances/instance1/conf
cp -R /usr/local/apache-tomcat-7.0.11/webapps/* CATALINA_HOME/instances/instance1/webapps
6. server.xml 설정파일 수정
<Server port="8006" shutdown="SHUTDOWN">
이렇게 하지 않는 경우 CATALINA_HOME/webapps/와 소스를 공유함
8. classpath 를 추가하고 싶으면 instances/instance1/bin 밑에 setenv.sh 를 추가한다.
2. CATALINA_HOME 환경변수 세팅
3. conf/tomcat-users.xml 수정
<role rolename="admin-gui"/>
<role rolename="manager-gui"/>
<user username="admin" password="password" roles="admin-gui,manager-gui"/>4. instance 폴더 생성
mkdir $CATALINA_HOME/instances
mkdir $CATALINA_HOME/instances/instance1
mkdir $CATALINA_HOME/instances/instance1/conf
mkdir $CATALINA_HOME/instances/instance1/logs
mkdir $CATALINA_HOME/instances/instance1/temp
mkdir $CATALINA_HOME/instances/instance1/webapps
mkdir $CATALINA_HOME/instances/instance1/work
5. 파일 복사
cp /usr/local/apache-tomcat-7.0.11/conf/server.xml $CATALINA_HOME/instances/instance1/conf
cp /usr/local/apache-tomcat-7.0.11/conf/web.xml $CATALINA_HOME/instances/instance1/conf
cp /usr/local/apache-tomcat-7.0.11/conf/context.xml $CATALINA_HOME/instances/instance1/conf
cp /usr/local/apache-tomcat-7.0.11/conf/tomcat-users.xml $CATALINA_HOME/instances/instance1/conf
cp -R /usr/local/apache-tomcat-7.0.11/webapps/* CATALINA_HOME/instances/instance1/webapps
6. server.xml 설정파일 수정
<Server port="8006" shutdown="SHUTDOWN">
<Connector port="8180" protocol="HTTP/1.1" connectionTimeout="20000"
redirectPort="8453" URIEncoding="UTF-8" />
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8109" protocol="AJP/1.3" redirectPort="8453" URIEncoding="UTF-8" />
7. webapps/ROOT 를 기본 디렉토리로 하고 싶지 않으면 <Context> 를 server.xml에 추가한다
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
이렇게 하지 않는 경우 CATALINA_HOME/webapps/와 소스를 공유함
8. classpath 를 추가하고 싶으면 instances/instance1/bin 밑에 setenv.sh 를 추가한다.
반응형