top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

Using the bin/ script on ubuntu

0 votes

Pleas point me to a good source how to use that (with ubuntu and Tomcat 7)?

The internet is full of selfmade /etc/init.d/ scripts, but mostly it isn't used it as a real service (jsvc). Keyword: bin/**
Even the books "Apache Tomcat 7" and "Tomcat 7 Essentials" are not talking about it.

On the docs I've found this []:

tar xvfz commons-daemon-native.tar.gz
cd commons-daemon-1.0.x-native-src/unix
cp jsvc ../..
cd ../..

But what about:
* set env. variables (maybe:, /etc/profiles?)
* adjust the heap size
* logging to the right directory (like: /var/log/tomcat/...)
* specifying the User: "tomcat"

posted Jul 30, 2013 by Deepankar Dubey

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

2 Answers

+1 vote

1) The script can be used directly. Maybe you can clarify your question?

2) The script is fairly readable, though less-well documented than bin/ Most of the environment variables recognized by bin/ are also recognized by bin/ For instance:


It also accepts these (undocumented, other than by reading the script itself) command-line arguments with fairly obvious behavior:

 --service-start-wait-time (sets the "wait" time for jsvc)
answer Jul 30, 2013 by Mandeep Sehgal
+1 vote

/etc/profiles is executed when you enter bash shell, so if Tomcat starts at boot time, it won't be able to access environment variables defined in /etc/profile.

I set JAVA_HOME, CATALINA_BASE and CATALINA_HOME environment variables in /etc/init.d/tomcat (which is a copy of, but I guess there may be a better place to do that.

This link [] recommends to put environment variables in /etc/default/tomcat, and then to source them from /etc/init.d/tomcat.

answer Jul 30, 2013 by Luv Kumar
Similar Questions
+1 vote

I want to run a python script which contains simple form of html on firefox browser , but don't know what should be the configuration on ubuntu 12.04 to run this script i.e CGI configuration.

My code is

in /var/www/cgi-bin/

#!/usr/bin/env python
import webapp2

form ="""


class MainPage(webapp2.RequestHandler):
 def get(self):
 #self.response.headers['Content-Type'] = 'text/plain'

app = webapp2.WSGIApplication([('/', MainPage)], debug=True)
+1 vote

I have a perl script I want to create desktop shortcut. While I click on this shortcut icon it will run my perl script and keep the terminal open.

I have tried the command

ln -s ~/Desktop/abc

while I click on this abc Icon from my desktop. It run and same time the terminal exit. Could you please help here?

My requirement is:

I want to create desktop shortcut for particular perl program. While I click on this icon from desktop, it should run and keep the terminal open.

+1 vote

I am using VirtualBox with Ubuntu version 14 installed in it. I have created 4 virualbox ports vboxnet0,1,2,3.

I would like to add 2 new ethernet ports in Ubuntu to assign each ethernet port to a vboxnet , I am already having eth0 and eth1, I would like to add 2 more ethernet ports, please help?

Useful Links with Similar Problem
Contact Us
+91 9880187415
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.