码迷,mamicode.com
首页 > 其他好文 > 详细

tomcat 安装

时间:2016-10-09 20:59:31      阅读:262      评论:0      收藏:0      [点我收藏+]

标签:jdk tomcat



### 安装jdk


    tar xf jdk-8u73-linux-x64.tar.gz

    mv jdk1.8.0_73 /usr/local/jdk1.8.0_73

    

    #配置

    echo ‘

    export JAVA_HOME=/usr/local/jdk1.8.0_73

    export JRE_HOME=/usr/local/jdk1.8.0_73

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

    export PATH=$JAVA_HOME/bin:$JAVA_HOME/bin:$PATH

    PATH=/usr/local/jdk1.8.0_73/bin:/usr/local/jdk1.8.0_73/jre/bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/root/bin

    export PATH

    ‘ >> /etc/profile ;

    source /etc/profile;

    

    #或者

    echo ‘

    JAVA_HOME=/usr/local/jdk1.8.0_73

    JAVA_BIN=/usr/local/jdk1.8.0_73/bin

    JRE_HOME=/usr/local/jdk1.8.0_73/jre

    PATH=$PATH:/usr/local/jdk1.8.0_73/bin:/usr/local/jdk1.8.0_73/jre/bin

    CLASSPATH=/usr/local/jdk1.8.0_73/jre/lib:/usr/local/jdk1.8.0_73/lib:/usr/local/jdk1.8.0_73/jre/lib/charsets.jar

    ‘ >> /etc/profile.d/java.sh

    source /etc/profile.d/java.sh

    

    #查看

    java -version

    

### 安装tomcat


    tar xf apache-tomcat-8.0.32.tar.gz

    mv apache-tomcat-8.0.32 /usr/local/tomcat8

    cp -pv /usr/local/tomcat8/bin/catalina.sh /etc/init.d/tomcat

    

    vim /etc/init.d/tomcat

    #!/bin/sh

    # chkconfig: 2345 63 37

    # description: tomcat server init script

    # Source Function Library

    . /etc/init.d/functions

    JAVA_HOME=/usr/local/jdk1.8.0_73

    CATALINA_HOME=/usr/local/tomcat8

    

    

    chmod 755 /etc/init.d/tomcat

    chkconfig --add tomcat

    chkconfig tomcat on

    service tomcat start

    ps aux |grep tomcat


本文出自 “tang” 博客,请务必保留此出处http://tang028.blog.51cto.com/10011574/1859782

tomcat 安装

标签:jdk tomcat

原文地址:http://tang028.blog.51cto.com/10011574/1859782

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!