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

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

    震惊

    震惊

编辑推荐
Linux下jdk的安装 安装版本:jdk1.7.0_67 操作系统CentOS 一、下载jdk 地址: http://www.oracle.com
Linux下jdk的安装 安装版本:jdk1.7.0_67 操作系统CentOS 一、下载jdk 地址: http://www.oracle.com
到Oracle官网去下载JDK1.7 http://www.oracle.com/technetwork/cn/java/javase/downloads/jdk7-down
一、jdk安装到了home/目录下版本为1.6(注意jdk版本不能太高Lh9不支持jdk1.7以上版本,这是我经过大
首先请到sun官网下载最新版的JDK,比如我下载的就是这个 http://www.oracle.com/technetwork/java/j
首先请到sun官网下载最新版的JDK,比如我下载的就是这个 http://www.oracle.com/technetwork/java/j
首先请到sun官网下载最新版的JDK,比如我下载的就是这个 http://www.oracle.com/technetwork/java/j
一、JDKlinux下的安装 1.官网下载JDK(根据自己的情况下载JDK,这个不多说) http://www.oracle.com/t
1 下载jdk 1.7 linux版本 http://www.oracle.com/technetwork/java/javase/downloads/jdk7-download
Linux下安装jdk 把压缩文件放在 桌面的soft 下 在usr目录下新建文件夹Java,把文件复制到 usr/java
版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号