Installing and Configuring Maven
Before installing the built-in Tomcat of Spring Boot, install and configure Maven to meet the environment requirements for building and running the Spring Boot project.
- Download the Maven binary package.
1 2
cd /home wget https://dlcdn.apache.org/maven/maven-3/3.8.9/binaries/apache-maven-3.8.9-bin.tar.gz --no-check-certificate
- Verify the availability of the Maven binary package.
1 2 3
tar -zxvf apache-maven-3.8.9-bin.tar.gz cd /home/apache-maven-3.8.9/bin ./mvn --version
If the Maven version is returned, Maven has been successfully downloaded and decompressed.

- Configure the Maven environment variables.
- Open the /etc/profile file.
1vi /etc/profile - Press i to enter the insert mode and add the following content to the file:
1 2
export MAVEN_HOME=/home/apache-maven-3.8.9 export PATH=$PATH:$MAVEN_HOME/bin
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Make the configuration take effect.
1source /etc/profile
- Open the /etc/profile file.
Parent topic: Installing the Built-in Tomcat of Spring Boot