Graphic tutorial on installing tomcat8 on centos7.X Linux system

Graphic tutorial on installing tomcat8 on centos7.X Linux system

1. Create the tomcat installation path

mkdir /usr/local/tomcat

2.wget directly download tomcat8

Note that you need to have installed the wget command

wget http://mirrors.estointernet.in/apache/tomcat/tomcat-8/v8.5.54/bin/apache-tomcat-8.5.54.tar.gz

The second red box is correct

The first red box means that the resource package does not exist. You can find the resource package yourself at this website, then change the URL and execute the command again: http://mirrors.estointernet.in/apache/tomcat/

3. Go to the official website to download the compressed package and transfer it to the server

https://tomcat.apache.org/download-80.cgi

4. Unzip tomcat

tar -zxvf apache-tomcat-8.5.54.tar.gz

5. Start tomcat

Rename the tomcat directory first

That's easier to find.

mv apache-tomcat-8.5.54 tomcat8

Enter the bin directory of tomcat

cd /root/tomcat8/bin

Start tomcat

./startup.sh

6. Check whether Tomcat is started successfully

Check if the tomcat process exists

ps -ef | grep tomcat

Check if port 8080 is occupied

netstat -ant | grep 8080

Access IP:8080. If the following interface appears, it proves success.

7. Reasons for access failure

Using ps and netstat to check if the process and port are both available, but access to ip:8080 fails, which may be a firewall problem

How to open ports and firewalls, please read this blog: https://www.jb51.net/article/185766.htm

8. Modify the tomcat port

8080 is the default port. As we all know, if you want to improve security, you can customize the port.

Enter the conf directory

ps -ef | grep tomcat

Edit the server.xml file

vim server.xml

Find the place to configure the port

  1. In non-editing mode, type / and then enter 8080, press Enter, and you will find it.
  2. Then press i to enter edit mode and change 8080 to the port you want.
  3. Finally, press esc to exit the edit mode, enter :wq to save and exit

Finally, restart tomcat

Enter the bin directory and shut down tomcat first

./shutdown.sh

Restart tomcat

./startup.sh

Then you are done!

This is the end of this graphic tutorial about how to install tomcat8 on centos7.X of Linux system. For more information about installing tomcat8 on centos7, please search previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Linux (CentOS7) installs Tomcat and sets Tomcat as a startup item (taking tomcat8 as an example)
  • Installation and configuration tutorial of Tomcat8 under Centos7.3
  • Detailed explanation of the construction of a load balancing server based on Centos7+Nginx+Tomcat8

<<:  Detailed explanation of the principle and usage of cursor (DECLARE) in MySQL stored procedure

>>:  jQuery realizes the picture following effect

Recommend

JS implements a simple brick-breaking pinball game

This article shares the specific code of JS to im...

Innodb system table space maintenance method

Environmental Description: There is a running MyS...

Vue implements a small countdown function

Countdown function needs to be implemented in man...

Docker installs mysql and solves the Chinese garbled problem

Table of contents 1. Pull the mysql image 2. Chec...

Example code of CSS layout at both ends (using parent's negative margin)

Recently, during the development process, I encou...

Detailed steps for configuring virtual hosts in nginx

Virtual hosts use special software and hardware t...

How to implement the observer pattern in JavaScript

Table of contents Overview Application scenarios ...

Detailed explanation of Vue advanced construction properties

Table of contents 1. Directive custom directive 2...

Summary of using the reduce() method in JS

Table of contents 1. Grammar 2. Examples 3. Other...

Vue2.x - Example of using anti-shake and throttling

Table of contents utils: Use in vue: explain: Ima...

How to install MySQL using yum on Centos7 and achieve remote connection

Centos7 uses yum to install MySQL and how to achi...

How to view Linux ssh service information and running status

There are many articles about ssh server configur...

Front-end JavaScript thoroughly understands function currying

Table of contents 1. What is currying 2. Uses of ...