0. 사전준비
필요 라이브러리 설치
yum -y install gcc gcc-c++ make
yum -y install pcre pcre-devel zlib-devel openssl-devel
apr 설치
wget http://apache.mirror.cdnetworks.com/apr/apr-1.5.0.tar.gz
tar -xzvf apr-1.5.0.tar.gz
cd apr-1.5.0
./configure --prefix=/app/apr
make && make install
apr-util 설치
wget http://apache.mirror.cdnetworks.com/apr/apr-util-1.5.3.tar.gz
tar -xzvf apr-util-1.5.3.tar.gz
cd apr-util-1.5.3
./configure --prefix=/app/apr --with-apr=/app/apr
make && make install
echo "export PATH=/app/apr/bin/:\$PATH" >> /etc/profile
echo "export PATH=/app/apr/build-1/:\$PATH" >> /etc/profile
1. apache 설치
apache 설치
wget http://apache.mirror.cdnetworks.com/httpd/httpd-2.4.7.tar.gz
tar -xzvf httpd-2.4.7.tar.gz
cd httpd-2.4.7
./configure --prefix=/app/apache --with-mpm=worker \
--enable-expires \
--enable-deflate \
--enable-headers \
--enable-rewrite \
--enable-proxy \
--enable-ssl \
--enable-so \
--enable-mods-static=most \
--with-apr=/app/apr \
--with-apr-util=/app/apr
make && make install
2. 톰캣 커넥터 설치
wget http://mirror.apache-kr.org//tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.39-src.tar.gz
tar -xzvf tomcat-connectors-1.2.39-src.tar.gz
cd tomcat-connectors-1.2.39/native
./configure --with-apxs=/app/apache/bin/apxs
make && make install
echo "Include conf/mod_jk.conf" >> /app/apache/conf/httpd.conf
vi /app/apache/conf/mod_jk.conf
LoadModule jk_module modules/mod_jk.so
<IfModule jk_module>
JkWorkersFile conf/workers.properties
JkLogFile "|/app/apache/bin/rotatelogs -l /app/apache/logs/mod_jk.%Y%m%d.log 86400"
JkLogLevel error
JkShmFile logs/mod_jk.shm
JkMountFile conf/uri.properties
JkMount /jkmanager/* jkstatus
JkWatchdogInterval 60
JkOptions +FlushPackets +FlushHeader
</IfModule>
<Location /jkmanager/>
JkMount jkstatus
Order deny,allow
Deny from all
Allow from 접속 IP
</Location>
:wp
3. 톰캣 & JDK 설치
톰캣 다운로드
wget http://apache.tt.co.kr/tomcat/tomcat-7/v7.0.52/bin/apache-tomcat-7.0.52.tar.gz
mkdir -p /app/tomcat
tar -xzvf apache-tomcat-7.0.52.tar.gz -C /app/
ln -s /app/apache-tomcat-7.0.52 /app/tomcat
JDK 설치
다운로드 페이지 : http://java.sun.com/javase/downloads/index.jsp
tar -xzvf jdk-7u51-linux-x64.gz
ln -s /app/jdk1.7.0_51 /app/jdk
echo "export JAVA_HOME=$/app/jdk" >> /etc/profile
echo "export PATH=\$JAVA_HOME/bin/:\$PATH" >> /etc/profile
source /etc/profile
톰캣native 설치
wget http://mirror.apache-kr.org//tomcat/tomcat-connectors/native/1.1.29/source/tomcat-native-1.1.29-src.tar.gz
tar -xzvf tomcat-native-1.1.29-src.tar.gz
./configure --with-apr=/app/apr --with-java-home=/app/jdk --with-ssl --prefix=/app/tomcat
make && make install
echo "/app/tomcat/lib/" >> /etc/ld.so.conf.d/tomcat.conf
/sbin/ldconfig