Maven installation in Linux
Pre Requisite Software
-----------------------------
Java is the Pre - Requisite Software for Maven.
java -version
Install Maven
------------------
Step1) Login as a root user and change the directory to /opt/
sudo su -
cd /opt/
Step2) Download the Maven Software
# wget https://dlcdn.apache.org/maven/maven-3/3.8.2/binaries/apache-maven-3.8.2-bin.zip
# yum install zip -y
# unzip apache-maven-3.8.2-bin.zip
Step3) Set the class path/Environmental Variable
For Specific User
----------------------
vi ~/.bash_profile
export M2_HOME=/opt/apache-maven-3.8.2
export PATH=$PATH:$M2_HOME/bin
source ~/.bash_profile
For All Users
----------------------
vi /etc/profile
export M2_HOME=/opt/apache-maven-3.8.2
export PATH=$PATH:$M2_HOME/bin
source /etc/profile
Step4) Check the Maven version
mvn -version
Maven installation in Amazon Linux
Pre Requisite Software
-----------------------------
Java is the Pre Requisite Software for Maven.
java -version
Install Maven
------------------
Download the Maven Software using below url.
https://maven.apache.org/download.cgi
Set the class path/Environmental Variable
vi ~/.bash_profile
export M2_HOME=/Users/mithunreddy/MithunTechnologies/Softwares/Running/apache-maven-3.8.2
export PATH=$PATH:$M2_HOME/bin
source ~/.bash_profile
Check the Maven version
mvn -version
No comments:
Post a Comment