下载JRE(Java Runtime Environment) 。(
http://java.sun.com/javase/downloads/index.jsp
)
ii.?[root@localhost ~]#mkdir /usr/local/java
iii.?
(将档案jre-1_5_0_09-linux-
i586-rpm.bin下载到/usr/local/java目录下)
iv.?
(超级用户模式)
[root@localhost
~]#su????????????
v.? [root@localhost ~]#cd /usr/java
vi.?
(将您所下载的档的权限更改为可执行)
[root@localhost
java]#chmod
a+x
jre-1_5_0_09-linux-i586-rpm.bin?
vii.?
(启动安装过程)?
[root@localhost java]#./jre-1_5_0_09-linux-i586-rpm.bin
(此时将显示二进制许可协议,按控格显示下一页,读完许可协议后,输入
『yes』继续安装。此时会将解压缩,产生jre-1_5_0_9-linux-i586.rpm)
viii.
(安装jre-1_5_0_9-
linux-i586.rpm)
?
[root@localhost java]#rpm –ivh jre-1_5_0_9-linux-i586.rpm
(此时会将JRE装在/usr/java/jre1.5.0_09目录下)
ix.?
(设定环境变量,让Linux能找到JRE)
[root@localhost
java]#vi
/etc/profile
(将以下内容加入在档案后面)
1
PATH
=
$PATH:
/
usr
/
java
/
jre1.
5
.0_09
/
bin
2
export?JAVA_HOME
=/
usr
/
java
/
jre1.