- 安装。用YsST2搜索tomcat安装就好了。不过版本肯定不如官网的新,笔者用的是7.0.42,最新的已经到8.X了。
- 启动。在服务管理器中找到tomcat,启动。
其实教程就这两布,但是我要把War放到webapp里发布呀。于是就去找Tomcat的安装位置。
- 打开服务管理器,找到tomcat服务。
- 点击详情,有如下详细信息。
tomcat.service - Apache Tomcat Web Application Container Loaded: loaded (/usr/lib/systemd/system/tomcat.service; disabled) Active: active (running) since Sat 2015-04-25 21:15:38 CST; 4min 57s ago Main PID: 8001 (java) CGroup: /system.slice/tomcat.service `-8001 /usr/bin/java -classpath /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar -Dcatalina.base=/usr/share/tomcat -Dcatalina.home=/usr/share/tomcat -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat/temp -Djava.util.logging.config.file=/usr/share/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start Apr 25 21:15:41 linux-11i9.site tomcat.service[8001]: [84B blob data] Apr 25 21:15:41 linux-11i9.site tomcat.service[8001]: INFO: Starting Servlet Engine: Apache Tomcat/7.0.42 Apr 25 21:15:41 linux-11i9.site tomcat.service[8001]: [85B blob data] Apr 25 21:15:41 linux-11i9.site tomcat.service[8001]: INFO: Deploying web application directory /srv/tomcat/webapps/ext-5.1.0 Apr 25 21:15:43 linux-11i9.site tomcat.service[8001]: [71B blob data] Apr 25 21:15:43 linux-11i9.site tomcat.service[8001]: INFO: Starting ProtocolHandler ["http-apr-8080"] Apr 25 21:15:43 linux-11i9.site tomcat.service[8001]: [71B blob data] Apr 25 21:15:43 linux-11i9.site tomcat.service[8001]: INFO: Starting ProtocolHandler ["ajp-apr-8009"] Apr 25 21:15:43 linux-11i9.site tomcat.service[8001]: [73B blob data] Apr 25 21:15:43 linux-11i9.site tomcat.service[8001]: INFO: Server startup in 1760 ms
- 可以看出:
- 服务的位置:/usr/lib/systemd/system/tomcat.service
- tomcat程序位置:/usr/share/tomcat/bin/catalina.sh(链接指向/usr/sbin/dtomcat)
- tomcat安装位置:/usr/share/tomcat/(你可以找到webapps了)
时间: 2024-10-16 09:28:47