Practical No.
-01
AIM: Installation of java on Unix/Linux machine.
DESCRIPTION: Java is a mandatory prerequisite for Apache Hadoop because
Hadoop is developed entirely in Java. Every Hadoop component, including HDFS,
MapReduce, and YARN, relies on the Java Runtime Environment (JRE) and the
Java Virtual Machine (JVM) for execution. Therefore, before installing Hadoop, a
compatible Java Development Kit (JDK) must be installed and configured on the
Linux system. The JDK provides the runtime environment, compiler, and other
development tools required by Hadoop. Once Java is installed, the JAVA_HOME
environment variable is configured so that Hadoop can locate the Java installation.
Installation of Java on Linux machine:-
STEP-1: Verify the existence of java in your system using
$ java --version
STEP-2: For installation of default java version use the following command:
sudo apt-get install default-jdk
STEP-3: If already installed properly check java --version to verify.
The java version appears; java has been installed successfully.
STEP 4: Configure the environment variable JAVA_HOME:
List the contents of default jvm location:
Use the nano editor to open a config file named [Link] inside the environment
directory.
Set the JAVA_HOME to default-java location.
Press Ctrl+O, to save the config file.
Press Enter.
Press Ctrl+X to exit nano editor.
Check the JAVA_HOME variable after coming back to terminal.
The default-java path appears.
The class path has been configured successfully.