Linux installation Tomcat (operating system CentOS)

1. Download the installation package from the Tomcat official website

Tomcat official website address
insert image description here
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.
insert image description here
insert image description here
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
insert image description here
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
insert image description here

3. Start tomcat

[root@localhost logs]# cd /usr/local/apache-tomcat-8.5.92/bin/

insert image description here

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

insert image description here
This is a successful start
insert image description here

4. webapps directory

[root@localhost logs]# cd /usr/local/apache-tomcat-8.5.92/webapps/
[root@localhost webapps]# ll

insert image description here

[root@localhost webapps]# cd ROOT/
[root@localhost ROOT]# ll

insert image description here
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
insert image description here

Guess you like

Origin blog.csdn.net/qq407995680/article/details/132361856
Recommended