Install Java on Oracle Linux

su - root
cd usr
mkdir java
cd java

copy jre-7u55-linux-x64.rpm to /usr/java
[root@ORACLE java]# chmod +x jjre-7u55-linux-x64.rpm

[root@ORACLE java]# rpm -ivh jre-7u55-linux-x64.rpm
Preparing...                ########################################### [100%]
   1:jre                    ########################################### [100%]
Unpacking JAR files...
        rt.jar...
        jsse.jar...
        charsets.jar...
        localedata.jar...
        jfxrt.jar...
[root@ORACLE java]# java -version
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
[root@ORACLE java]# /usr/sbin/alternatives --install /usr/bin/java java /usr/java/jre1.7.0_55/bin/java 17055
[root@ORACLE java]#

Delete the .rpm file if you want to save disk space.
Exit the root shell. No need to reboot.


knowhow:
Uninstall any earlier installations of the Java packages.
 rpm -e <package_name>

Install the package.
rpm -ivh jre-7u7-linux-x64.rpm

To upgrade a package:
rpm -Uvh jre-7u7-linux-x64.rpm

No Comments

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *