cemtos 7 linux Tutorial for installing and uninstalling tomcat 7
- 2020-06-23 02:29:20
- OfStack
1. The statement:
This article USES the operating system version: Centos 7 Linux system
Source: CentOS-7-ES7en86_64-ES8en-1708.ES9en
Website to download address: http: / / isoredirect centos. org centos / 7 / isos x86_64 / CentOS - 7 - x86_64 - DVD - 1708. iso
Installation package selection: Minimum installation package (with jdk installed and vim features)
2. Preparation before installation of tomcat 7
Download the tomcat installation package from the apache website (it is recommended to use the installation file in the form of tar package)
Official website to download address: http: / / mirror bit. edu. cn/apache/tomcat/tomcat - 7 / v7. 0.82 / bin/apache - tomcat - 7.0.82. tar. gz
2.1 Upload the tomcat installation file to the linux system via ftp software
The student is placed under the /var/ftp/pub folder.
2.2 Unzip the file and cut it to/directory
Unzip file: ES63en-ES64en ES65en-ES66en-7.0.82.tar.gz
Move to the root directory: mv ES72en-ES73en-7.0.82.tar. gz /
Rename file: mv ES79en-ES80en-7.0.82.tar. gz./tomcat7
3. Start tomcat
Check to see if the.sh file in the /tomcat7/bin/ directory is executable
Use the ll command to view file permissions
If the file is not available, use the command:
chmod 755. / *. sh
Modify all.sh files in the current directory to make them executable
Run tomcat:./ ES107en.sh
Close tomcat:./ ES112en.sh
4. Firewall configuration
Open port 8080:
firewall - cmd - zone = public - add - port = 8080 / tcp permanent
Restart the firewall:
firewall - cmd - reload
5. Set tomcat to boot from startup
4.1 Modify the rc. local file configuration (add script at the end of the file)
vim etc/rc. d/rc. local
Add the script at the end of the text:
JAVA_HOME=/usr/java/jdk1.7.0_80
export JAVA_HOME
/tomcat7/bin/startup.sh
4.2 Modify the ES155en.local file to be executable, such as chmod +x ES159en.local
Restart the machine.
conclusion