tomcat安装了吗?

tomcat安装了吗?

我尝试使用命令Ubuntu studio 16.10. 安装。我也尝试过tomcat8,但是之后出现以下情况tomcat 7sudo apt-get install tomcat7

sudo apt-get install tomcat7

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libtomcat8-java sysstat tomcat8-common
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libtomcat7-java tomcat7-common
Suggested packages:
  tomcat7-docs tomcat7-admin tomcat7-examples tomcat7-user libtcnative-1
The following NEW packages will be installed:
  libtomcat7-java tomcat7 tomcat7-common
0 upgraded, 3 newly installed, 0 to remove and 348 not upgraded.
Need to get 4,034 kB of archives.
After this operation, 4,956 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://old-releases.ubuntu.com/ubuntu yakkety/universe amd64 libtomcat7-java all 7.0.72-1 [3,730 kB]
Get:2 http://old-releases.ubuntu.com/ubuntu yakkety/universe amd64 tomcat7-common all 7.0.72-1 [267 kB]
Get:3 http://old-releases.ubuntu.com/ubuntu yakkety/universe amd64 tomcat7 all 7.0.72-1 [36.8 kB]
Fetched 4,034 kB in 4s (895 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libtomcat7-java.
(Reading database ... 364399 files and directories currently installed.)
Preparing to unpack .../0-libtomcat7-java_7.0.72-1_all.deb ...
Unpacking libtomcat7-java (7.0.72-1) ...
Selecting previously unselected package tomcat7-common.
Preparing to unpack .../1-tomcat7-common_7.0.72-1_all.deb ...
Unpacking tomcat7-common (7.0.72-1) ...
Selecting previously unselected package tomcat7.
Preparing to unpack .../2-tomcat7_7.0.72-1_all.deb ...
Unpacking tomcat7 (7.0.72-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Setting up libtomcat7-java (7.0.72-1) ...
Processing triggers for systemd (231-9ubuntu2) ...
Setting up tomcat7-common (7.0.72-1) ...
Setting up tomcat7 (7.0.72-1) ...

Creating config file /etc/default/tomcat7 with new version
Adding system user `tomcat7' (UID 126) ...
Adding new user `tomcat7' (UID 126) with group `tomcat7' ...
Not creating home directory `/usr/share/tomcat7'.

Creating config file /etc/logrotate.d/tomcat7 with new version
Processing triggers for systemd (231-9ubuntu2) ...
Processing triggers for ureadahead (0.100.0-19) ...
user@user:~$ tomcat --version
bash: tomcat: command not found
user@user:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/usr/local/hadoop/bin:/usr/local/hadoop/sbin:/home/prasad/testfolder/

Tomcat,好像还没有安装。现在我该怎么做?我还尝试删除 tomcat,它提示我输入“是/否”,一切顺利。

答案1

是的,它已安装并正在运行 - 打开http://本地主机:8080将显示默认的 Tomcat 欢迎页面。 (至少,如果您没有删除该软件包,它会。)

您可以通过将 Web 应用程序复制到 来安装它们/var/lib/tomcat7/webapps

您不会找到tomcat命令,它作为服务安装。用来systemctl管理它。

相关内容