由于軟件下載地址經常有變動,所以不能直接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
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_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 .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
如果你見到Tomcat的網頁(index.jsp),證明Tomcat安裝成功,并已經啟動.
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 setexport JAVA_HOME=/usr/jdk1.7.0_60export JRE_HOME=/usr/jdk1.7.0_60/jre/??
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
