1.Run the wget command from the dir you want to extract maven too.
wget http://mirrors.cnnic.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
2.run the following to extract the tar,
tar xvf apache-maven-3.3.9-bin.tar.gz
3.move maven to /usr/local/apache-maven
mv apache-maven-3.3.9 /usr/local/apache-maven
4.Next add the env variables to your ~/.bashrc file
export M2_HOME=/usr/local/apache-maven export M2=$M2_HOME/bin export PATH=$M2:$PATH
5.Execute these commands
source ~/.bashrc
6.Verify everything is working with the following command
mvn -version
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步