Under Linux deployment SSM project
1. Java environment configuration (JRE & JDK)
- 安装JDK8:sudo yum install java-1.8.0-openjdk
- The operating system is configured by default to use JDK8: sudo update-alternatives --config java
View JDK version: java -version
2. Download and install maven:
- Download: wget https://www-eu.apache.org/dist/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz
- Decompression: tar xvf apache-maven-3.6.0-bin.tar.gz -C / usr / lib /
- Configuration environment variable: vi / etc / profile
Add the following code:
M2_HOME = "/ usr / lib / Maven-3.6.0-Apache"
Export M2_HOME
M2="$M2_HOME/bin"
MAVEN_OPTS="-Xms256m -Xmx512m"
export M2 MAVEN_OPTS
PATH=$M2:$PATH
export PATH
- profile file loads update: source / etc / profile
View maven whether the configuration: mvn -version
3. Download tomcat installation
Extract to / usr at / local directory
into the directory: cd / usr / local / apache -tomcat-9.0.16 / bin
run startup.sh file: sh startup.sh
visit localhost: 8080 appears the installation was successful
4. SSM deployment project
- The project will run successfully in the local idea for the war in export file format, and put under apache-tomcat-9.0.16 / webapps directory and restart tomcat
war in the webapps directory will automatically extract
5. Testing: The test interface postman
- Download Postman: https://www.getpostman.com/
- Manually extract to the / opt directory, the directory and run into the Posaman
CD / opt / Postman
./Postman - If the run newspaper:. Error while loading shared libraries ...... error, execute the following command: sudo yum install libXScrnSaver
- After successful installation, rerun Postman
Open postman, and enter the correct url requests. Click to send