Get the App
SLTechnology News&Howtos  ›  Servers  › 

Ubuntu 18.04 install apache-tomcat7.0

Shulou Source: shulou.com Published: 2022-06-03 09:52:48 09月21日 Update

1. Download apache-tomcat7.0.53

Download address: https://tomcat.apache.org/

two。 Extract the files to the / usr/local/apache-tomcat directory. If there is no apache-tomcat directory, create a new directory first.

3. Since tomcat installation depends on JAVA JDK, check to see if the Linux system is configured with a java environment

(1) use the java-version command to view the current jdk version information

Java-version

(2) use the command rpm-qa | grep java to query the java installed by the operating system itself.

Rpm-qa | grep java

It can be seen that JAVA JDK has not been installed in my Linux system, so I have to download and install it first.

4. Install JAVA JDK

Recommend an installation configuration blog: https://www.cnblogs.com/liugh/p/6623530.html

5. Start Tomcat

(1) enter the tomcat execution directory

Cd / usr/local/tomcat/tomcat7/bin

(2) add JAVA JDK environment variable and edit setclasspath.sh

Sume@ubuntu:/usr/local/apache-tomcat/apache-tomcat-7.0.53/bin$ sudo vim setclasspath.sh

In setclasspath.sh, be sure to add environment variables between the following two paragraphs, otherwise tomcat startup fails.

#-

# Set JAVA_HOME or JRE_HOME if not already set, ensure any provided settings

# are valid and consistent with the selected start-up options and set up the

# endorsed directory.

#-

# my append

Export JAVA_HOME=/usr/local/jdk8/jdk1.8.0_201export JRE_HOME=/usr/local/jdk8/jdk1.8.0_201/jre

# Make sure prerequisite environment variables are set

(3) check the running status of tomcat

Ps-ef | grep tomcat

(4) start tomcat

Sudo. / startup.sh

The port number of Tomcat is 8080. Under the condition that the network is smooth, enter the address in the WINDOWS browser and you can see the Tomcat web page is configured successfully.

Tags: Directories environments systems configurations variables commands addresses success unblocked operating systems information blogs slogans that is situations files browsers versions status and so on Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Huawei Docker Xiaomi Apple