Articles → DEVOPS → Install Java On The Linux Machine
Install Java On The Linux Machine
Type Of Operating System
- Connect to the Linux machine using the MobaXTerm.
- Write the following command.
Download The Setup
- Go to the URL - https://www.oracle.com/in/java/technologies/javase/javase-jdk8-downloads.html
- Go to the section "Java SE Development Kit 8u271" and download the .rpm file according to the operating system.
Click to Enlarge
- A pop-up window will come to accept terms and conditions.
Click to Enlarge
- Once you click on the button "Download JDK-8u271-linux-x64.rpm", the page will be redirected to the login screen.
Click to Enlarge
- Enter the valid username and password and click on the "Sign In" button. Create an account if you do not have the existing account.
- Once your credentials are authenticated, the setup file will be downloaded.
Install Java
- Open WinSCP.
- Connect to the linux server.
- Transfer the file "JDK-8u271-linux-x64.rpm" from your local machine to the Linux server.
- Open MobaXTerm and connect to the server.
- Switch the user using the sudo -i command.
- Run the following command.
rpm -ivh /home/karan/jdk-8u271-linux-x64.rpm
Click to Enlarge
Install using the .tar file
tar -xvf /home/karan/jdk-8u271-linux-x64.tar.gz