jdk1.7 tomcat-7安装

系统 2134 0

由于软件下载地址经常有变动,所以不能直接wget,还是直接到网上点击下载

下载jdk

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

选中Accept License Agreement,选择64位的   jdk-7u65-linux-x64.tar.gz ,如下图

jdk1.7 tomcat-7安装

 

下载tomcat, tomcat版本会更新,以下载版本号为准

http://tomcat.apache.org/download-70.cgi

把软件上传到/tmp中

安装jdk

      
        cd /tmp
        
tar
-zxvf jdk-7u60-linux-x64.gz
mv jdk1. 7 .0_60 / usr vi /etc/profile

在prifile文件结尾插入下一段

export JAVA_HOME=/usr/jdk1.7.0_60
export JAVA_BIN=/usr/jdk1.7.0_60/bin 
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

保存文档,然后让配置生效

      source /etc/profile
    

安装tomcat

      
        tar
      
       -zxvf apache-tomcat-
      
        7.0
      
      .
      
        54
      
      .
      
        tar
      
      
        .gz


      
      
        cp
      
       -r /tmp/apache-tomcat-
      
        7.0
      
      .
      
        54
      
       /
      
        data

cd 
      
      /
      
        data


      
      
        mv
      
       apache-tomcat-
      
        7.0
      
      .
      
        54
      
      /
      
         tomcat

cd 
      
      /data/tomcat/
      
        bin

.
      
      /startup.
      
        sh
      
    
用浏览器打开如下的网页 
http://localhost:8080/ ;
如果你见到Tomcat的网页(index.jsp),证明Tomcat安装成功,并已经启动.
 
 
jdk环境错误,$JAVA_HOME这个变量没有定义时,解决情况如下
        cd /data/tomcat/bin
        
vi setclasspath.sh 

在setclasspath.sh中插入红色部分

#!/bin/sh
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -----------------------------------------------------------------------------
#  Set JAVA_HOME or JRE_HOME if not already set, ensure any provided settings
#  are valid and consistent with the selected start-up options and set up the
#  endorsed directory.
# -----------------------------------------------------------------------------
# Make sure prerequisite environment variables are set
export JAVA_HOME=/usr/jdk1.7.0_60
export JRE_HOME=/usr/jdk1.7.0_60/jre/
 
 
保存文本,重启tomcat

jdk1.7 tomcat-7安装


更多文章、技术交流、商务合作、联系博主

微信扫码或搜索:z360901061

微信扫一扫加我为好友

QQ号联系: 360901061

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。

【本文对您有帮助就好】

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描上面二维码支持博主2元、5元、10元、自定义金额等您想捐的金额吧,站长会非常 感谢您的哦!!!

发表我的评论
最新评论 总共0条评论