Apache Tomcat의 설치 및 설정방법
<사전 Lib 설치>
1. Apr (Apache Portable Runtime)
A. 설치버전 : apr 1.5.2
B. 설치경로 : /ccpkg/platform/tomcat/apr/
C. Download : http://apache.mirror.cdnetworks.com//apr/apr-1.5.2.tar.gz
D. 설치 Process
i. tar –zxvf apr-1.5.2.tar.gz
ii. cd apr-1.5.2
iii. ./configure --prefix=/ccpkg/platform/tomcat/apr/
iv. make && make install
2. Apr Util (Apache Portable Runtime Util)
A. 설치버전 : apr-util 1.5.4
B. 설치경로 : /ccpkg/platform/tomcat/apr/
C. Download : http://apache.mirror.cdnetworks.com//apr/apr-util-1.5.4.tar.gz
D. 설치 Process
i. tar -zxvf apr-util-1.5.4.tar.gz
ii. cd apr-util-1.5.4
iii. ./configure --prefix=/ccpkg/platform/tomcat/apr/ --with-apr=/ccpkg/platform/tomcat/apr/
iv. make && make install
3. pcre (Perl Compatible Regular Expressions)
A. 설치버전 : pcre 8.40
B. 설치경로 : /ccpkg/platform/tomcat/pcre/
C. Download : https://ftp.pcre.org/pub/pcre/pcre-8.40.tar.gz
D. 설치 Process
i. tar -zxvf pcre-8.40.tar.gz
ii. cd pcre-8.40
iii. ./configure --prefix=/ccpkg/platform/tomcat/pcre/ --with-apr=/ccpkg/platform/tomcat/apr/bin --with-apr-util=/ccpkg/platform/tomcat/apr/bin
iv. make && make install
4. Open SSL
A. 설치버전 : 1.0.2k
B. 설치경로 : /ccpkg/platform/tomcat/ssl
C. Download : https://www.openssl.org/source/openssl-1.0.2k.tar.gz
D. 설치 Process
i. tar –zxvf openssl-1.0.2k.tar.gz
ii. cd openssl-1.0.2k
iii. ./config --prefix=/ccpkg/platform/tomcat/ssl shared
iv. make && make install
5. JDK 설치
A. 설치버전 : java 8u121
B. 설치경로 : /usr/java/jdk1.8.0_121
C. Download : http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.tar.gz
D. 설치 Process
i. tar –zxvf jdk-8u121-linux-x64.tar.gz
ii. mv jdk1.8.0_121 /usr/java/
6. Java JCE 설치
A. 설치버전 : java 8
B. 설치경로 : /usr/java/jdk1.8.0_121/jre/lib/security
C. Download : http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip
D. 설치 Process
i. unzip jce_policy-8.zip
ii. cd UnlimitedJCEPolicyJDK8
iii. cp *.jar /usr/java/jdk1.8.0_121/jre/lib/security
7. Tomcat 설치
A. 설치버전 : 8.0.41
B. 설치경로 : /ccpkg/platform/tomcat
C. Download : http://apache.mirror.cdnetworks.com/tomcat/tomcat-8/v8.0.41/bin/apache-tomcat-8.0.41.tar.gz
D. 설치 Process
i. tar –zxvf apache-tomcat-8.0.41.tar.gz
ii. cd apache-tomcat-8.0.41
iii. cp –R * /ccpkg/platform/tomcat
8. tomcat-native 설치 (JDK 설정안되어 있으면 에러남)
A. 설치버전 : 1.1.34
B. 설치경로 : /ccpkg/platform/tomcat/lib
C. Download : http://apache.mirror.cdnetworks.com/tomcat/tomcat-connectors/native/1.1.34/source/tomcat-native-1.1.34-src.tar.gz
D. 설치 Process
i. tar –zxvf tomcat-native-1.1.34-src.tar.gz
ii. cd tomcat-native-1.1.34-src/jni/native
iii. ./configure --with-apr=/ccpkg/platform/tomcat/apr --with-ssl=/ccpkg/platform/tomcat/ssl --prefix=/ccpkg/platform/tomcat
iv.
9. Tomcat jndi 설정( JDBC connector)
A. 설치버전 : mysql connector java 5.1.40
B. 설치경로 : /ccpkg/platform/tomcat/lib
C. Download : http://central.maven.org/maven2/mysql/mysql-connector-java/5.1.40/mysql-connector-java-5.1.40.jar
D. 설치 Process
i. cp mysql-connector-java-5.1.40.jar /ccpkg/platform/tomcat/lib/
ii. server.xml
factory=”org.apache.tomcat.jdbc.pool.DataSourceFactory” driverClassName="com.mysql.jdbc.Driver" #single 인경우 driverClassName="com.mysql.jdbc.ReplicationDriver" #Replication 인 경우 |
10. 실행 / 정지
A. $CATALINA_HOME/bin/start.sh
B. $CATALINA_HOME/bin/stop.sh