linux下用rpm 安装jdk
2011-02-18 20:47
429 查看
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目录
3. 给安装包赋予运行权限
3. 安装该rpm安装包
4. 设置环境变量
下载地址:http://www.oracle.com/technetwork/java/javase/downloads/index.html
2. 将jdk-6u21-linux-i586-rpm.bin 移动到合适的安装目录上,安装软件不要在/home路径下,这样很容易涉及到不同用户的访问权限,这样对程序的维护,是相当不利的。这里将把安装包移动到/opt目录
mv jdk-6u21-linux-i586-rpm.bin /opt ;把安装包移动到/opt目录 cd /opt
3. 给安装包赋予运行权限
chmod 755 jdk-6u21-linux-i586-rpm.bin
3. 安装该rpm安装包
[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. 设置环境变量
[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 ;保存退出
相关文章推荐
- shell 脚本自动安装jdk-6u34-linux-x64-rpm.bin 跳过回车自动安装
- Linux安装JDK1.6 rpm.bin格式的安装配置
- JDK 在 Linux 安装 - .rpm.bin
- linux下rpm安装和卸载jdk
- Linux安装JDK详细步骤(rpm方式)
- linux 虚拟机环境 rpm方式安装 jdk1.8
- linux下用rpm 安装jdk 7的jdk-7u79-linux-x64.rpm
- Linux安装JDK详细步骤(rpm方式)
- Ubuntu10.10 64位安装jdk-6u-linux-x64-rpm.bin和tomcat6.0.33
- Linux下安装JDK-(rpm版)
- linux下用rpm 安装jdk
- Ubuntu安装jdk-7u45-linux-i586.rpm
- Linux安装JDK详细步骤(rpm方式)
- Linux上rpm方式安装JDK1.7
- Linux下安装JDK-(rpm,yum)
- LINUX 下安装 jdk 问题(please use alien to install rpm packages on Debian )
- RedHat 5.4安装jdk-6u22-linux-x64-rpm.bin
- linux下用rpm 安装jdk
- linux利用rpm包安装jdk,mysql
- debian 安装jdk-6u31-linux-i586-rpm.bin