0

I have an Ubuntu studio 16.10. I tried to install tomcat 7 by using the command sudo apt-get install tomcat7. I tried tomcat8 too, but after the following

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, it seems has not been installed. What do I do now? Also I tried to remove tomcat and it prompted me for a a Yes/No and it went off fine.

1
  • If there're both tomcat7 and tomcat8 packages, perhaps they name the command the same way too – muru Apr 27 '20 at 16:24
1

Yes, it’s installed, and running — opening http://localhost:8080 will show you the default Tomcat welcome page. (At least, it will if you haven’t removed the package.)

You can install webapps by copying them to /var/lib/tomcat7/webapps.

You won’t find a tomcat command, it’s installed as a service. Use systemctl to manage it.

2
  • where can I find the startup.sh as I just killed it. I tried find and locate find had too many answers – beegee Assem Apr 27 '20 at 16:44
  • systemctl status tomcat7 will display its current status. systemctl start tomcat7 will start the tomcat service – rubaiat Apr 27 '20 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.