Friday Dec 26, 2008

Installanation tomcat in Openslaris

   This article introudce how to install tomcat in Opensolaris with command.

   1、Check if you have installed JDK,using following command:

java -version

      if this shows:java version "1.6" that's right.On the contrary,you'll install JDK first.

   2、Install tomcat.The compressed tomcat file(apache-tomact-5.5.28.tar.gz) is loaded in /export

      First,following the command:

gunzip apache_tomcat_5.5.26.tar.gz

tar xvf apache-tomcat-5.5.26.tar

                 mkdir /usr/local

                 rm /usr/local/tomcat

                 ln -s /export/apache-tomcat-5.5.26 /usr/local

      Then,modify /etc/profile.Add the following statement between fi and unmask 022.

         using :vi /etc/profile ,then add :

JAVA_HOME=/usr/java

                  export JAVA_HOME

                  CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib

                  export CLASSPATH

                 CATALINA_BASE=/usr/local/tomcat/apache-tomcat-5.5.26

                 CATALINA_HOME=/usr/local/tomcat/apache-tomcat-5.5.26

                 PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$CATALINA_HOME/bin:/usr/sfw/bin:/usr/ccs/bin

export PATH

     Lastly,start tomcat server.

        1、Enter direction /export/apache-tomcat-5.5.26/bin,using the following commad:

cd /export/apache-tomcat-5.5.26/bin

        2、execute command:

.startup.sh

         if you can see:

                 bash-3.00# ./startup.sh

                 Using CATALINA_BASE: /export/apache-tomcat-5.5.26

                 Using CATALINA_HOME: /export/apache-tomcat-5.5.26

                 Using CATALINA_TMPDIR: /export/apache-tomcat-5.5.26/temp

Using JAVA_HOME: /usr/java

        that's ok.

        3、Enter http://localhost:8080 in your browser to test.

   Reference:http://blog.chinaunix.net/u2/70777/showart_1072046.html





About

Wei Guan

Search

Categories
Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today