top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

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 LinkedIn 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.

0 votes

I just had to run kino as root, because I didn't have permission to use the firewire port to talk to my Sony Handi-cam digital hi8 movie camera.

So, while I have a root session going, what do I have to do to make the user 1000, me, be able to use the firewire port?

0 votes

I have an Ubuntu VDI image (created through Virtual box) in one laptop and want to install Ubuntu on bare metal using this VDI image.
Is it possible ?