Changes between Version 4 and Version 5 of waue/2009/0806


Ignore:
Timestamp:
Aug 6, 2009, 3:04:43 PM (15 years ago)
Author:
waue
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • waue/2009/0806

    v4 v5  
    22#!html
    33<h1 style="text-align: center; color: blue; font-weight: bold;">
    4 <big><big><big>Example</big></big></big>
     4<big><big><big> JSP 筆記 </big></big></big>
    55</h1>
    66}}}
     7[[PageOutline]]
    78
     9 = 一、安裝 =
     10 == 1.1 安裝 ==
     11 * 大部分的使用者都不建議用apt-get 安裝tomcat 因此建議用tarball方式解壓縮
     12 * 下載 [http://ftp.twaren.net/Unix/Web/apache/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz tomcat 6.0.20 2009/08/06]
     13 * 安裝
     14{{{
     15sudo mv ~/Desktop/apache-tomcat-6*.gz /opt/
     16cd /opt
     17sudo tar -zxvf apache-tomcat-6*.gz
     18sudo mv apache-tomcat-6* tomcat
     19sudo chown -R `whoami`:`whoami` tomcat
     20}}}
    821
     22 == 1.2 bootstrap ==
    923
    10 [[PageOutline]]
     24{{{
     25cd /opt/tomcat/bin
     26tar xvfz jsvc.tar.gz
     27cd jsvc-src
     28autoconf
     29./configure
     30make
     31cp jsvc ..
     32cd /opt/tomcat/
     33./bin/jsvc -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err org.apache.catalina.startup.Bootstrap
     34}}}
     35
     36 == 1.3 啟動停止tomcat ==
     37
     38 * 建立 /etc/init.d/tomcat ,內容為:
     39{{{
     40#!text
     41#! /bin/sh
     42
     43PATH=$PATH:/opt/tomcat/bin
     44do_start () {
     45        /opt/tomcat/bin/startup.sh
     46}
     47
     48do_stop () {
     49        /opt/tomcat/bin/shutdown.sh
     50}
     51case "$1" in
     52  start)
     53        do_start
     54        ;;
     55  restart|reload|force-reload)
     56        do_stop
     57        do_start
     58        ;;
     59  stop)
     60        do_stop
     61        ;;
     62  *)
     63        echo "Usage: $0 start|stop" >&2
     64        exit 3
     65        ;;
     66esac
     67}}}
     68 *
     69
     70 = 二、 =