Cemtos 7 linux tutorials for installing and uninstalling tomcat 7
I. statement:
This article uses the operating system version: Centos 7 Linux system
Version source: CentOS-7-x86_64-DVD-1708.iso
Download address on the official website: 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 function)
II. Preparatory work before installing tomcat 7
Download the tomcat installation package from the apache official website (it is recommended to use the installation file in the form of tar package)
Download address on the official website: 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 through the ftp software
Xiaosheng put it under the / var/ftp/pub folder.
2.2 extract the file and cut it to / directory
Extract the file: tar-zxvf apache-tomcat-7.0.82.tar.gz
Move to the root directory: mv apache-tomcat-7.0.82.tar.gz /
Rename file: mv apache-tomcat-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:. / startup.sh
Close tomcat:. / shutdowm.sh
IV. 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 automatically.
4.1 modify rc.local file configuration (add script at the end of the file)
Vim / etc/rc.d/rc.local
Add a 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 rc.local file to be executable, such as: chmod + x rc.local
Just restart the machine.
Summary
The above is the tutorial of cemtos 7 linux installation and uninstallation of tomcat 7 introduced by Xiaobian 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 to you in time. Thank you very much for your support to the website!