In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to install Maven under Linux". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to install Maven under Linux.
Maven is the most popular Java project construction system, Maven Project object Model (POM), a software project management tool that can manage project construction, reports and documents through a small piece of description information.
Preparatory work
1. You need to prepare a server, you can buy it online, if you study individually, you are advised to install a virtual machine and install a Linux system. Keyword click to jump: virtual machine installation tutorial Linux installation tutorial
two。 Need to prepare a remote connection tool to connect to the Linux system, the author uses: Xshell tool (note: Xshell download address to the bottom of this article).
The official download address of 3.maven is as follows: (note: the download address of maven is turned to the bottom of this article)
Https://maven.apache.org/download.cgi installation starts (Note: which step in the following figure will not be configured, turn to the bottom to join the group to learn)
1. Place the downloaded maven installation package in the / usr/local/ directory on disk, as shown below:
two。 Extract the apache-maven-3.6.3-bin.tar.gz file. As shown below:
Tar-zxvf apache-maven-3.6.3-bin.tar.gz
3. Configure the maven repository and set up the Ali image warehouse. Be sure to configure it. The domestic download jar is faster. First, enter the cd apache-maven-3.6.3 directory and create a repository storage directory, mkdir ck. As shown below:
Cd apache-maven-3.6.3 # enter the apache-maven-3.6.3 directory mkdir ck # create the ck directory
4. Enter the cd conf directory, edit the vi settings.xml file, find localRepository, copy a line with / usr/local/apache-maven-3.6.3/ck, find mirror and add Ali's warehouse configuration, and report an error to exit after configuration, as shown below:
Cd conf # enter the conf directory vi settings.xm # settings.xm file / usr/local/apache-maven-3.6.3/ck alimaven aliyun maven http://maven.aliyun.com/nexus/content/groups/public/ central
5. Configure the maven environment variable, edit the vi / etc/profile file, scroll to the last line and add export MAVEN_HOME=/usr/local/apache-maven-3.6.3 export PATH=MAVEN_HOME/bin to save and exit, as shown below:
Vi / etc/profileexport MAVEN_HOME=/usr/local/apache-maven-3.6.3export PATH=$PATH:$MAVEN_HOME/binimg
6. Reload, and source / etc/profile makes the new configuration effective, as follows:
Source / etc/profileimg
7. Here to complete the installation, test it, and enter the command: mvn-v, as follows:
Mvn-v thank you for reading, this is the content of "how to install Maven under Linux". After the study of this article, I believe you have a deeper understanding of how to install Maven under Linux, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.