首页 > 代码库 > 安装 tomcat

安装 tomcat

2.安装 tomcat
  (1)下载    lftp 192.168.2.251
             sh /root/jdk-6u32-linux-x64.bin
             mv /root/jdk1.6.0_32/ /usr/local/lnmp/jdk
  (2)命令    vim /etc/profile
               export JAVA_HOME=/usr/local/lnmp/jdk(zuihou)
               export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
               export PATH=$PATH:$JAVA_HOME/bin
             source /etc/profile
  (3)检测     echo $JAVA_HOME
               /usr/local/lnmp/jdk
             echo $PATH
               /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/lnmp/mysql/bin:
        /root/bin:/usr/local/lnmp/mysql/bin:/usr/local/lnmp/php/bin/:/usr/local/lnmp/jdk/bin
             echo $CLASSPATH
               .:/usr/local/lnmp/jdk/lib:/usr/local/lnmp/jdk/jre/lib
             which java
              /usr/local/lnmp/jdk/bin/java
             which javac
              /usr/local/lnmp/jdk/bin/javac
  (4)java测试 vim /root/test.java
                public class test {
                      public static void main(String[] args)
                      {
                            System.out.println("hello");
                      }
               }
             javac test.java  ( 检测语法 )
             java test        ( 运行 )
              hello        ( 运行结果 )

安装 tomcat