Java(TM) SE Development Kit 6 successfullyinstalled.
Product Registration is FREE and includesmany benefits:
* Notification of new versions, patches,and updates
* Special offers on Oracle products,services and training
* Access to early releases anddocumentation
Product and system data will be collected.If your configuration
supports a browser, the JDK ProductRegistration form will
be presented. If you do not register, noneof this information
will be saved. You may also register yourJDK later by
opening the register.html file (located inthe JDK installation
directory) in a browser.
For more information on what dataRegistration collects and
how it is managed and used, see:
http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html
Press Enter to continue.....
Done.
root@localhost java]# ls
default sun-javadb-common-10.6.2-1.1.i386.rpm
jdk1.6.0_34 sun-javadb-core-10.6.2-1.1.i386.rpm
jdk-6u34-linux-amd64.rpm sun-javadb-demo-10.6.2-1.1.i386.rpm
jdk-6u34-linux-x64-rpm.bin sun-javadb-docs-10.6.2-1.1.i386.rpm
latest sun-javadb-javadoc-10.6.2-1.1.i386.rpm
sun-javadb-client-10.6.2-1.1.i386.rpm执行java rpm安装包
[root@localhost java]#rpm -ivh jdk-6u33-linux-amd64.rpm
Preparing... ########################################### [100%]
packagejdk-2000:1.6.0_34-fcs.x86_64 is already installed
使用qi参数可以查看jdk安装之后的信息,已经安装到/usr/java/下面
[root@localhost java]# rpm -qi jdk
Name : jdk Relocations: /usr/java
Version : 1.6.0_34 Vendor: Oracle and/or itsaffiliates.
Release : fcs Build Date: 2012年07月19日星期四 21时20分35秒
Install Date: 2012年09月07日 星期五 10时23分50秒 Build Host: jdk-lin-amd64.sfbay.sun.com
Group : Development/Tools Source RPM: jdk-1.6.0_34-fcs.src.rpm
Size : 127042575 License: Copyright (c) 2011, Oracle and/or its affiliates. All rightsreserved. Also under other license(s) as shown at the Description field.
Signature : (none)
Packager : Java Software
URL : http://www.oracle.com/technetwork/java/javase/overview/index.html
Summary : Java(TM) Platform Standard Edition Development Kit
Description :
The Java Platform Standard EditionDevelopment Kit (JDK) includes both
the runtime environment (Java virtualmachine, the Java platform classes
and supporting files) and development tools(compilers, debuggers,
tool libraries and other tools).
The JDK is a development environment forbuilding applications, applets
and components that can be deployed withthe Java Platform Standard
Edition Runtime Environment.
设置JAVA_HOME环境变量
vim /etc/profile
#JAVA_HOME SETTING
export JAVA_HOME=/usr/java/jdk1.6.0_33
exportCLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$PATH
注:在profile最后添加环境变量时,由于centos6.2默认安装了OpenJDK所以把JAVA_HOME的位置在PATH置前。然后重启reboot或者init 6 用java -version检查显示结果为:
[root@localhost ~]# java -version
java version "1.6.0_34"
Java(TM) SE Runtime Environment (build1.6.0_34-b04)
Java HotSpot(TM) 64-Bit Server VM (build20.9-b04, mixed mode) 则证明安装成功
cd /usr/soft/
[root@localhost soft]# tar xf apache-tomcat-7.0.29.tar.gz
设置系统环境变量:
[root@localhost soft]# vim /etc/profile
exportTOMCAT_HOME=/usr/soft/apache-tomcat-7.0.29
exportCATALINA_HOME=/usr/soft/apache-tomcat-7.0.29