当前位置:首页 > 开发 > 系统架构 > 架构 > 正文

linux下安装tomca和JDK

发表于: 2011-05-26   作者:g21121   来源:转载   浏览:
摘要: 1安装JDK 1.       查看是否已经安装过JDK,登录linux运行命令:java –version 如果显示: java version "1.6.0_25" Java(TM) SE Runtime Environment (build 1.6.0_25-b06) Java HotSpot(TM)

1安装JDK

1.       查看是否已经安装过JDK,登录linux运行命令:java –version

如果显示:

java version "1.6.0_25"

Java(TM) SE Runtime Environment (build 1.6.0_25-b06)

Java HotSpot(TM) Server VM (build 20.0-b11, mixed mode)

说明已经安装了系统自带的JDK

2.       查看已安装JDK信息,运行命令:rpm -qa|grep java

显示:

java-1.4.2-gcj-compat-1.4.2.0-27jpp

gcc-java-3.4.6-3

3.       删除已安装JDK,运行命令:rpm –e --nodeps ******(代表已安装的jdkjdk相关类库)

删除原JDK

4.       安装JDK,上传jdk安装程序至服务器,在jdk所在目录运行命令:chmod +x jdk-6u23-linux-i586-rpm.bin (jdk文件名称),更改执行权限。继续运行命令:./jdk-6u23-linux-i586-rpm.bin

显示:

Unpacking...

Checksumming...

Extracting...

UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).

  inflating: jdk-6u23-linux-i586.rpm 

  inflating: sun-javadb-common-10.5.3-0.2.i386.rpm 

  inflating: sun-javadb-core-10.5.3-0.2.i386.rpm 

  inflating: sun-javadb-client-10.5.3-0.2.i386.rpm 

  inflating: sun-javadb-demo-10.5.3-0.2.i386.rpm 

  inflating: sun-javadb-docs-10.5.3-0.2.i386.rpm 

  inflating: sun-javadb-javadoc-10.5.3-0.2.i386.rpm 

Preparing...                ########################################### [100%]

   1:jdk                    ########################################### [100%]

Unpacking JAR files...

rt.jar...

jsse.jar...

charsets.jar...

tools.jar...

localedata.jar...

plugin.jar...

javaws.jar...

deploy.jar...

Installing JavaDB

Preparing...                ########################################### [100%]

   1:sun-javadb-common      ########################################### [ 17%]

   2:sun-javadb-core        ########################################### [ 33%]

   3:sun-javadb-client      ########################################### [ 50%]

   4:sun-javadb-demo        ########################################### [ 67%]

   5:sun-javadb-docs        ########################################### [ 83%]

   6:sun-javadb-javadoc     ########################################### [100%]

 

Java(TM) SE Development Kit 6 successfully installed.

 

Product Registration is FREE and includes many benefits:

* Notification of new versions, patches, and updates

* Special offers on Oracle products, services and training

* Access to early releases and documentation

 

Product and system data will be collected. If your configuration

supports a browser, the JDK Product Registration form will

be presented. If you do not register, none of this information

will be saved. You may also register your JDK later by

opening the register.html file (located in the JDK installation

directory) in a browser.

 

For more information on what data Registration collects and

how it is managed and used, see:

http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html

 

Press Enter to continue.....

说明JDK已经安装成功。

5.       修改JDK运行目录,运行命令:vi /etc/profile

添加如下内容:

export JAVA_HOME=/root/jdk1.6.0_18(JDK所在目录)

export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export PATH=$PATH:$JAVA_HOME/bin

export JRE_HOME=$JAVA_HOME/jre

6.       验证JDK,运行命令:java –version

显示:

java version "1.6.0_25"

Java(TM) SE Runtime Environment (build 1.6.0_25-b06)

Java HotSpot(TM) Server VM (build 20.0-b11, mixed mode)

说明JDK已经安装成功。

2安装Tomcat

1.       上传tomcat至服务器,运行命令:chmod +x apache-tomcat-6.0.29.tar.gz

2.       解压tomcat,运行命令:tar –zxvf apache-tomcat-6.0.29.tar.gz

3.       运行tomcat,运行命令:cd apache-tomcat-6.0.29/bin | ./startup.sh

4.       打开浏览器输入服务器tomcat地址验证tomcat是否启动成功。

 

linux下安装tomca和JDK

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号