Most of the Linux operating systems comes with pre-installed OpenJDK package to run java-based applications and plugins. Now, you’re thinking if Java already ships with OS, why we need to install it again? Right good question, but in certain cases we need Sun/Oracle Java program to compile and run particular development applications. This is the reason we are compiling this article on how to install Sun/Oracle Java JDK /JRE 8u45 on RHEL 7.x/6.x/5.x, CentOS 7.x/6.x/5.x and Fedora 22-18 systems using binary RPM files. Install Java 8 in CentOS, Fedora and RedHat Downloading Java JDK / JRE 8 Binary Download RPM files for your system OS bit. For reference, we have provided the rpm file-names, please select these below mentioned files only.
Java-1.7.0-openjdk rpm build for: Scientific Linux 7. For other distributions click java-1.7.0-openjdk.
For RHEL/CentOS/Fedora 32-bit OS jdk-8u45-linux-i586.rpm jre-8u45-linux-i586.rpm For RHEL/CentOS/Fedora 64-bit OS jdk-8u45-linux-x64.rpm jre-8u45-linux-x64.rpm Alternatively, you may use wget tool to download these files under /opt/ directory as shown below. I’m not sure if it is technically supported on RHEL 5, but it is installable. The process is a hassle though. First, uninstall previous versions of Java. You may run into dependency issues while trying to uninstall the previous versions.
The only way I found to fix this is to search for the specific java rpm (rpm -qa grep -i java) and then remove that specific rpm: rpm -e –nodeps java-1.x.x. This is generally a really, really bad idea. However, if you’re in a jam, that should work. Then install the jre or jdk-1.8 rpm from oracles web site using either yum install jre-1.8.xx.rpm or rpm -vhi jre-1.8.xx.rpm. You’ll have to update /etc/alternatives. You should be able to search on how to do this. There is a nice article on unixmen, but I don’t know the rules for posting direct links on this site.
Hope that helps.
Comments are closed.