solaris 10下安装java+tomcat


    1.       Java安装:
    把安装文件j2re-1_4_2_05-solaris-i586.sh上传到目录/export/home下面。
    以下内容基于Solaris10实现,如在Solaris8上安装,需提前安装8_Recommended.zip
    Solaris10自带JDK1.5.0时,亦可按以下操作执行,1.4.2会自动覆盖1.5.0
    以root用户拷贝“j2sdk-1_4_2_05-solaris-sparc.sh”和“j2sdk-1_4_2_05-solaris-sparcv9.sh”两个文件至 /usr目录下,执行以下命令:
    /usr>j2sdk-1.4.2_05-solaris-sparc.sh
    /usr>j2sdk-1.4.2_05-solaris-sparcv9.sh
    #rm /usr/java (去掉原有链接,此处提示失败即原无链接,不影响后续操作)
    #ln -s /usr/j2sdk1.4.2_05 /usr/java
    #java -version
    java version "1.4.2_05"    (如此显示即为已正确安装)
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
    Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)
    
    2.       安装tomcat 5.0
    以root用户拷贝“wsm_tomcat_20061016.tar.gz”文件至 /home目录下,执行以下命令:
         
    /home> gunzip wsm_tomcat_20061016.tar.gz
    /home> tar xvf wsm_tomcat_20061016.tar
    /home> mkdir /usr/local
    /home> rm /usr/local/tomcat
    /home> ln -s /home/jakarta-tomcat-5.0.28 /usr/local/tomcat
    修改/etc/profile文件,在文件中加入以下信息!红色部分为修改部分。
    -----------------------------------------------------
    JAVA_HOME=/usr/j2se
    export JAVA_HOME
    CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
    export CLASSPATH
    CATALINA_BASE=/usr/local/tomcat/jakarta-tomcat-5.0.28
    CATALINA_HOME=/usr/local/tomcat/jakarta-tomcat-5.0.28
    PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$CATALINA_HOME/bin:/usr/sfw/bin:/usr/ccs/bin
    export PATH
    
    启动tomcat服务:
    进入目录  /export/home/aceman/jakarta-tomcat-5.0.28/bin
    执行命令 : ./startup.sh  启动tomcat服务
    bash-3.00# ./startup.sh
    Using CATALINA_BASE:   /export/home/aceman/jakarta-tomcat-5.0.28
    Using CATALINA_HOME:   /export/home/aceman/jakarta-tomcat-5.0.28
    Using CATALINA_TMPDIR: /export/home/aceman/jakarta-tomcat-5.0.28/temp
    Using JAVA_HOME:       /usr/j2se
    然后输入:http://localhost