I'm planning to develop an application installer which, as a part of installation, installs Apache Tomcat on Linux. Does anyone know how can I programmatically install Tomcat as service on Linux. Best
Asked
Active
Viewed 2.4k times
3 Answers
4
If you have Tomcat installed already, you probably need to put a start up script for Tomcat in /etc/init.d
This article has a decent start up script.
http://www.howtogeek.com/howto/linux/installing-tomcat-6-on-ubuntu/

Ed Manet
- 3,118
- 3
- 20
- 23
3
Tomcat7 (Stable release 2011 January) For Debian-base: Tested in Ubuntu 14.04.
Install Tomcat7:
sudo apt-get install tomcat7 tomcat7-docs tomcat7-admin
sudo apt-get install libtomcat7-java tomcat7-common tomcat7-examples
Start the tomcat server:
sudo service tomcat7 restart
Check whether the the tomcat is running or not by access the URL http:/127.0.0.1:8080 in browser or in terminal:
w3m http://127.0.0.1:8080

Mohammed H
- 6,880
- 16
- 81
- 127
1
If you are on a debian-base distribution, just type
sudo apt-get install tomcat6 tomcat6-admin tomcat6-examples
and you'll have a tomcat fully functional (example for Ubuntu 10.04)

Mohammed H
- 6,880
- 16
- 81
- 127

Cédric Julien
- 78,516
- 15
- 127
- 132