tomcat7 java_Tomcat7安装(jdk 1.7环境)
這篇文章著重講解tomcat7的安裝,首先需要下載tomcat包和相應的jdk,如果你的系統是32位,那么下載x86的jdk,如果是64位的系統,那么下載X64的JDK。具體下載地址如下。
Tomcat 7:
JDK 1.7(x86):
http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-i586.rpm
JDK 1.7(X64):
1、???查看系統版本
# 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
1
2
# uname –a //是64位系統,那么我們選擇64位的JDK
Linux2.6.32-71.el6.x86_64#1 SMP Fri May 20 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux
2、???下載tomcat7和jdk1.7
Tarbag專門放源碼包,software專門放解壓后的軟件包
# 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
1
2
3
4
5
6
# 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
3、???安裝jdk(配置java環境)
# tar -xzvf jdk-7u1-linux-x64.tar.gz
# mv jdk1.7.0_01/ /usr/local/java
1
2
# 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
1
2
3
4
5
6
# vi /etc/profile
加上以下信息
exportJAVA_HOME=/usr/local/java
CLASSPATH=/usr/local/java/lib/dt.jar:/usr/local/java/lib/tools.jar
PATH=/usr/local/java/bin:$PATH
exportPATHJAVA_HOMECLASSPATH
查看是否成功
# 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)
1
2
3
4
5
# source /etc/profile
# java ?-version //看到1.7的字樣說明安裝成功了
javaversion"1.7.0_01"
Java(TM)SERuntimeEnvironment(build1.7.0_01-b08)
JavaHotSpot(TM)64-BitServerVM(build21.1-b02,mixedmode)
4、???安裝tomcat 7
# tar –xzvf ?apache-tomcat-7.0.22.tar.gz
# mv apache-tomcat-7.0.22 /usr/local/tomcat7
1
2
# tar –xzvf ?apache-tomcat-7.0.22.tar.gz
# mv apache-tomcat-7.0.22 /usr/local/tomcat7
5、???啟動關閉tomcat7
啟動
# /usr/local/tomcat7/bin/startup.sh
1
# /usr/local/tomcat7/bin/startup.sh
關閉
# /usr/local/tomcat7/bin/shutdown.sh
1
# /usr/local/tomcat7/bin/shutdown.sh
6、???開啟tomcat測試
tomcat7安裝
轉載請注明出處:http://www.ttlsa.com/html/3032.html
總結
以上是生活随笔為你收集整理的tomcat7 java_Tomcat7安装(jdk 1.7环境)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 驴肉火烧的功效与作用、禁忌和食用方法
- 下一篇: 桂花粥的功效与作用、禁忌和食用方法