linux下用rpm 安装jdk
2014-06-18 11:04
381 查看
1.下载jdk的rpm安装包,这里以jdk-6u21-linux-i586-rpm.bin为例进行说明
下载地址:http://www.oracle.com/technetwork/java/javase/downloads/index.html
2. 将jdk-6u21-linux-i586-rpm.bin 移动到合适的安装目录上,安装软件不要在/home路径下,这样很容易涉及到不同用户的访问权限,这样对程序的维护,是相当不利的。这里将把安装包移动到/opt目录
[c-sharp] view
plaincopy
mv jdk-6u21-linux-i586-rpm.bin /opt ;把安装包移动到/opt目录
cd /opt
3. 给安装包赋予运行权限
[c-sharp] view
plaincopy
chmod 755 jdk-6u21-linux-i586-rpm.bin
3. 安装该rpm安装包
[c-sharp] view
plaincopy
[root@localhost opt]# ./jdk-6u21-linux-i586-rpm.bin ;运行安装包
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jdk-6u21-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 Sun products, services and training
* Access to early releases and documentation
Product and system data will be collected. If your configuration
supports a browser, the Sun Product Registration form for
the JDK 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..... ;按回车键继续
Done.
4. 设置环境变量
[c-sharp] view
plaincopy
[root@localhost opt]# vi /etc/profile ;编辑系统配置文件
==================================================================================
JAVA_HOME=/usr/java/jdk1.6.0_24/ ;增加以下几行
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar ;主要是配置路径
PATH=$JAVA_HOME/bin:$PATH ;
export JAVA_HOME,PATH,CLASSPATH ;
:wq ;保存退出
下载地址:http://www.oracle.com/technetwork/java/javase/downloads/index.html
2. 将jdk-6u21-linux-i586-rpm.bin 移动到合适的安装目录上,安装软件不要在/home路径下,这样很容易涉及到不同用户的访问权限,这样对程序的维护,是相当不利的。这里将把安装包移动到/opt目录
[c-sharp] view
plaincopy
mv jdk-6u21-linux-i586-rpm.bin /opt ;把安装包移动到/opt目录
cd /opt
3. 给安装包赋予运行权限
[c-sharp] view
plaincopy
chmod 755 jdk-6u21-linux-i586-rpm.bin
3. 安装该rpm安装包
[c-sharp] view
plaincopy
[root@localhost opt]# ./jdk-6u21-linux-i586-rpm.bin ;运行安装包
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jdk-6u21-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 Sun products, services and training
* Access to early releases and documentation
Product and system data will be collected. If your configuration
supports a browser, the Sun Product Registration form for
the JDK 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..... ;按回车键继续
Done.
4. 设置环境变量
[c-sharp] view
plaincopy
[root@localhost opt]# vi /etc/profile ;编辑系统配置文件
==================================================================================
JAVA_HOME=/usr/java/jdk1.6.0_24/ ;增加以下几行
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar ;主要是配置路径
PATH=$JAVA_HOME/bin:$PATH ;
export JAVA_HOME,PATH,CLASSPATH ;
:wq ;保存退出
相关文章推荐
- 安装 linux jdk rpm格式
- linux下面卸载rpm安装好的jdk命令步骤
- LINUX 下安装 jdk 问题(please use alien to install rpm packages on Debian )
- linux下用rpm 安装jdk 7的jdk-7u79-linux-x64.rpm
- Linux 安装双版本jdk(2)rpm -ivh or -Uvh?
- RedHat 5.4安装jdk-6u22-linux-x64-rpm.bin
- Linux安装JDK详细步骤(rpm方式)
- [转载]Linux 卸载JDK并安装新版本JDK (rpm,tar)
- linux 下面 jdk1.7 rpm 包的安装
- linux下用rpm 安装jdk
- debian 安装jdk-6u31-linux-i586-rpm.bin
- Linux下安装JDK-(rpm版)
- rpm 安装jdk-6u45-linux-amd64.rpm发现需要依赖相关的库
- 安装jdk-linux-i586.rpm.bin
- Ubuntu安装jdk-7u45-linux-i586.rpm
- linux下用rpm 安装jdk
- linux环境安装JDK*.rpm.bin
- linux利用rpm包安装jdk,mysql
- linux下用rpm 安装jdk
- Linux下安装JDK-(rpm版)