jdk1.7 tomcat-7安裝,jdk1.7tomcat-7

來源:互聯網
上載者:User

jdk1.7 tomcat-7安裝,jdk1.7tomcat-7

由於軟體經常有變動,所以不能直接wget,還是直接到網上點擊下載

下載jdk

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

選中Accept License Agreement,選擇64位的  jdk-7u65-linux-x64.tar.gz,如

 

下載tomcat, tomcat版本會更新,以下載版本號碼為準

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

把軟體上傳到/tmp中

安裝jdk

tar -zxvf jdk1.7.0_60.tar.gz mv jdk1.7.0_60 /usrvi /etc/profile

在prifile檔案結尾插入下一段

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

儲存文檔,然後讓配置生效

source /etc/profile

安裝tomcat

tar -zxvf apache-tomcat-7.0.54.tar.gzcp -r /tmp/apache-tomcat-7.0.54 /datacd /datamv apache-tomcat-7.0.54/ tomcatcd /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##     http://www.apache.org/licenses/LICENSE-2.0## 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 setexport JAVA_HOME=/usr/jdk1.7.0_60export JRE_HOME=/usr/jdk1.7.0_60/jre/  
儲存文本,重啟tomcat
tomcat安裝目錄E:\apache-tomcat-7032 ,jdk17安裝目錄E:\Java 那tomcat怎配置 ?

你好,首先確認你本機上已經安裝了JDK,並且配置成功,這才是前提。
配置jdk的環境變數:
JAVA_HOME=E:\Java
classpath=.;E:\Java\一直到lib下
path=E:\Java\一直到bin下
就這樣就OK了。
 
tomcat jdk版本低 我機器有安裝的jdk17 怎替換tomcat的jdk ?

tomcat的啟動rub.bat修改java_home路徑啊,到裡面
set /p java_home,寫死了,然後就可以了,tomcat8才支援jdk7呢,其他都是別的。
太簡單了
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.