Lecture 04 – APACHE MAVEN INSTALLATION

APACHE MAVEN INSTALLATION

hands-on_image

Pre-Requisites

Launch an EC2 server on AWS Console and choose Red Hat Enterprise Linux 8 (HVM), SSD Volume Type

COPY & RUN –>$ the below command

				
					sudo yum update
				
			

Steps To Install Apache maven

Step 01: To get the root access

COPY & RUN –>$ the below command

				
					sudo su
				
			

Step 02: Install Java 1.8.0 using the package installer

COPY & RUN –>$ the below commands

				
					yum install java-1.8.0-openjdk-devel
				
			
				
					which java
				
			
				
					yum list installed | grep "java"
				
			
				
					java -version
				
			

Step 03: Navigate to opt folder and download wget

COPY & RUN –>$ the below commands

				
					cd /opt
				
			
				
					yum install wget
				
			
				
					yum install -y ca-certificates
				
			

Step 04: Get the latest version of Apache directly from its website (copy the link address)

COPY & RUN –>$ the below command

				
					wget https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz
				
			

Step 05: Unzip the .tar file into/opt the directory

COPY & RUN –>$ the below command

				
					tar zxf apache-maven-3.8.8-bin.tar.gz
				
			

Step 06: Go into the unzipped folder and then into the bin folder

COPY & RUN –>$ the below command

				
					cd apache-maven-3.8.8/bin
				
			

Step 07: Set the environment variable so that the package can be accessed from all over the system

COPY & RUN –>$ the below command

				
					export PATH=$PATH:/opt/apache-maven-3.8.8/bin
				
			

Step 08: Check if Maven is installed and version

COPY & RUN –>$ the below command

				
					mvn -version