⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 398.html

📁 关于jsp的一些好文章 主要介绍一些关于JSP的应用技巧方面的东西
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<br>    APACHE_HOME=/usr/local/apache_1.3.14<br>    export APACHE_HOME<br><br><br>12) edited a file in $APACHE_HOME/conf/httpd.conf (in my case:<br>      /usr/local/apache_1.3.14/conf/httpd.conf) and<br>    added (actually uncommented):<br>      ServerName heechee.osc.edu<br>    Then changed ports not to confilct with other servers I am running.<br>      Port 80  --&gt; Port 5180<br>      Listen 80 --&gt; Listen 5180<br>      Listen 443 --&gt; Listen 5143<br>      &lt;VirtualHost _default_:443&gt;  --&gt; &lt;VirtualHost _default_:5143&gt;<br><br><br>13) Testing if Apache works:<br>    a) make sure other installation of apache is not running,<br>       or if it runs, it does not use port 5180 and port 5143.<br>       (do: ps -ef | grep httpd), and if httpd runs, kill it either<br>       with its own apachectl script, or if you do not know what it is<br>       just find the PID of the httpd process which is owned by root:<br>          ps -ef | grep root | grep httpd<br>       (PID is in the second column of the output from ps). Kill it first with<br>          kill PID<br>       and then find all other apaches:<br>          ps -ef |  grep httpd<br>       and kill them one by one.<br><br>    b) start apache with:<br>       /usr/local/apache_1.3.14/bin/apachectl startssl<br>       If you have warning, you have a problem, and try to<br>       do "exactly what I say" next time {:-)}.<br><br>    c) Use your browser (preferable on some other machine)<br>       and check if http: and https: work<br>       In my case, I tried URLs:<br>         <a href="http://heechee.osc.edu:5180/" target=_blank>http://heechee.osc.edu:5180/</a><br>       and<br>         <a href="https://heechee.osc.edu:5143/" target=_blank>https://heechee.osc.edu:5143/</a><br>       In the https case you should get a lot of windows<br>       which ask you for accepting the certificate if you did not have<br>       https protocol from this site before, or with different certificates.<br>       Just click Next to the series of questions, and also mark<br>       "Keep this certificate forever" on one of the boxes.<br><br>    d) Stop apache, since you are not finshed yet.<br>       /usr/local/apache_1.3.14/bin/apachectl stop<br><br><br><br><br>        Building and installing tomcat<br>        ==============================<br><br>        At the time of this writing I was playing with 2 releases<br>        3.2beta5 (Sept 23, 2000) and 3,2beta6 (Oct 12, 2000).<br>        I decided to go with patched 3.2beta5 since it passed watchdog tests.<br><br>14) You need to get JAXP (Sun API and XML parsing in Java):<br>       <a href="http://java.sun.com/xml/" target=_blank>http://java.sun.com/xml/</a><br>     click on Download JAXP reference implementation<br>     to get to:  <a href="http://java.sun.com/xml/download.html" target=_blank>http://java.sun.com/xml/download.html</a><br>     Click on "ZIP (all platforms)" and after legal mambo-jumbo<br>     get the jaxp-1_0_1.zip (857807 bytes)<br>       unzip jaxp-1_0_1.zip<br>       mv jaxp1.0.1 /usr/local<br><br>     Place the jaxp.jar and parser.jar in your classpath<br>     CLASSPATH=${CLASSPATH}:/usr/local/jaxp1.0.1/jaxp.jar<br>     CLASSPATH=${CLASSPATH}:/usr/local/jaxp1.0.1/parser.jar<br>     export CLASSPATH<br><br> <br>15) Create directory /usr/local/tomcat_3.2<br>      mkdir /usr/local/tomcat_3.2<br>      JAKARTA_HOME=/usr/local/tomcat_3.2<br>      export JAKARTA_HOME<br>   and put there the source release 3.2 beta 5 of tomcat:  <br>     cd $JAKARTA_HOME<br>     wget <a href="http://jakarta.apache.org/builds/tomcat/release/v3.2/src/jakarta-servletapi-3.2-src.tar.gz" target=_blank>http://jakarta.apache.org/builds/tomcat/release/v3.2/src/jakarta-servletapi-3.2-src.tar.gz</a><br>     wget <a href="http://jakarta.apache.org/builds/tomcat/release/v3.2/src/jakarta-tomcat-3.2-src.tar.gz" target=_blank>http://jakarta.apache.org/builds/tomcat/release/v3.2/src/jakarta-tomcat-3.2-src.tar.gz</a>  <br>     wget <a href="http://jakarta.apache.org/builds/ant/release/v1.2/src/jakarta-ant-src.tar.gz" target=_blank>http://jakarta.apache.org/builds/ant/release/v1.2/src/jakarta-ant-src.tar.gz</a><br><br>    I also have them here locally, if you want:<br>      jakarta-ant-src.tar.gz<br>      jakarta-servletapi-3.2-src.tar.gz<br>      jakarta-tomcat-3.2-src.tar.gz<br>         <br>16) Untar them as:<br>        cd $JAKARTA_HOME<br>        mkdir jakarta-ant-src<br>        cd jakarta-ant-src<br>        gtar zxvf ../jakarta-ant-src.tar.gz<br>        cd /usr/local/tomcat_3.2<br>        gtar zxvf jakarta-servletapi-3.2-src.tar.gz<br>        gtar zxvf jakarta-tomcat-3.2-src.tar.gz<br><br>17) Installing/building  ANT -- the tool needed to build Tomcat<br>       cd $JAKARTA_HOME/jakarta-ant-src<br>       ./bootstrap.sh<br>       ./build.sh<br>       cd $JAKARTA_HOME/build<br>       mv ant $JAKARTA_HOME/ant-1.2<br>       ANT_HOME=${JAKARTA_HOME}/ant-1.2<br>       export ANT_HOME<br>       CLASSPATH=${CLASSPATH}:${ANT_HOME}/lib/ant.jar<br>       export CLASSPATH<br>       PATH=${PATH}:${ANT_HOME}/bin<br>       export PATH<br><br>18) Installing/building servlet API<br>       cd $JAKARTA_HOME/jakarta-servletapi-3.2-src<br>       chmod 755 build.sh <br>       ./build.sh dist<br>       cd $JAKARTA_HOME/dist<br>       mv servletapi ${JAKARTA_HOME}/servletapi-3.2<br>       SERVLETAPI_HOME=${JAKARTA_HOME}/servletapi-3.2<br>       export SERVLETAPI_HOME<br>       CLASSPATH=${CLASSPATH}:${SERVLETAPI_HOME}/lib/servlet.jar<br>       export CLASSPATH<br><br>       At this point my relevant environment variables are:<br>PATH=/usr/local/bin:/usr/local/jdk1.3/bin:/usr/sbin:\<br>/usr/bin:/usr/local/bin:/usr/ccs/bin:/usr/ucb:\<br>/usr/local/sbin:/usr/openwin/bin:\<br>/usr/local/tomcat_3.2/ant-1.2/bin<br><br>SERVLETAPI_HOME=/usr/local/tomcat_3.2/servletapi-3.2<br><br>CLASSPATH=/usr/local/jdk1.3/lib/tools.jar:/usr/local/jdk1.3/lib/dt.jar:\<br>/usr/local/jdk1.3/jre/lib/ext/jce1_2_1.jar:\<br>/usr/local/jdk1.3/jre/lib/ext/jcert.jar:\<br>/usr/local/jdk1.3/jre/lib/ext/jnet.jar:\<br>/usr/local/jdk1.3/jre/lib/ext/jsse.jar:\<br>/usr/local/jaxp1.0.1/jaxp.jar:\<br>/usr/local/jaxp1.0.1/parser.jar:\<br>/usr/local/tomcat_3.2/ant-1.2/lib/ant.jar:\<br>/usr/local/tomcat_3.2/servletapi-3.2/lib/servlet.jar<br><br>APACHE_HOME=/usr/local/apache_1.3.14<br>JAVA_HOME=/usr/local/jdk1.3<br>ANT_HOME=/usr/local/tomcat_3.2/ant-1.2<br>JAKARTA_HOME=/usr/local/tomcat_3.2<br><br><br>19) Installing/building tomcat (unpacked)<br>       cd $JAKARTA_HOME/jakarta-tomcat-3.2-src<br>       ./build.sh<br>    I got the error:<br>       /usr/local/tomcat_3.2/jakarta-tomcat-3.2-src/build.xml:<br>         33: /usr/local/tomcat_3.2/jakarta-ant/bin not found.<br>    Rather than chasing some bug in the build.xml, I did:<br>       cd $JAKARTA_HOME<br>       mkdir jakarta-ant<br>       cd jakarta-ant<br>       ln -s ${ANT_HOME}/bin bin<br>    and repeated<br>       cd $JAKARTA_HOME/jakarta-tomcat-3.2-src<br>       ./build.sh<br>       ./build.sh dist<br>       cd ${JAKARTA_HOME}/dist<br>       mv tomcat ${JAKARTA_HOME}/tomcat-3.2<br>       TOMCAT_HOME=${JAKARTA_HOME}/tomcat-3.2<br>       export TOMCAT_HOME<br><br><br>20) testing Tomcat  <br><br>     Since there are a lot of files in the $TOMCAT_HOME/conf, I decided<br>     to move all files which are there to a separate directory, and then<br>     copy what I need:<br>       cd $TOMCAT_HOME/conf<br>       mkdir original-conf<br>       mv * original-conf<br>       cd original-conf<br>       cp server.xml ..<br>       cp web.xml ..<br>       cp mod_jk.conf ..<br>       cp workers.properties ..<br>       cp tomcat-users.xml ..<br><br><br>     Since I have other Tomcats running on this machine, I changed<br>     the default ports in $TOMCAT_HOME/conf/server.xml<br> <br>         cd $TOMCAT_HOME/conf<br><br><br>         emacs server.xml<br>               Change 8080 --&gt; 5280<br>               Change 8007 --&gt; 5007<br>     While the SSL connector is at this moment commented, I changed the<br>     the port <br>               Change 8443 --&gt; 5443<br><br>     so I do not forget about it in the future.<br>     Note that server.xml is the file which is read in by Tomcat to<br>     configure itself. Tomcat does not use any information from<br>     workers.properties or mod_jk.conf (may still use them to provide<br>     automatic configuration files for Apache, but I do not think it<br>     uses any information from these files for itself).<br>     The files like tomcat-apache.conf, tomcat.properties, tomcat.conf<br>     are used when tomcat was working with mod_jserv module. We are using<br>     here mod_jk module, and these files can be ignored.<br><br><br><br>     Now, starting tomcat to test:<br><br>       cd $TOMCAT_HOME/bin<br>       ./startup.sh<br>   <br>    then checked the stuff at tomcat port <br><br>       <a href="http://heechee.osc.edu:5280/" target=_blank>http://heechee.osc.edu:5280/</a>       <br><br>    and looked at test pages. Things worked... Then I shut it down as:<br><br>       ./shutdown.sh<br><br><br>21)  At this point it may be smart to make sure that environment is fine.<br>     I created a file $APACHE_HOME/bin/do_env. It is usefull to have this<br>    file around if you want to recompile things or something.<br>--------------  cut --------------<br>    APACHE_HOME=/usr/local/apache_1.3.14<br>    export APACHE_HOME<br><br>    JAVA_HOME=/usr/local/jdk1.3<br>    export JAVA_HOME<br><br>    JAKARTA_HOME=/usr/local/tomcat_3.2<br>    export JAKARTA_HOME<br><br>    TOMCAT_HOME=/usr/local/tomcat_3.2/tomcat-3.2<br>    export TOMCAT_HOME<br><br>    ANT_HOME=/usr/local/tomcat_3.2/ant-1.2<br>    export ANT_HOME<br><br>    SERVLETAPI_HOME=/usr/local/tomcat_3.2/servletapi-3.2<br>    export SERVLETAPI_HOME<br><br>    PATH=/usr/local/bin:${JAVA_HOME}/bin:/usr/sbin:/usr/bin<br>    PATH=${PATH}:/usr/local/bin:/usr/ccs/bin:/usr/ucb:/usr/local/sbin<br>    PATH=${PATH}:/usr/openwin/bin:${ANT_HOME}/bin<br>    export PATH<br><br><br>    CLASSPATH=${JAVA_HOME}/lib/tools.jar<br>    CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/dt.jar<br>    CLASSPATH=${CLASSPATH}:${JAVA_HOME}/jre/lib/ext/jce1_2_1.jar<br>    CLASSPATH=${CLASSPATH}:${JAVA_HOME}/jre/lib/ext/jcert.jar<br>    CLASSPATH=${CLASSPATH}:${JAVA_HOME}/jre/lib/ext/jnet.jar<br>    CLASSPATH=${CLASSPATH}:${JAVA_HOME}/jre/lib/ext/jsse.jar<br>    CLASSPATH=${CLASSPATH}:/usr/local/jaxp1.0.1/jaxp.jar<br>    CLASSPATH=${CLASSPATH}:/usr/local/jaxp1.0.1/parser.jar<br>    CLASSPATH=${CLASSPATH}:${ANT_HOME}/lib/ant.jar<br>    CLASSPATH=${CLASSPATH}:${SERVLETAPI_HOME}/lib/servlet.jar<br><br>-----------------  cut -------------<br> <br>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -