Install Tomcat on Linux
1. Download the installation package from the Tomcat official website
Tomcat official website address
I download tomcat8
I installed the operating system CentOS 7.7 64 bit of tomcat8
I upload the downloaded tomcat8 installation package to the server through Xftp 7.
I upload the tomcat8 installation package to the /usr/local/ directory of the service and
decompress apache-tomcat-8.5.92.tar.gz
[root@localhost local]# tar -xzvf apache-tomcat-8.5.92.tar.gz
2. Configure port
go in conf
[root@localhost apache-tomcat-8.5.92]# cd /usr/local/apache-tomcat-8.5.92/conf/
Edit the server.xml file
and I redefine the port of tomcat to 8875
Press the Esc key to exit the editing mode, enter: wq to save and exit the vim editor
ps: If you are using Alibaba Cloud or other cloud servers, you also need to go to the security group to configure the port
3. Start tomcat
[root@localhost logs]# cd /usr/local/apache-tomcat-8.5.92/bin/
start tocmat
[root@localhost bin]# ./startup.sh
View tomcat logs
[root@localhost logs]# cd /usr/local/apache-tomcat-8.5.92/logs/
[root@iZwz98djk0smqds0nxoshqZ logs]# tail -f catalina.out
This is a successful start
4. webapps directory
[root@localhost logs]# cd /usr/local/apache-tomcat-8.5.92/webapps/
[root@localhost webapps]# ll
[root@localhost webapps]# cd ROOT/
[root@localhost ROOT]# ll
These are all built-in tomcat, you need to delete them, and put your own projects
Start tomcat access after deleting, this is correct, because you have not put your own project