centos cannot start tomcat

王林
Release: 2020-03-18 15:22:50
Original
2629 people have browsed it

centos cannot start tomcat

Question:

When using Alibaba Cloud to configure the server, first install jdk, then install tomcat, and it can be started when startup.sh in tomcat is opened. But using 127.0.0.1:8011 or local ip:8011 cannot display the tomcat running interface.

When using shutdown.sh to shut down the tomcat service, it displays: ./bin/shutdown.sh: No such file or directory

Cause:

There is a problem with the jdk installation path configuration . It is not the real jdk installation path.

(Recommended tutorial: centos usage tutorial)

Solution:

Modify environment variables

The system environment variable modification command is as follows:

vi /etc/profile
Copy after login

Enter enter to enter the variable interface i perform the insert operation esc to exit the current operation :wq to save the changes.

After the changes are completed, enter:

source /etc/profile
Copy after login

to save the changes.

View jdk installation path

which java  
ls -lrt /usr/bin/java  
ls -lrt /etc/alternatives/java
Copy after login

jdk environment variable setting

Add the following code to the end of the system environment variable and save it.

export JAVA_HOME=  (这里是jdk的安装路径)例:/usr/share/jdk1.6.0_14
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
Copy after login

Related video tutorial recommendations: linux video tutorial

The above is the detailed content of centos cannot start tomcat. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template