CentOS6.4下安装JDK1.6
2013-09-25 20:17
330 查看
首先,切换到jdk安装包所在目录:
配置环境变量:(出现lib/dt.jar: Permission denied,就是权限不够,请切换至/usr/java/jdk1.6.0_45/lib目录执行chmod 775 *.jar)
使环境变量生效:修改.bashrc
[rot@centos6 Downloads]# ./jdk-6u45-linux-x64-rpm.bin Unpacking... Checksumming... Extracting... UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu). inflating: jdk-6u45-linux-amd64.rpm inflating: sun-javadb-common-10.6.2-1.1.i386.rpm inflating: sun-javadb-core-10.6.2-1.1.i386.rpm inflating: sun-javadb-client-10.6.2-1.1.i386.rpm inflating: sun-javadb-demo-10.6.2-1.1.i386.rpm inflating: sun-javadb-docs-10.6.2-1.1.i386.rpm inflating: sun-javadb-javadoc-10.6.2-1.1.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%] Done.
配置环境变量:(出现lib/dt.jar: Permission denied,就是权限不够,请切换至/usr/java/jdk1.6.0_45/lib目录执行chmod 775 *.jar)
[root@centos6 Downloads]# export JAVA_HOME=/usr/java/jdk1.6.0_45/ [root@centos6 Downloads]# export PATH=$PATH:$JAVA_HOME/bin [root@centos6 Downloads]# export CLASSPATH=.;$JAVA_HOME/lib/dt.jar;$JAVA_HOME/lib/tools.jar bash: /usr/java/jdk1.6.0_45//lib/dt.jar: Permission denied bash: /usr/java/jdk1.6.0_45//lib/tools.jar: Permission denied
使环境变量生效:修改.bashrc
[root@centos6 ~]# vi /etc/profile #jdk1.6 env export JAVA_HOME=/usr/java/jdk1.6.0_45 export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$PATH:$JAVA_HOME/bin
相关文章推荐
- Centos6.5下jdk1.6安装
- Linux下CentOS 6.3中安装与配置Jdk 1.6和Tomcat 6.0.32
- CentOS安装配置JDK1.6
- CentOS安装jdk 1.6教程
- (一)配置hadoop-------vm虚拟机中安装CentOS5.5,并且安装和配置jdk1.6
- JDK 1.6在CentOS 5.5上的安装配置
- centos安装了jdk1.6之后却总是显示1.4的版本
- centos7.2安装jdk1.6和/etc/profile不生效问题
- Centos 7.2 安装jdk1.6 tomcat6 mysql5.5
- centos 下安装jdk 1.6
- CentOS下JDK1.6和Tomcat的安装
- centos下安装jdk1.6-rpm.bin报bad interpreter: 文本文件忙错误
- CentOS 6系统下安装 JDK1.6
- CentOS 64位系统JDK1.6、tomcat 6.0、MySQL 5.5安装指南
- 在centos下安装Jdk1.6+mysql5.6+tomcat1.6
- Centos 4.8 下JDK 1.6 的安装
- Centos 安装 JDK1.6 步骤及常见问题
- Centos6.5下jdk1.6安装
- Centos 6.5 安装jdk1.6