µ±Ç°Î»ÖãºLinux½Ì³Ì - Linux×ÊѶ - ÖÐСÆóÒµ·þÎñÆ÷ÅäÖ÷½°¸ µÚÈýÕÂ(3)

ÖÐСÆóÒµ·þÎñÆ÷ÅäÖ÷½°¸ µÚÈýÕÂ(3)

¡¡¡¡µÚÈýÕ Web·þÎñÆ÷ µÚÈý½Ú Apache+JservÕûºÍ Ò»¡¢ÐèÒªµÄÔ´Âë°ü£º jdk-1_2_2_006-Linux-i386.tar.gz jsdk20-solaris2-sparc[1].tar.Z ApacheJServ-1.1.2.tar.gz ¶þ¡¢°²×°¹ý³Ì °²×°jdk1.2.2 ½â¿ªÑ¹Ëõ°ü tar xvzf jdk1_2_2_006-linux-i386.tar.gz Ŀ¼µÄ´¦Àí ln -s jdk1.2.2 jdk ln -s jdk/jre jre (3) ÉèÖÃ$Java_HOME,$CLASSPATH vi /root/.bash_profile ¼ÓÈ룺 JAVA_HOME=/usr/local/jdk eXPort JAVA_HOME CLASSPATH=/usr/local/jdk/lib:/usr/local/jre/lib export CLASSPATH PATH=$PATH:/usr/local/jdk/bin:/usr/local/jre/bin ×¢£ºJDKµÄ°²×°µ½´Ë½áÊø¡£ °²×°JSDK tar zxvf jsdk20-solaris2-sparc[1].tar.Z ½«²úÉúµÄJSDK2.0Ŀ¼ÒƵ½ /usr/local/JSDK2.0 mv JSDK2.0 /usr/local/JSDK2.0 ×¢£ºJSDKµÄ°²×°µ½´Ë½áÊø¡£ ApacheºÍJservµÄ¾²Ì¬»ìºÏ±àÒë ËùνµÄ¾²Ì¬±àÒëÊÇÖ¸½«Jserv±àÒë½øapacheÀï tar xvzf apache_1.3.12.tar.gz tar xvzf ApacheJServ-1.1.2.tar.gz cd apache_1.3.12 ./configure --prefix=/usr/local/apache ÅäÖÃapache jserv±àÒë²ÎÊý cd ../ApacheJServ-1.1.2 ./configure \ --prefix=/usr/local/jserv \ --with-apache-src=../apache_1.3.12 \ --with-jdk-home=/usr/local/ jdk1.2.2 \ --with-java-platform=2 \ --with-JSDK=/usr/local/JSDK2.0/lib/jsdk.jar make make install ±àÒëapacheºÍapache jserv cd ../apache_1.3.12 ./configure \ ¡¡¡¡¡¡¡¡¡¡¡¡ --prefix=/usr/local/apache \ ¡¡¡¡¡¡¡¡¡¡¡¡ --activate-module=src/modules/jserv/libjserv.a make make install Ö´ÐÐ/usr/local/apache/bin/httpd -l¼ì²éÒ»ÏÂmod_jservÊÇ·ñ±àÒë½øapacheÁË ¸ü¸ÄÅäÖÃÎļþ /usr/local/apache/conf/httpd.conf Ìí¼Ó Include /usr/local/jserv/etc/jserv.conf ¸ü¸ÄÅäÖÃÎļþ /usr/local/jserv/etc/jserv.conf SetHandler jserv-status order deny,allow deny from all ¼ÓÈëÄãµÄÐÅÈÎÖ÷»úallow from xxxx ÕâÑùÔÚÐÅÈÎÖ÷»úÉÏͨ¹ýhttp://yourserver/jserv/(×¢ÒâºóÃæÕâ¸ö"/"²»ÄÜÉÙ£©¿ÉÒÔ¿´µ½ÄãµÄapache jservµÄÅäÖÃÐÅÏ¢¡£ ½Ó×ÅÔÚ/usr/local/jserv/servletsÏ·ÅÈëÄã×Ô¼ºµÄservlet classʵÑéÒ»ÏÂЧ¹û°É£¬²âÊÔ½á¹û±íÃ÷ÔÚredhat6.2ÏÂûÓÐÖÐÎÄÏÔʾÎÊÌ⣬һÇÐok! ÆäËû¹ØÓÚservlet zoneµÄÉèÖá¢load balanceµÈµÈÇë²Î¿¼apache jservÎĵµºÍjava.apache.orgÍøÕ¾
[1] [2] ÏÂÒ»Ò³ 

×¢£ºApacheºÍJserv»ìºÏ±àÒëµ½´Ë½áÊø Èý¡¢×îºóµÄ²âÊÔ£º 1£® Æô¶¯apache£º/usr/local/apache/bin/apachectl start 2£® ÓÃä¯ÀÀÆ÷²âÊÔhttp://yourserver/servlets/IsItWorking ¿´¼ûÁËYes,It's working!ÁËÂð£¿Äã³É¹¦ÁË£¡£¡

£¨³ö´¦£ºhttp://www.sheup.com£©


ÉÏÒ»Ò³ [1] [2]