Tomcat7安裝(jdk 1.7環境)

這篇文章着重講解tomcat7的安裝,首先須要下載tomcat包和相應的jdk,若是你的系統是32位,那麼下載x86的jdk,若是是64位的系統,那麼下載X64的JDK。

具體下載地址以下。
Tomcat 7:html

http://mirror.bjtu.edu.cn/apache/tomcat/tomcat-7/v7.0.22/bin/apache-tomcat-7.0.22.tar.gzjava

JDK 1.7(x86):linux

http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-i586.rpmapache

JDK 1.7(X64):tomcat

http://download.oracle.com/auth/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-x64.tar.gz?e=1320470032&h=786351a82836b064c25af90e614d23fboracle

一、查看系統版本測試

# uname –a //是64位系統,那麼咱們選擇64位的JDK
Linux 2.6.32-71.el6.x86_64 #1 SMP Fri May 20 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux

二、下載tomcat7和jdk1.ui

Tarbag專門放源碼包,software專門放解壓後的軟件包htm

# mkdir /usr/local/src/tarbag
# mkdir /usr/local/src/software

# cd /usr/local/src/tarbag
# wget http://mirror.bjtu.edu.cn/apache/tomcat/tomcat-7/v7.0.22/bin/apache-tomcat-7.0.22.tar.gz
# wgethttp://download.oracle.com/auth/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-x64.tar.gz

三、 安裝jdk(配置java環境)get

# tar -xzvf jdk-7u1-linux-x64.tar.gz
# mv jdk1.7.0_01/ /usr/local/java

配置java環境

# vi /etc/profile

加上如下信息

export JAVA_HOME=/usr/local/java
CLASSPATH=/usr/local/java/lib/dt.jar:/usr/local/java/lib/tools.jar
PATH=/usr/local/java/bin:$PATH
export PATH JAVA_HOME CLASSPATH

查看是否成功

# source /etc/profile
# java -version //看到1.7的字樣說明安裝成功了
java version "1.7.0_01"
Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode)

四、 安裝tomcat 7

# tar –xzvf apache-tomcat-7.0.22.tar.gz
# mv apache-tomcat-7.0.22 /usr/local/tomcat7

五、 啓動關閉tomcat7

啓動
# /usr/local/tomcat7/bin/startup.sh

關閉
# /usr/local/tomcat7/bin/shutdown.sh

六、 開啓tomcat測試

打開http://192.168.1.210:8080

本文地址:https://www.linuxprobe.com/tomcat7-install-jdk.html

相關文章
相關標籤/搜索