Linux Lower installation Maven and Tomcat And configuration IDEA
The operating environment is Ubuntu16.04
One 、 install Maven
1.Maven Download address :https://maven.apache.org/download.cgi
Download the selected version
After downloading, you can find the downloaded file in the corresponding folder
2. Run unzip to
tar -zxvf apache-maven-3.6.1-bin.tar.gz
After decompression ls You can see
You can also move the extracted file to a specified directory
mv file name The target path
You can view it in the target path
3. Modify global profile
gedit /etc/profile
Add the following information to the configuration file :
#maven3.6
export M2_HOME=/opt/Maven/apache-maven-3.6.1
export PATH=${M2_HOME}/bin:$PATH
Be careful :M2_HOME It’s after you unzip it Maven The catalog of
Refresh profile :
source /etc/profile
Check if the installation is successful :
4. establish Maven Warehouse and configure IDEA
Create a warehouse in the specified directory MavenJar
IDEA On the configuration Maven
1. open IDEA,File->Settings->Build,Execution,Deployment->Build Tools->Maven->Runner->VM Options Input :
-DarchetypeCatalog=internal
This configuration is to speed up the download jar Packet speed .
2.File->Settings->Build,Execution,Deployment->Build Tools->Maven Middle configuration Maven Warehouse information .
IDEA To configure Maven end .
Two 、 install Tomcat
1.Tomcat Download address :https://tomcat.apache.org/
Select the version and format you want to download
After downloading, you can find the downloaded file in the corresponding folder
2. Run unzip to
tar -zxvf apache-tomcat-8.5.41.tar.gz
After decompression ls You can see
You can also move the extracted file to a specified directory
mv file name The target path
You can view it in the target path
3. Modify the port
modify tomcat –>conf –>server.xml pass the civil examinations 69 The port of the line
4. To configure jdk and jre Information
modify tomcat –>bin Under the startup.sh and shutdown.sh file
edit startup.sh
Add the following information :
#jdk8
export JAVA_HOME=/opt/Java/jdk1.8.0_211
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=.:${JAVA_HOME}/bin:$PATH
#tomcat
export TOMCAT_HOME=/opt/Tomcat/apache-tomcat-8.5.41
edit shutdown.sh, Add the following information :
#jdk8
export JAVA_HOME=/opt/Java/jdk1.8.0_211
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=.:${JAVA_HOME}/bin:$PATH
#tomcat
export TOMCAT_HOME=/opt/Tomcat/apache-tomcat-8.5.41
5. start-up Tomcat
stay tomcat Of bin Execute under directory ./startup.sh
Open the browser to access localhost that will do
If there is a problem with the startup, modify the permissions :
chmod 755-R apache-tomcat-8.5.41/
close Tomcat, stay tomcat Of bin Execute under directory ./shutdown.sh that will do
If there is a mistake , Welcome to point out .