tomcat- installation configuration

Recently I reinstall the system so the installation of the way record it - -

 

1. Download tomcat

1.1 Enter the official website

https://tomcat.apache.org/

Select version 1.2 (I chose 9)

 

 

 1.3 Selecting the Download Method

 

I windows7 64 Wei so choose 64-bit zip package

Once you have downloaded in place unzip it

 

 

2. Configure

 

2.1 

Right My Computer - Properties - Advanced System Settings - Environment Variables

 

 2.2

Set the system variable CATALINA_HOME, CATALINA_BASE, Path, JAVA_HOME

The online version of this stuff a lot - - Some may be wrong, or at least some of the variables, these are the situations I have not installed before tomcat needs. If it still does not work best and then look up.

 

 

New CATALINA_HOME = D: \ tomcat9 \ apache-tomcat-9.0.24 <installation path --- tomcat, I is this.

新建 CATALINA_BASE = D:\tomcat9\apache-tomcat-9.0.24 

 

Path behind the edit plus;% CATALINA_HOME% \ bin;% CATALINA_HOME% \ lib <--- This is based on the relative path tomcat, so do not change. Plus two paths, a plurality of paths to use a semicolon; separated

 

JAVA set of jdk path, there will be time to install the java = = no check jdk installation. . .

Edit (or new) JAVA_HOME = C: \ Program Files \ Java \ jdk1.8.0_161 <- set your path to the java jdk

 

2.3

Open the file in the tomcat conf file path to the folder D: \ tomcat9 \ apache-tomcat-9.0.24 \ conf

Open the tomcat-users.xml

Add later

<role rolename="manager-gui"/> 

<role rolename="admin-gui"/>  

<user username="admin" password="admin" roles="admin-gui"/>

<user username="tomcat" password="admin" roles="manager-gui"/>

 

 

3 Test

Open the file tomcat bin folder under the folder D: \ tomcat9 \ apache-tomcat-9.0.24 \ bin

Open startup.bat

 

If the flash is too general environment variable is not configured right.

Or use Notepad to open startup.bat then add a pause in the last end of the next line, cmd command line if you run after it got stuck, indicating that the environment variable is no problem, may be out of the running problems, such as insufficient memory, the port It occupied a class.

 

Enter the URL in the browser http: // localhost: 8080, if the tomcat into the home then the tomcat start successfully.

 

Guess you like

Origin www.cnblogs.com/clamp7724/p/11484331.html