1. Statement:
This article uses the operating system version: Centos 7 Linux system
Version source: CentOS-7-x86_64
Official website download address:/centos/7/isos/x86_64/CentOS-7-x86_64
Installation package selection: Minimum installation package (and jdk is installed and vim function)
2. Preparation before installing tomcat 7
Download the tomcat installation package from the official apache website (it is recommended to use the installation file in the form of tar package)
Official website download address:/apache/tomcat/tomcat-7/v7.0.82/bin/apache-tomcat-7.0.
2.1 Upload the tomcat installation file to the linux system through ftp software
The student placed it under the /var/ftp/pub folder.
2.2 Unzip the file and cut it to / directory
Unzip the file: tar -zxvf apache-tomcat-7.0.
Move to the root directory: mv apache-tomcat-7.0. /
Rename the file: mv apache-tomcat-7.0. ./tomcat7
3. Start tomcat
Check whether the .sh file in the /tomcat7/bin/ directory is executable
Use the ll command to view file usage permissions
If the file is unusable, use the command:
chmod 755 ./*.sh
Modify all .sh files in the current directory to become executable files
Run tomcat:./
Close tomcat: ./
4. Firewall configuration
Open port 8080:
firewall-cmd --zone=public --add-port=8080/tcp --permanent
Restart the firewall:
firewall-cmd --reload
5. Set up tomcat to boot up automatically
4.1 Modify file configuration (add scripts at the end of the file)
vim /etc//
The script is added to the text at the end:
JAVA_HOME=/usr/java/jdk1.7.0_80 export JAVA_HOME /tomcat7/bin/
4.2 Modify the file to be executable, such as: chmod +x
Just restart the machine.
Summarize
The above is the tutorial on installing and uninstalling tomcat 7 in cemtos 7 Linux introduced to you. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply you in time. Thank you very much for your support for my website!