中文字幕理论片,69视频免费在线观看,亚洲成人app,国产1级毛片,刘涛最大尺度戏视频,欧美亚洲美女视频,2021韩国美女仙女屋vip视频

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開(kāi)通VIP
Tomcat安裝手冊(cè)

Tomcat安裝手冊(cè)

作者:FunBSD
最后更新:2005年1月26日

目錄


  • Tomcat

    這篇文章是基于Linux寫的,F(xiàn)reeBSD上可以用ports安裝。

    Tomcat從5.5開(kāi)始支持JDK1.5,并且內(nèi)置Eclipse JDT Java編譯,不需要JDK,只需JRE即可運(yùn)行。

    當(dāng)然也可使用JDK或其他支持Apache Ant的Java編譯器。

    如果使用JDK1.4,則需要安裝jakarta-tomcat-version-compat.tar.gz兼容包。

    網(wǎng)址:http://jakarta.apache.org/tomcat/

    下載:http://jakarta.apache.org/site/binindex.cgi

    安裝:

    groupadd tomcat -g 8009
    useradd tomcat -u 8009 -g tomcat

    cd /home/pkg
    wget http://apache.justdn.org/jakarta/tomcat-5/v5.5.4/bin/jakarta-tomcat-5.5.4.tar.gz
    wget http://apache.freelamp.com/jakarta/tomcat-5/v5.5.4/bin/jakarta-tomcat-5.5.4-admin.tar.gz
    wget http://apache.justdn.org/jakarta/tomcat-5/v5.5.4/bin/jakarta-tomcat-5.5.4-compat.tar.gz

    cd /usr/local
    tar zxf /home/pkg/jakarta-tomcat-5.5.4.tar.gz
    tar zxf /home/pkg/jakarta-tomcat-5.5.4-admin.tar.gz
    tar zxf /home/pkg/jakarta-tomcat-5.5.4-compat.tar.gz
    mv jakarta-tomcat-5.5.4 tomcat

    cd tomcat/bin
    tar xfz jsvc.tar.gz
    cd jsvc-src
    sh support/buildconf.sh
    sh configure
    make
    cp jsvc ..

    添加虛擬主機(jī)(/usr/local/tomcat/conf/server.xml):

    <GlobalNamingResources>
      <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase"
        description="User database that can be updated and saved"
        factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
        pathname="user/tomcat-users.xml"/>
    </GlobalNamingResources>

    <Service name="Catalina">
      <Engine name="Catalina" defaultHost="localhost">
        ......
        <Host name="java.funbsd.net" appBase="/home/funbsd/java" unpackWARs="true"
            autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
        <Alias>jsp.funbsd.net</Alias>
          <Context path="" docBase="" debug="1"/>
          <!--
          <Context path="/servlets" docBase="servlets"/>
          -->
        </Host>
      </Engine>
    </Service>

    設(shè)置索引頁(yè)(/usr/local/tomcat/conf/web.xml):

    <servlet>
      <servlet-name>default</servlet-name>
      <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
      <init-param>
        <param-name>debug</param-name>
        <param-value>0</param-value>
      </init-param>
      <init-param>
        <param-name>listings</param-name>
        <param-value>false</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
    </servlet>
    <welcome-file-list>
      <welcome-file>index.html</welcome-file>
      <welcome-file>index.htm</welcome-file>
      <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

    設(shè)置用戶(/usr/local/tomcat/user/tomcat-users.xml):

    <?xml version=‘1.0‘ encoding=‘utf-8‘?>
    <tomcat-users>
    <role rolename="admin"/>
    <role rolename="manager"/>
    <user username="admin" password="adminpwd" roles="admin,manager"/>
    </tomcat-users>

    添加啟動(dòng)腳本(/etc/init.d/tomcat):

    #!/bin/sh
    # chkconfig: 345 85 15
    # description: Tomcat Start and Stop Utility

    JAVA_HOME=/usr/local/java
    CATALINA_HOME=/usr/local/tomcat
    TOMCAT_USER=tomcat
    TMP_DIR=/var/tmp
    OUTFILE=/var/log/tomcat/stdout.log
    ERRFILE=/var/log/tomcat/stderr.log
    JAVA_OPTS="-Xms256m -Xmx512m"
    CATALINA_OPTS=
    CLASSPATH=\
    $JAVA_HOME/lib/tools.jar:\
    $CATALINA_HOME/bin/commons-daemon.jar:\
    $CATALINA_HOME/bin/bootstrap.jar

    case "$1" in
      start)
        $CATALINA_HOME/bin/jsvc \
        -Djava.endorsed.dirs=$CATALINA_HOME/common/endorsed \
        -user $TOMCAT_USER \
        -home $JAVA_HOME \
        -Dcatalina.home=$CATALINA_HOME \
        -Djava.io.tmpdir=$TMP_DIR \
        -outfile $OUTFILE \
        -errfile $ERRFILE \
        $JAVA_OPTS \
        $CATALINA_OPTS \
        -cp $CLASSPATH \
        org.apache.catalina.startup.Bootstrap \
        #-verbose \
        #-debug \
      ;;
      stop)
        PID=`cat /var/run/jsvc.pid`
        kill $PID
      ;;
      *)
        echo "Usage: $0 {start|stop}"
        exit 1;;
    esac

    設(shè)置相應(yīng)的目錄和權(quán)限:

    mkdir -p /var/log/tomcat /home/funbsd/java
    chown -R tomcat:tomcat /usr/local/tomcat/user /usr/local/tomcat/work /home/funbsd/java
    chmod -R 755 /usr/local/tomcat/conf /etc/init.d/tomcat
    chkconfig --add tomcat

    啟動(dòng)服務(wù):

    /etc/init.d/tomcat start

    測(cè)試:

    http://java.funbsd.net:8080

