Maven installation and Tomcat easy installation under Ubuntu

Ah ha ha, this is a super simple tutorial, not suitable for advanced users
I'm also groping for a more high-end way to use it... But in a word, it can be used

1. Download the installation package

#I'm used to putting things in this folder
cd ~/Downloads

#Download tomcat8

#Download maven

2. Create the installation directory

#I'm used to installing eclipse, Maven and Tomcat in the user directory (that is ~ / programs)
#One of the advantages of this is that you don't need to change your authority. The disadvantages have not been found yet. Ha ha
cd ~
mkdir Programs

3. Decompress and move

cd ~/Downloads

#After unzip, an apache-tomcat-8.0.32 folder appears
tar -zxvf apache-tomcat-8.0.32.tar.gz

#After unzipping, an apache-maven-3.3.9 folder appears
tar -zxvf apache-maven-3.3.9-bin.tar.gz

#Move to installation directory
mv apache-tomcat-8.0.32 ~/Programs/apache-tomcat-8.0.32
mv apache-maven-3.3.9 ~/Programs/apache-maven-3.3.9

4. Establish soft link

#The advantage of setting up soft links is that you don't have to change the environment variables again when you upgrade later
cd ~/Programs
ln -s apache-tomcat-8.0.32 apache-tomcat
ln -s apache-maven-3.3.9 apache-maven

5. Set environment variables

#If bash, turn on ~ /. Bashrc and add at the end
export CATALINA_HOME=~/Programs/apache-tomcat
export M2_HOME=~/Programs/apache-maven
#And add after path:
#Then the settings take effect
    source .bashrc

#If it's a fish shell, open ~ /. Config / fish/  At the end
set -x CATALINA_HOME ~/Programs/apache-tomcat
set -x M2_HOME ~/Programs/apache-maven
#And add after path:
#Then the settings take effect
    . ~/.config/fish/

6. Observe whether the installation is successful

#Whether Tomcat was successfully installed: 
#Open the command line and type
#Then open the browser for input
#Close, please enter
#Did Maven install successfully
#Open command line input
mvn -version

End = D