Á¦¸ñ : apache + jserv + gnujsp¼³Ä¡
»çÀüÀÛ¾÷
PowerLinux 2.0 ¼³Ä¡
apache1.3.9 => powerlinux¿¡ ÀÖ´Â °Í.
jsdk2.0 ¼³Ä¡(unix)
jdk118(linux)
jserv1.0 => unix¿ë download
¼³Ä¡¹æ¹ýÀÌ ÀÖ´Â ´Ù¸¥ »çÀÌÆ®
¾ÆÆÄÄ¡ Ȩ => apache + jserv +gnujsp
Á¤¼ø±Ç´Ô => Apache + PHP4B2 + J-Serv 1.2 + MySql
.profileȯ°æ¼³Á¤(ȤÀº .bash_profile)
export JDK=/home/tool/jdk118
export JSDK=/home/tool/JSDK2.0
export CLASSPATH=".:$JDK/lib/classes.zip"
#Jserv¸¦ ¼³Ä¡ÇÑÈÄ ¾Æ·¡È¯°æÀ» »ç¿ëÇÑ´Ù.
#export CLASSPATH=".:$JDK/lib/classes.zip:$JSDK/lib/jsdk.jar"
export PATH=.:$JDK/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/
bin:/usr/X11R6/bin
export LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib
apache¼³Ä¡(root°¡ ¾Æ´Ñ ÀϹݻç¿ëÀÚ·Î ¼³Ä¡)
1.apache source¸¦ ¼³Ä¡ÇÑ´ÙÀ½ apache source°¡ ¼³Ä¡µÈ °÷À¸·Î cd
2. config
./configure --prefix=/home/tool/httpd --enable-rule=SHARED_CORE --enable-module=so
=> --prefix ¼³Ä¡µÉ dir
3. make
make
4. install
make install
5.httpd.conf¼öÁ¤
Port 8080 =>Port 80
#ServerName ec1 => ServerName ec1
6.Test
¼³Ä¡µÈ °÷¿¡¼ ./apachectl start
=> root·Î ½ÇÇà
JServ¼³Ä¡(root°¡ ¾Æ´Ñ ÀϹݻç¿ëÀÚ·Î ¼³Ä¡)
1.JServ source¸¦ ¼³Ä¡ÇÑ´ÙÀ½ JServ source°¡ ¼³Ä¡µÈ °÷À¸·Î cd
2. config
./configure --prefix=/home/tool/jserv \
--with-apache-install=/home/tool/httpd \
--with-jdk-home=/home/tool/jdk118 \
--with-jsdk=/home/tool/JSDK2.0/lib/jsdk.jar \
--disable-debugging
=> --prefix ¼³Ä¡µÉ dir
(Âü°í jserv 1.1Àΰæ¿ì)
(
./configure --prefix=/home/tool/jserv \
--with-apxs=/home/tool/apache/bin/apxs \
--with-jdk-home=/home/tool/jdk118 \
--with-JSDK=/home/tool/JSDK2.0/lib/jsdk.jar \
--disable-debugging
)
3. make
make
4. install
make install
=>¼³Ä¡½Ã make[ ]¸Þ¼¼ÁöµéÀº ¹«½ÃÇÑ´Ù.
5. apacheÀÇ http.conf¼öÁ¤
Include "conf/jserv.conf" ¸¦ »ðÀÔÇÑ´Ù.
6. apacheÀÇ conf¹Ø¿¡ jservÆÄÀÏ º¹»ç
jserv.conf
jserv.properties
7. jserv.conf¼öÁ¤
ApJServProperties /home/tool/httpd/conf/jserv.properties
8. Test
./apachectl start
web¿¡¼ http://localhost/example/Hello
JServÀÇ ¼Ò½º¸¦ ÂüÁ¶Çϰí ÀÖ´Â ºÎºÐÀÇ È¯°æÀ» ½ÇÇàÈÀÏÀÌ ÀÖ´Â °÷À¸·Î ¼öÁ¤ÇÏÀÚ.
1.apacheÀÇ conf/jserv.conf¼öÁ¤
ApJServMount /example /example
¹Ø¿¡ »õ·Î¿î urlÃß°¡(/java=> url, /javazone=>zone name)
ApJServMount /java /javazone
log fileÀ§Ä¡ ¼öÁ¤
ApJServLogFile /home/tool/jserv/log/jserv.log
2.apacheÀÇ conf/jserv.properties
JservŬ·¡½º ÂüÁ¶ºÎºÐº¯°æ.
wrapper.classpath=/home/tool/src/ApacheJServ-1.0/src/java/ApacheJServ.jar
=>
wrapper.classpath=/home/tool/jserv/lib/ApacheJServ.jar
zoneÀ̸§ Ãß°¡
zones=example,javazone
zone ÇÁ¶óÆÛƼµî·Ï
javazone.properties=/home/tool/httpd/conf/javazone.properties
3.source¿¡ ÀÖ´Â example.properties À» cpÇÏ¿© javazone.properties»ý¼º
javazone.properties
4.javazone.properites ¼öÁ¤
repositories=/home/tool/httpd/servlet/java
gnujsp¼³Ä¡
1..source¿¡ ÀÖ´Â example.properties À» cpÇÏ¿© alph.properties»ý¼º
cp javazone.properties alph.properties
2.¸¸µé¾îÁø jsp code°¡ ÀúÀåÇÒ µð·ºÅ丮¸¸µé±â
mkdir /home/tool/httpd/jspcode
chmod 777 jspcode => (Áß¿ä: À̺κÐÀÌ ¾øÀ¸¸é /alph/gnujsp °¡ ¾ø´Ù´Â ¸Þ¼¼ÁöÃâ·Â)
3.alph.properties¼öÁ¤
repositories=/home/tool/gnujsp-1.0.0/lib/gnujsp10.jar
repositories=/home/tool/gnujsp-1.0.0/lib/servlet-2.0-plus.jar
servlet.gnujsp.code=org.gjt.jsp.JspServlet
servlet.gnujsp.initArgs=checkclass=true,pagebase=/home/tool/httpd/htdocs,
scratchdir=/home/tool/httpd/jspcode,debug=true,compiler=builtin-javac -classpath
%classpath%:%scratchdir%:/home/tool/gnujsp-1.0.0/lib/servlet-2.0-plus.jar:
/home/tool/gnujsp-1.0.0/lib/gnujsp10.jar -d %scratchdir% -deprecation %source%
4.jserv.properties¼öÁ¤
zones=example,javazone,alph
alph.properties=/home/tool/httpd/conf/alph.properties
5.jserv.conf¼öÁ¤
ApJServAction .jsp /alph/gnujsp
ApJServMount /alph /alph
6.Test
7.java beanÀ» »ç¿ëÇÒ °æ¿ì bean°æ·Î ¼³Á¤
bean dir »ý¼º
/home/tool/httpd/bean
alph.prpertiesÆÄÀÏ ¼öÁ¤
repositories=/home/tool/httpd/bean
servlet.gnujsp.initArgs=checkclass=true,pagebase=/home/tool/httpd/htdocs,scratch
dir=/home/tool/httpd/jspcode,debug=true,compiler=builtin-javac -classpath %class
path%:%scratchdir%:/home/tool/gnujsp-1.0.0/lib/servlet-2.0-plus.jar:/home/tool/g
nujsp-1.0.0/lib/gnujsp10.jar:/home/tool/httpd/bean -d %scratchdir% -deprecation
%source%
8.jdbc»ç¿ë½Ã jserv.properties ¼öÁ¤
wrapper.classpath=/home/oracle/jdbc/lib/classes111.zip
|