返回頁(yè)首


  • JK2

    JK2可以使Tomcat作為Apache的一個(gè)模塊來(lái)使用:

    cd /home/pkg
    wget http://apache.justdn.org/jakarta/tomcat-connectors/jk2/jakarta-tomcat-connectors-jk2-src-current.tar.gz
    tar zxf jakarta-tomcat-connectors-jk2-src-current.tar.gz

    cd jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2
    ./configure --with-apxs2=/usr/local/apache/bin/apxs
    make

    cd ../build/jk2/apache2
    /usr/local/apache/bin/apxs -n jk2 -i mod_jk2.so

    配置Apache(/usr/local/apache/conf/httpd.conf):

    LoadModule jk2_module modules/mod_jk2.so

    DirectoryIndex index.jsp index.html index.html.var

    <VirtualHost *:80>
      ServerName java.funbsd.net
      ServerAdmin webmaster@funbsd.net
      DocumentRoot /home/funbsd/java
    </VirtualHost>

    配置JK2映射(/usr/local/apache/conf/workers2.properties):

    #設(shè)置共享內(nèi)存

    [shm]
    file=${serverRoot}/logs/shm.file
    size=1048576

    #定義worker

    #[status:status]

    [channel.socket:localhost:8009]
    port=8009
    host=127.0.0.1

    [ajp13:localhost:8009]
    channel=channel.socket:localhost:8009

    #定義uri映射

    #[uri:/jkstatus/*]
    #worker=status:status

    [uri:/*]
    worker=ajp13:localhost:8009

    #[uri:/servlets/*]
    #worker=ajp13:localhost:8009

    #[uri:java.funbsd.net/*.jsp]
    #worker=ajp13:localhost:8009

    重啟Apache:

    /usr/local/apache/bin/apachectl restart

    測(cè)試:

    http://java.funbsd.net

返回頁(yè)首


  • tips

    GLIBC2.2/Linux2.4應(yīng)定義以下環(huán)境變量:

    export LD_ASSUME_KERNEL=2.2.5

    Redhat Linux 9.0應(yīng)定義環(huán)境變量:

    export LD_ASSUME_KERNEL=2.4.1

返回頁(yè)首

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
CentOS Pub ---linux下apache和tomcat整合
一步一步教你如何在linux下配置apache+tomcat
linux下jdk,tomcat安裝以及環(huán)境變量的配置
從零認(rèn)識(shí)tomcat,構(gòu)建一機(jī)多實(shí)例tomcat集群
linux下整合Apache+Tomcat
Dockerfile 搭建tomcat基礎(chǔ)鏡像與項(xiàng)目鏡像
更多類似文章 >>
生活服務(wù)
熱點(diǎn)新聞
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服