오래전 이야기/Server

Apache + Resin + JDK 설치

리눅스 엔지니어였던 2008. 9. 15. 13:53

1. JDK 설치

http://java.sun.com/j2se/1.4.2/download.html

self-extracting file

# chmod 755 j2sdk-1_4_2_08-linux-i586.bin

# ./j2sdk-1_4_2_08-linux-i586.bin

# mv j2sdk1.4.2_08 /usr/local/


RPM in self-extracting file

# chmod 755 j2sdk-1_4_2_08-linux-i586-rpm.bin

# ./j2sdk-1_4_2_08-linux-i586-rpm.bin

# rpm -Uvh j2sdk-1_4_2_08-linux-i586.rpm


# vi /etc/profile

=================================================================

# 20050411 salix add
if ! echo $PATH | /bin/grep -q "/usr/local/j2sdk1.4.2_08/bin" ; then
    PATH="$PATH:/usr/local/j2sdk1.4.2_08/bin"
fi

# 20050411 salix add
CLASSPATH=.:/usr/local/j2sdk1.4.2_08/lib/
CLASSPATH="$CLASSPATH:/opt/resin-2.1.16/lib"
PATH="$PATH:/opt/resin-2.1.16/bin"
JAVA_HOME="/usr/local/j2sdk1.4.2_08"
RESIN_HOME="/opt/resin-2.1.16"

# 20050411 salix add

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC CLASSPATH JAVA_HOME RESIN_HOME
==================================================================

# . /etc/profile


2. 아파치 설치

http://ftp.kaist.ac.kr/pub/Apache/httpd/apache_1.3.33.tar.gz


# ./configure --with-layout=Apache --prefix=/opt/apache_1.3.33/ --enable-rule=SHARED_CORE --enable-rule=SHARED_CHAIN --enable-module=so --enable-shared=max

# make


# make install


3. 레진 설치

http://www.caucho.com/download/resin-2.1.16.tar.gz

(/opt/ 아래 압축풀 것)


# ./configure --with-apache=/opt/apache_1.3.33 --with-java-home=/usr/local/j2sdk1.4.2_08


# make


# make install


4. 아파치 & 레진 conf 각각 설정


아파치

add in /opt/apache_1.3.33/conf/httpd_[name].conf

============================================

ResourceConfig conf/virtualhost_[name].conf

============================================


add in /opt/apache_1.3.33/conf/virtualhost_[name].conf

============================================

CauchoConfigFile /opt/resin-2.1.16/conf/[name].conf

============================================


레진

/opt/resin-2.1.16/conf/samples/* 참고하여

/opt/resin-2.1.16/conf/[name].conf 생성


/opt/apache_1.3.33/bin/httpd -f  /opt/apache_1.3.33/conf/httpd_[name].conf

/opt/resin-2.1.16/bin/httpd_[name].sh -conf /opt/resin-2.1.16/conf/[name].conf start


=====================

2005. 7 수정


등록한 jar파일을 자동으로 로딩시키도록 설정



      <!--
         - Extension library for common jar files.  The ext is safe
         - even for non-classloader aware jars.  The loaded classes
         - will be loaded separately for each web-app, i.e. the class
         - itself will be distinct.
        -->
      <class-loader>
     <!--   <tree-loader path="${server.rootDirectory}/ext-webapp"/> -->
        <tree-loader path="/webapp/cert/WEB-INF/lib"/>                 <== 추가한 부분
      </class-loader>