|
<!-------------------------------------------------------------->
<!--
<!-- Solaris 2.6+Java+Apache+Tomcat ÄÄÆÄÀϹæ¹ý ¸Þ´º¾ó
<!--
<!--
<!-- Official distribution site : http://jkkang.net/
<!-- Technical Info : jkkang65@hanmail.net
<!--
<!-- Updated in October 15, 2001
<!-- Written by Kang Jul Ki
<!--
<!--
<!-- Powered by http://jkkang.net/ since 1996
<!--
<!-------------------------------------------------------------->
º» ¹®¼´Â Solaris ȯ°æ¿¡¼ Apache¿Í TomcatÀ» ¿¬µ¿(ÄÄÆÄÀÏ)Çϱâ À§ÇÑ ÇÑ±Û ¹®¼ÀÔ´Ï´Ù.
±×¸®°í, ¸¶Áö¸·¿¡¼´Â mod_jserv.so, mod_jk.so À» Á÷Á¢ ÄÄÆÄÀÏÇؼ »ý¼ºÀ» ½Ãų°ÍÀÔ´Ï´Ù.
OS: Solaris 2.6 or higher
Apache: 1.3.20 or higher
Java: 1.2.2 or higher
gcc: 2.95.2 or higher
Jakarta-Tomcat: 3.2.3 or higher
perl: 5.005 or higher
À§¿¡¼ higher¶õ ¸»Àº ±× À̻󿡼µµ ÄÄÆÄÀÏÀÌ µÉ¼ö ÀÖÀ½À» ÀǹÌÇÕ´Ï´Ù. ¿·¿¡ ÀÖ´Â
¹öÀüÀº Á¦°¡ Å×½ºÆ®ÇÑ È¯°æÀ» ÀǹÌÇÕ´Ï´Ù. °¢°¢ÀÇ µð·ºÅ丮¹× °æ·Î´Â ÀúÀÇ °æ¿ì¸¦
¿¹·Î µéÀº °ÍÀ̹ǷΠÀڽŵéÀÇ È¯°æ¿¡ ¸ÂÃß¾î¼ ¾à°£¾¿ º¯°æÇϽñ⠹ٶø´Ï´Ù.
1. Apache 1.3.20 ÀνºÅç/ÄÄÆÄÀÏ
root directory: /swlab/backup2/seluser/apache
Makefile »ý¼º
# ./configure --prefix=/swlab/backup2/seluser/apache --with-perl=/usr/local/bin/perl
--enable-module=so
# make
# make install
2. .cshrc ¼³Á¤ (ȯ°æº¯¼ö) - ShellÀº cshellÀ» »ç¿ëÇÑ´Ù.
setenv CLASSPATH /usr/local/java2/java1.2/lib/tools.jar:.
setenv JAVA_HOME /usr/local/java2/java1.2
setenv TOMCAT_HOME /swlab/backup2/seluser/apache/tomcat
¸¸¾à »ç¿ëÀÚ°¡ ksh À» »ç¿ëÇÑ´Ù¸é ´ÙÀ½°ú °°ÀÌ .profile¿¡ ³Ö¾îÁÖ¸é µÈ´Ù.
export CLASSPATH=/usr/local/java2/java1.2/lib/tools.jar:.
export JAVA_HOME=/usr/local/java2/java1.2
export TOMCAT_HOME=/swlab/backup2/seluser/apache/tomcat
3. $(TOMCAT_HOME) µð·ºÅ丮¿¡ Tomcat °ü·Ã ÆÄÀÏ ´Ù¿î·Îµå
jakarta-tomcat-3.2.3-src.tar.gz
jakarta-ant-1.4.1-src.tar.gz
jakarta-servletapi-3.2.3-src.tar.gz
4. jakarta-tomcat-3.2.3-src.tar.gz ÀνºÅç
# gzip -d jakarta-tomcat-3.2.3-src.tar.gz
# tar xvf jakarta-tomcat-3.2.3-src.tar
# mv jakarta-tomcat-3.2.3-src jakarta-tomcat
5. jakarta-ant-1.4.1-src.tar.gz ÀνºÅç
# gzip -d jakarta-ant-1.4.1-src.tar.gz
# tar xvf jakarta-ant-1.4.1-src.tar
# mv jakarta-ant-1.4.1-src jakarta-ant
6. jakarta-servletapi-3.2.3-src.tar.gz ÀνºÅç
# gzip -d jakarta-servletapi-3.2.3-src.tar.gz
# tar xvf jakarta-servletapi-3.2.3-src.tar
# mv jakarta-servletapi-3.2.3-src jakarta-servletapi
# ls -l
drwxr-xr-x 9 seluser seluser 512 Oct 13 19:06 jakarta-ant/
drwxr-xr-x 4 seluser seluser 512 Oct 13 19:16 jakarta-servletapi/
drwxr-xr-x 3 seluser seluser 512 Oct 13 18:53 jakarta-tomcat/
À§¿Í °°Àº µð·ºÅ丮°¡ »ý±â¸é µÈ´Ù.
7. jakarta-ant ÄÄÆÄÀÏ
# cd $TOMCAT_HOME/jakarta-ant
# cd lib
# ls -l
-rw-r--r-- 1 seluser seluser 196399 Oct 11 22:58 crimson.jar
-rw-r--r-- 1 seluser seluser 33323 Oct 11 22:58 jaxp.jar
drwxr-xr-x 2 seluser seluser 512 Oct 11 22:58 optional/
ÄÄÆÄÀÏ ÇÏ°íÀÚ ÇÑ´Ù¸é,
# cd $TOMCAT_HOME/jakarta-ant
# chmod 755 build.sh
# ./build.sh
ÄÄÆÄÀÏ ¿Ï·áÈÄ,
# cd $TOMCAT_HOME/jakarta-ant
drwxr-xr-x 4 seluser seluser 512 Oct 13 19:02 bootstrap/
drwxr-xr-x 4 seluser seluser 512 Oct 13 19:01 build/
drwxr-xr-x 4 seluser seluser 512 Oct 13 19:03 dist/
µð·ºÅ丮 »ý¼ºµÊ
ant.jar »ý¼º È®ÀÎ
# find . -name ant.jar -ls
14493 416 -rw-r--r-- 1 seluser seluser 415002 Oct 13 19:03 ./dist/lib/ant.jar
15155 416 -rw-r--r-- 1 seluser seluser 415010 Oct 13 19:10 ./build/lib/ant.jar
15172 416 -rw-r--r-- 1 seluser seluser 415010 Oct 13 19:10 ./bootstrap/lib/ant.jar
8. jakarta-servletapi ÄÄÆÄÀÏ
# cd $TOMCAT_HOME/jakarta-servletapi
# chmod 755 build.sh
# ./build.sh dist
if ¿¡·¯¹ß»ý (build.sh ÀÇ cp=../jakarta-ant/lib/ant.jar:$JAVA_HOME/lib/tools.jar À߸ø
¼³Á¤µÊ-¼öÁ¤ÇÊ¿ä)
´ÙÀ½°ú °°ÀÌ º¹»çÇÏ¸é ¼öÁ¤ÇÒ ÇÊ¿ä ¾øÀ½
# cp $TOMCAT_HOME/jakarta-ant/dist/lib/ant.jar $TOMCAT_HOME/jakarta-ant/lib
# cd $TOMCAT_HOME/jakarta-ant/lib
# ls -l
-rw-r--r-- 1 seluser seluser 415002 Oct 13 19:23 ant.jar
-rw-r--r-- 1 seluser seluser 196399 Oct 11 22:58 crimson.jar
-rw-r--r-- 1 seluser seluser 33323 Oct 11 22:58 jaxp.jar
drwxr-xr-x 2 seluser seluser 512 Oct 11 22:58 optional/
if ¿¡·¯¹ß»ý
/swlab/backup2/seluser/apache/tomcat/jakarta-servletapi/build.xml:45: Javadoc fa
iled: java.io.IOException: /swlab/backup2/seluser/apache/tomcat/jakarta-ant/bin/
antRun: not found
/bin/antRun À» ¸øã±â ¶§¹®¿¡ ¹ß»ý
$TOMCAT_HOME/jakarta-ant/bin µð·ºÅ丮°¡ ¾ø´Ù. ./dist/bin µð·ºÅ丮°¡ ÀÖÀ»»Ó.
´ÙÀ½°ú °°ÀÌ Symbolic Link·Î ó¸®ÇÑ´Ù.(µð·ºÅ丮¸¦ ¸¸µé¾î¼ º¹»çÇÒ¼öµµ ÀÖÁö¸¸, ¼÷·ÃµÈ
°ü¸®ÀÚ¶ó¸é
µð½ºÅ© °ø°£µµ ¾Æ³¥�Y...)
# cd $TOMCAT_HOME/jakarta-ant
# ln -s ./dist/bin ./bin
servlet.jar »ý¼ºÈ®ÀÎ
# cd $TOMCAT_HOME/jakarta-servletapi/lib
# ls -l
-rw-r--r-- 1 seluser seluser 40813 Jul 18 01:21 servlet.jar
9. jakarta-tomcat ÄÄÆÄÀÏ
# cd $TOMCAT_HOME
# ls -l
drwxr-xr-x 3 seluser seluser 512 Oct 13 19:24 build/
drwxr-xr-x 3 seluser seluser 512 Oct 13 19:24 dist/
drwxr-xr-x 8 seluser seluser 512 Oct 13 19:28 jakarta-ant/
drwxr-xr-x 4 seluser seluser 512 Oct 13 19:16 jakarta-servletapi/
drwxr-xr-x 3 seluser seluser 512 Oct 13 18:53 jakarta-tomcat/
# cd $TOMCAT_HOME/jakarta-tomcat
# chmod 755 build.sh (chmod°¡ ¼³Á¤ÀÌ ¾ÊµÇ¾î ÀÖÀ¸¸é)
# ./build.sh
if ¿¡·¯¹ß»ý
/swlab/backup2/seluser/apache/tomcat/jakarta-tomcat/build.xml:58: Could not find
file /swlab/backup2/seluser/apache/tomcat/jaxp-1.0.1/jaxp.jar to copy.
# cd $TOMCAT_HOME
# find . -name jaxp.jar -ls
13792 33 -rw-r--r-- 1 seluser seluser 33323 Oct 11 22:58
./jakarta-ant/lib/jaxp.jar
# mkdir jaxp-1.0.1
# ls -l
drwxr-xr-x 4 seluser seluser 512 Oct 13 19:35 build/
drwxr-xr-x 3 seluser seluser 512 Oct 13 19:24 dist/
drwxr-xr-x 8 seluser seluser 512 Oct 13 19:28 jakarta-ant/
drwxr-xr-x 4 seluser seluser 512 Oct 13 19:16 jakarta-servletapi/
drwxr-xr-x 3 seluser seluser 512 Oct 13 18:53 jakarta-tomcat/
drwxr-xr-x 2 seluser seluser 512 Oct 13 19:42 jaxp-1.0.1/
# cp $TOMCAT_HOME/jakarta-ant/lib/jaxp.jar $TOMCAT_HOME/jaxp-1.0.1
# cd $TOMCAT_HOME/jaxp-1.0.1
# ls -l
-rw-r--r-- 1 seluser seluser 33323 Oct 13 19:44 jaxp.jar
´Ù½ÃÇѹø,
# cd $TOMCAT_HOME/jakarta-tomcat
# ./build.sh
if ¿¡·¯¹ß»ý
/swlab/backup2/seluser/apache/tomcat/jakarta-tomcat/build.xml:60: Could not find
file /swlab/backup2/seluser/apache/tomcat/jaxp-1.0.1/parser.jar to copy
# cd $TOMCAT_HOME
# find . -name parser.jar -ls
¾øÀ½.
¿©±â¼ parser.jar¸¦ ±¸ÇØ¾ß Çϴµ¥, ¹æ¹ýÀº
http://jakarta.apache.org/builds/jakarta-ant/release/v1.3/src/ ¿¡
°¡º¸¸é,
jakarta-ant-1.3-src.tar.gz À» ´Ù¿î ¹Þ¾Æ¼, ¼³Ä¡Çغ¸¸é,
# cd $TOMCAT_HOME/jakarta-ant-1.3/lib 214 ] ls -l
-rw-r--r-- 1 seluser seluser 5537 Mar 2 2001 jaxp.jar
drwxr-xr-x 2 seluser seluser 512 Oct 13 19:51 optional/
-rw-r--r-- 1 seluser seluser 136198 Mar 2 2001 parser.jar
¿Í °°ÀÌ ÆÄÀÏÀÌ ÀÖ´Ù. parser.jarÀ» $TOMCAT_HOME/jaxp-1.0.1 ¿¡ º¹»ç
# cd $TOMCAT_HOME
# cp $TOMCAT_HOME/jakarta-ant-1.3/lib/parser.jar $TOMCAT_HOME/jaxp-1.0.1
# cd $TOMCAT_HOME/jaxp-1.0.1
# ls -l
-rw-r--r-- 1 seluser seluser 33323 Oct 13 19:44 jaxp.jar
-rw-r--r-- 1 seluser seluser 136198 Oct 13 19:53 parser.jar
# cd $TOMCAT_HOME/jakarta-tomcat
# ./build.sh
¿¡·¯°¡ ¹ß»ýÇÑ´Ù.
ÀÌÀ¯´Â, .jar ÆÄÀÏ °æ·Î°¡ ¸ÂÁö ¾Ê±â ¶§¹®¿¡, Ãß°¡ÀûÀ¸·Î »©¸ÔÀº °É ¼³Á¤ÇØÁà¾ß ÇÑ´Ù.
# cd $TOMCAT_HOME/jakarta-tomcat
# more build.sh
À» Çغ¸¸é ¸¶Áö¸·¿¡ ´ÙÀ½ ¶óÀÎÀÌ ÀÖ´Ù. À̺κп¡ ¸î°¡Áö Ãß°¡ÇØ Áà¾ß ÇÑ´Ù.
cp=../jakarta-ant/lib/ant.jar:../jakarta-servletapi/lib/servlet.jar:..
/jakarta-t
ools/moo.jar:../build/tomcat/classes:$JAVA_HOME/lib/tools.jar:$JAVA_HO
ME/lib/dev
.jar ³¡¿¡,
../jaxp-1.0.1/jaxp.jar:./jaxp-1.0.1/parser.jar ../jakarta-ant/lib/crimson.jar Ãß°¡ÇÑ´ç.
±×·³ ´ÙÀ½°ú °°ÀÌ µÈ´Ù(ÇÊ¿ä¾ø´Â°Ç »©¹ö¸®°í, ³ªÀÇ °æÇè»ó)...
cp=../jakarta-ant/lib/ant.jar:../jakarta-servletapi/lib/servlet.jar:..
/build/tom
cat/classes:$JAVA_HOME/lib/tools.jar:../jaxp-1.0.1/jaxp.jar:../jaxp-1.
0.1/parser
.jar:../jakarta-ant/lib/crimson.jar
±×·¡µµ ¿¡·¯°¡ ¹ß»ýÇϸé, Àǽɰ¡´Â .jar ¸¦ ¸ðÁ¶¸® Ãß°¡ÇØÁØ´Ù. (ÁøÂ¥, ³ë°¡´ÙÀÓ....
³ë°¡´ÙÀÛ¾÷ÀÇ ³ôÀº ¼º°øÀ²Àº ³ªÀÇ °æÇè»ó ¼ö¸¹Àº °æÇè¿¡¼ ¿Â´ç...)
±×¸®°í ´Ù½Ã ½ÇÇà
# ./build.sh
10. Tomcat Start/Shutdown
# cd $TOMCAT_HOME/build/tomcat
# ./bin/startup.sh
¿¡·¯°¡ ¹ß»ýÇϸé (crimson.jar)À» ´ÙÀ½°ú °°ÀÌ º¹»çÇÑ´Ù. ÃÖÁ¾ÀûÀ¸·Î tomcatÀ» startup
ÇÒ¶§, ´ÙÀ½°ú °°Àº ÆÄÀÏÀÌ ¾Æ·¡ À§Ä¡¿¡ ÀÖ¾î¾ß ÇÑ´Ù.
# cd $TOMCAT_HOME/build/tomcat/lib
# ls -l
-rw-r--r-- 1 seluser seluser 415002 Oct 13 19:35 ant.jar
-rw-r--r-- 1 seluser seluser 196399 Oct 14 17:44 crimson.jar
-rw-r--r-- 1 seluser seluser 33323 Oct 13 19:44 jaxp.jar
-rw-r--r-- 1 seluser seluser 136198 Oct 13 19:55 parser.jar
-rw-r--r-- 1 seluser seluser 40812 Oct 13 19:35 servlet.jar
drwxr-xr-x 3 seluser seluser 512 Oct 13 19:35 test/
# cp $TOMCAT_HOME/jakarta-ant/lib/crimson.jar $TOMCAT_HOME/build/tomcat/lib
Á¤»óÀûÀ¸·Î tomcatÀÌ ½ÇÇàÀÌ µÇ¸é
http://localhost:8080/ Çغ¸¸é Tomcat ½ÇÇà ȸéÀÌ ¶á´Ù.
±×·¡µµ ¿¡·¯°¡ ¶ß¸é,
# vi ~/.cshrc
¿¡¼,
setenv TOMCAT_HOME /swlab/backup2/seluser/apache/tomcat/build/tomcat ÀÌ·¸°Ô ¹Ù²ãÁØ´Ù.
# source ~/.cshrc ÇÏ°í ´Ù½Ã
# cd $TOMCAT_HOME
# ./bin/startup.sh
If ¼º°ø
ps -ef |grep java Çغ¸¸é ¹¹°¡ º¸ÀÏ°ÍÀÌ´Ù.
shutdown ÇÏ´Â ¹æ¹ýÀº ´ÙÀ½°ú °°´Ù.
# cd $TOMCAT_HOME/build/tomcat
# ./bin/shutdown.sh
/*************************************************
mod_jsev.so ¸¦ ¸¸µé¾î ³»´Â ¹æ¹ý
**************************************************/
# vi ~/.cshrc
¿¡¼,
setenv TOMCAT_HOME /swlab/backup2/seluser/apache/tomcat ÀÌ·¸°Ô ´Ù½Ã ¹Ù²ãÁØ´Ù.
# source ./.cshrc
mod_jserv.soÀ» Á÷Á¢ ÄÄÆÄÀÏÇÏ·Á¸é ´ÙÀ½°ú °°ÀÌ ÇÑ´Ù.
# cd $TOMCAT_HOME/jakarta-tomcat/src/native/apache/jserv
# apxs -c -o mod_jserv.so *.c
¸¸ÀÏ apxs¸¦ ãÁö ¸øÇÑ´Ù¸é ¾ÆÆÄÄ¡¸¦ ¼³Ä¡ÇÑ °÷ÀÇ binµð·ºÅ丮¿¡ ÀÖÀ¸¹Ç·Î
°æ·Î¸¦ ¸ðµÎ ½á Áְųª, .cshrc ÆÄÀÏÀ» ÆíÁýÇؼ apxsÀÇ °æ·Î¸¦ ½áÁÖ¸é µÈ´Ù. ±×¸®°í ´Ù½Ã
·Î±×ÀÎÀ» Çϰųª, # source .cshrc À» ÇÏ¿©¾ß¸¸ °æ·Îº¯°æÀÌ Àû¿ëµÈ´Ù. apxs´Â apache/bin
¿¡ ÀÖ´Ù. apxs´Â ³»ºÎÀûÀ¸·Î perlÀ» È£ÃâÇϱ⠶§¹®¿¡ ¼¹ö¿¡ ¹Ýµå½Ã perlÀÌ ¼³Ä¡µÇ¾î ÀÖ¾î¾ß
ÇÑ´Ù. perlÀÇ °æ·Î´Â Apache¸¦ configureÇÒ¶§ --with-perl=/usr/local/bin/perl °ú °°ÀÌ
°æ·Î¸¦ ÁöÁ¤ÇØÁà¾ß ÇÑ´Ù.
¾ÆÆÄÄ¡´Â DSO¸¦ Áö¿øÇϵµ·Ï ÄÄÆÄÀϵǾî¾ß mod_jserv.soÀ» µ¿ÀûÀ¸·Î ·ÎµåÇÒ ¼ö ÀÖ´Ù.
¹èÆ÷º»¿¡ Æ÷ÇÔµÈ °ÍÀ̶ó¸é ´ëºÎºÐ DSO¸¦ Áö¿øÇϵµ·Ï µÇ¾î ÀÖÀ¸¹Ç·Î ¹®Á¦°¡ ¾øÀ¸³ª
Á÷Á¢ ÄÄÆÄÀÏÀ» ÇÏ´Â °æ¿ì¶ó¸é configure ½ÇÇà½Ã¿¡ ¹Ýµå½Ã --enable-module=so ¿É¼ÇÀ»
ÁÖ¾î¾ß ÇÑ´Ù.
If ´ÙÀ½°ú °°ÀÌ ¿¡·¯ ¹ß»ýÇÏ´Â °æ¿ì
apxs fails with apxs:Break: Command failed + with rc=255, it may have been damaged by +
mod_ssl.
(À̺κР¿¡·¯¶§¹®¿¡ 5½Ã°£ °í»ýÇß´ç... Á¹¶ó ¿¹Þ¾Ò´ø ºÎºÐ...)
apache/bin/apxs ÆÄÀÏÀ» ´ÙÀ½°ú °°ÀÌ ÆíÁýÇÑ´ç.
my $CFG_LD_SHLIB = q(); # substituted via Makefile.tmpl
my $CFG_LDFLAGS_SHLIB = q(); # substituted via Makefile.tmpl
my $CFG_LD_SHLIB = q(ld); # substituted via Makefile.tmpl
my $CFG_LDFLAGS_SHLIB = q(-G); # substituted via Makefile.tmpl
And then,
# apxs -c -o mod_jserv.so *.c
If Success
cp mod_jserv.so apache/libexec ÇÑ´ç.
/*************************************************
mod_jk.so ¸¦ ¸¸µé¾î ³»´Â ¹æ¹ý
ÀÌ°ÍÀº mod_jserv.soÀÇ ´ëü¹öÀüÀÌ´ç.
**************************************************/
mod_jk.soÀ» Á÷Á¢ ÄÄÆÄÀÏÇÏ·Á¸é ´ÙÀ½°ú °°ÀÌ ÇÑ´Ù. mod_jk.so´Â mod_jserv.so¸¦ ´ëüÇϱâ À§ÇÑ
´ÙÀ½¹öÀüÀÌ´Ù.
# cd $TOMCAT_HOME/jakarta-tomcat/src/native/jk
# apxs -o mod_jk.so -DSOLARIS -I../jk -I/selhome/usr/local/java2/java1.2/include
-I/selhome/usr/local/java2/java1.2/include/solaris -c *.c ../jk/*.c
and then,
Successful!!!
If Success
cp mod_jk.so apache/libexec ÇÑ´ç.
º» ¹®¼¸¦ ÅëÇؼ Áö±Ý±îÁö Solaris¿¡¼ TomcatÀ» ÄÄÆÄÀÏÇϴµ¥ ¸¹Àº ¾Ö¸¦ ¸ÔÀº ºÐµé²²
Á¶±ÝÀÌ¶óµµ µµ¿òÀÌ µÇ¾úÀ¸¸é ÇÏ´Â ¹ÙÀÌ´Ù. ¹®¼¿¡ ´ëÇÑ ±Ã±ÝÇÑ »çÇ×ÀÌ ÀÖÀ¸¸é ¹®¼ÀÇ À§¿¡
¸í½ÃÇÑ È¨ÆäÀÌÁö ¶Ç´Â ¸ÞÀÏÁÖ¼Ò·Î ¿¬¶ôÀ» ÇÏ¸é ½Ã°£ÀÌ Çã¿ëÇÏ´Â Çѵµ³»¿¡¼ ´äº¯À» µå¸±°ÍÀ»
¾à¼ÓÇÑ´Ù. ¹®¼¿¡¼ ¿À·ù°¡ ÀÖÀ¸¸é Àú¿¡°Ô ¸ÞÀÏ·Î º¸³»ÁÖ¸é °í¸¿°Ú½À´Ï´Ù.
|