Linux install maven
0 install java jdk
The content of this section is not mentioned here, wait for me to write a blog and then send it to the portal
1. Download maven
Portal: maven official download address .
2. Upload to liunx host
Recommended path /usr/local
- Use the tool to upload to the /usr/local directory of the liunx host
- decompress
Unzip the command tar -zxvf apache-maven-3.6.3-bin.tar.gz
Note:
1. The tar package name should be the same as the one you downloaded
2. Execute the command in the directory where you store the jar package
- Rename (can be omitted, personal habits)
3. Modify environment variables
What needs to be modified
MAVEN_HOME=/usr/local/maven (注:这个路径替换成你的解压目录)
export MAVEN_HOME
export PATH=${PATH}:${MAVEN_HOME}/bin
- Open the profile file (vim /etc/profile)
- Add environment variables at the end
- Refresh the environment variables to make the environment variables take effect (source /etc/profile)
4. Verify
mvn -v If the version information is output, the configuration is successful
write at the end
I am a pure novice, and the blog I wrote was also written because of the problems encountered in learning and use, after searching for materials and solving them. If there are some errors or infringements, please contact me.
QQ: 994961015
Email: [email protected]