RedHat6.0上安装jdk1.7
为熟悉linux命令以及常用软件配置,在windows虚拟机上安装了个RedHat6,然后在上面安装jdk1.7
下载jdk的过程就不说了,以下描述的是oracle官网上的rpm格式的jdk包,安装步骤如下:
1.解压安装rpm包[kevin@localhost software]$ rpm -ivh jdk-7u6-linux-i586.rpm 报错:error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)错误原因:当前非root用户2.切换到root用户[kevin@localhost software]$ su 输入root用户密码3.输入命令1,得到以下信息[root@localhost software]# rpm -ivh jdk-7u6-linux-i586.rpm Preparing... ########################################### [100%] 1:jdk ########################################### [100%]Unpacking JAR files... rt.jar...Error: Could not open input file: /usr/java/jdk1.7.0_06/jre/lib/rt.pack jsse.jar...Error: Could not open input file: /usr/java/jdk1.7.0_06/jre/lib/jsse.pack charsets.jar...Error: Could not open input file: /usr/java/jdk1.7.0_06/jre/lib/charsets.pack tools.jar...Error: Could not open input file: /usr/java/jdk1.7.0_06/lib/tools.pack localedata.jar...Error: Could not open input file: /usr/java/jdk1.7.0_06/jre/lib/ext/localedata.pack plugin.jar...Error: Could not open input file: /usr/java/jdk1.7.0_06/jre/lib/plugin.pack javaws.jar...Error: Could not open input file: /usr/java/jdk1.7.0_06/jre/lib/javaws.pack deploy.jar...Error: Could not open input file: /usr/java/jdk1.7.0_06/jre/lib/deploy.pack