Use arrow keys to navigate through slides. Press Space or Enter to pause autoplay.
Universal Method for Installing Java on Debian, Ubuntu, and CentOS
Where to Download Java
Go to the Oracle website link and select the desired version of Java. This article will consider an example with Java 7:

Image 1 Among all available versions, you need to select for Linux x64, in .RPM format:

Image 2 You will be required to log in to your Oracle account. If you do not have one, please register:

Image 3 After you log into your account, the download of the selected Java will start automatically. Upload the downloaded file to your server using any convenient method such as SFTP/FTP.
How to Install Java
Follow further instructions based on the operating system installed on your server:
Debian and Ubuntu
- Update the packages:
apt-get update - Install Alien:
apt-get install alien - Install the previously downloaded Java in .RPM format:
alien -i --scripts java_file.rpm. In the example, the commandalien -i --scripts jdk-7u80-linux-x64.rpmis called, as the file is namedjdk-7u80-linux-x64.rpm

Image 4 - You can check the installed version of Java using the command
java -version

Image 5 CentOS
- Update the packages:
yum update - Install the previously downloaded Java in .RPM format:
rpm -ivh java_file.rpm. In the example, the commandrpm -ivh jdk-7u80-linux-x64.rpmis called, as the file is namedjdk-7u80-linux-x64.rpm - You can check the installed version of Java using the command
java -version

Image 6 - Update the packages:
Done! You are amazing!






