Graphical tutorial on installing maven under Linux

					   Linux下安装maven图文教程

mentioned above

Before installing the maven environment, you need to install the java environment first. If the java environment is not installed, you can refer to: https://blog.csdn.net/qq_37120477/article/details/131449747

  1. Create a download folder in the root directory of Linux and put the downloaded maven compressed package
  # 进入根目录中
  cd /
  #创建文件夹
  mkdir download
 2.  在/usr/local/ 下面创建一个maven文件夹
  #进入目录
  cd /usr/local
  #创建文件夹
  mkdir maven
  1. Move it to this folder through the command mv /download/xxx (decompressed file name) <space> /usr/local/maven

  2. Edit profile file

    vim /etc/profile
    

Click "i" to enter editing mode and write at the bottom

export MAVEN_HOME=/usr/local/maven/apache-maven-3.3.9

export PATH=${
    
    PATH}:${
    
    MAVEN_HOME}/bin

As shown below:
Insert image description here5. After you are done, click esc and then enter < :wq > to exit the editor and finally in

 #重新加载一下配置. 
 
 source /etc/profile
  1. Enter mvn -v to check whether the installation is successful. If a message appears, it means the installation is successful.
    Insert image description here

Guess you like

Origin blog.csdn.net/qq_37120477/article/details/131451630
Recommended