# vi /etc/apt/sources.list deb http://ftp.kr.debian.org/debian/ etch main non-free deb-src http://ftp.kr.debian.org/debian/ etch main non-free deb http://security.debian.org/ etch/updates main contrib non-free deb-src http://security.debian.org/ etch/updates main contrib non-free
# apt-get update # apt-get install sun-java5-jdk sun-java5-fonts # vi /etc/profile export JAVA_HOME="/usr/lib/jvm/java-1.5.0-sun" export PATH=$JAVA_HOME/bin:$PATH # source /etc/profile # java -version java version "1.5.0_14" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03) Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode, sharing)
# apt-get install tomcat5.5 tomcat5.5-admin tomcat5.5-webapps libapache2-mod-jk apache2 apache2-utils
# mkdir /opt/project_name/web/WEB-INF # cd /etc/apache2/sites-available # vi project_name NameVirtualHost *:80 <VirtualHost *:80> ServerName test.com ServerAlias www.test.com DocumentRoot /opt/project_name/web </VirtualHost> # a2ensite project_name
# cd /etc/tomcat5.5 # vi server.xml ... <!-- test.com --> <Host name="test.com" debug="0" appBase="" unpackWARs="true" autoDeploy="true"> <Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="test.com_" suffix=".log" timestamp="true"/> <Context path="" docBase="/opt/project_name/web" debug="0"> <Resources className="org.apache.naming.resources.FileDirContext" allowLinking="true" /> </Context> </Host> ...
TOMCAT5_SECURITY=no
# /etc/init.d/tomcat5.5 restart
# vi /etc/libapache2-mod-jk/workers.properties workers.tomcat_home=/usr/share/tomcat5.5 workers.java_home=/usr/lib/jvm/java-1.5.0-sun # cd /etc/apache2 # cp /usr/share/doc/libapache2-mod-jk/httpd_example_apache2.conf mods-available/jk.conf # ln -s /etc/apache2/mods-available/jk.conf mods-enabled/jk.conf # /etc/init.d/apache2 restart