Articles → DEVOPS → Install Java on the linux machineInstall Java on the linux machineIn this article, we will install Java on the linux machine.Type of operating system First, we must check if your operating system is 32-bit or 64-bit. To check that 1. Connect to the Linux machine using the MobaXTerm. 2. Write the following command.
uname -iIf you will get "x86_64" then the system is 64-bit.Download the setup To download the setup 1. Go to the URL - https://www.oracle.com/in/java/technologies/javase/javase-jdk8-downloads.html 2. Go to the section "Java SE Development Kit 8u271" and download the .rpm file according to the operating system. Click to Enlarge 3. A pop-up window will come to accept terms and conditions.Click to Enlarge 4. Once you click on the button "Download JDK-8u271-linux-x64.rpm", the page will be redirected to the login screen.Click to Enlarge 5. Enter the valid username and password and click on the "Sign In" button. Create an account if you do not have the existing account. 6. Once your credentials are authenticated, the setup file will be downloaded.Install Java To Install the Java 1. Open WinSCP. 2. Connect to the linux server. 3. Transfer the file "JDK-8u271-linux-x64.rpm" from your local machine to the Linux server. 4. Open MobaXTerm and connect to the server. 5. Switch the user using the sudo -i command. 6. Run the following command.rpm -ivh /home/karan/jdk-8u271-linux-x64.rpmOnce the command is executed, the Java is installed on your machine.Click to EnlargeInstall using the .tar file Like rpm, you can follow the same steps for .tar file. One more step you have to follow is to extract the file using the following command.tar -xvf /home/karan/jdk-8u271-linux-x64.tar.gzPosted By - Karan Gupta Posted On - Thursday, November 19, 2020
Your Email Id
Characters remaining 250
rpm -ivh /home/karan/jdk-8u271-linux-x64.rpm
tar -xvf /home/karan/jdk-8u271-linux-x64.tar.gz