简体   繁体   English

我的Tomcat在哪里运行?

[英]Where is my Tomcat running?

I am using linux centos. 我正在使用linux centos。 I have installed tomcat in multiple folders. 我已经在多个文件夹中安装了tomcat。 One of them is running. 其中之一正在运行。 When I use netstat -ntlp command, it says port 8080 is running, and I can access the URL http://localhost:8080 当我使用netstat -ntlp命令时,它说端口8080正在运行,并且我可以访问URL http://localhost:8080

Now I want to know the path of tomcat folder where it's running? 现在我想知道tomcat文件夹的运行路径?

Assume I closed all the terminals, I could not guess where I initiated.. 假设我关闭了所有终端,我不知道我在哪里启动。

Thanks in advance.. 提前致谢..

do a ps -ef grep for tomcat the result will have the directory of tomcat 对tomcat执行ps -ef grep,结果将具有tomcat目录

   [user@edw-support-dev1 ~]$ ps -ef | grep tomcat
    root     12898     1  0 May14 ?        00:30:38 /usr/local/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-7.0.41/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dfile.encoding=UTF-8 -server -Xms1536m -Xmx2048m -XX:PermSize=2048m -XX:MaxPermSize=2048m -Djava.endorsed.dirs=/opt/apache-tomcat-7.0.41/endorsed -classpath /opt/apache-tomcat-7.0.41/bin/bootstrap.jar:/opt/apache-tomcat-7.0.41/bin/tomcat-juli.jar -Dcatalina.base=/opt/apache-tomcat-7.0.41 -Dcatalina.home=/opt/apache-tomcat-7.0.41 -Djava.io.tmpdir=/opt/apache-tomcat-7.0.41/temp org.apache.catalina.startup.Bootstrap start
    2064     21567 21544  0 21:28 pts/1    00:00:00 grep tomcat

ps aux | ps aux | grep tomcat grep雄猫

And you will know the installation directory of tomcat. 您将知道tomcat的安装目录。

You can also use "locate" command as "locate tomcat" this command will find out the files named tomcat which might give you a pointer where tomcat is residing on your disk. 您还可以将“ locate”命令用作“ locate tomcat”,此命令将查找名为tomcat的文件,这可能会为您提供指向tomcat驻留在磁盘上的指针。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM