🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #877

Re: run java app on Linux at boot up

#877
From: Alan Shiers
Date: Wed, 17 Jul 2002 00:26
55 lines
2970 bytes
HI Owen,

I downloaded tomcat and installed it, however, installing it didn't
create any script files in  /etc/rc.d/init.d

Would it be possible for you to create copies of these script files and
send them onto me.  I'd appreciate it. Just send them as an attachment
to ashiers@hfx.eastlink.ca

Thanks,

Alan

Owen Green wrote:
> 
> "Alan Shiers" <ashiers@hfx.eastlink.ca> wrote in message
> news:3D346152.2E5E859D@hfx.eastlink.ca...
> > "Alan Shiers" wrote:
> > >MAIN OBJECTIVE: I just want to set up whatever scripts are necessary to
> > >launch my java application when Linux boots up.  Linux has a special
> > >command: chkconfig
> > >I don't know if it can be used or not to schedule the running of a java
> > >application upon boot up.  Maybe there is another, better way?
> >
> > >Basically, I just want to have the java application running without my
> > >having to log in, except to shut it down.
> >
> > >Can all this be done?
> 
> Yes, but I'm hazy on the details :)
> 
> Basically, when linux boots it runs a program called init which in turn will
> execute whatever scripts are set to execute for the appropriate run level.
> IIRC, normal operation sans gui is run level 3.
> 
> What you need to do is
> a) Write a script that starts and stops your application (you'll probably
> have to monkey around with the classpath in it as well).
> b) I think you then need to place the script in init.d (often found at
> /etc/rc.d/init.d)
> c) This is where chkconfig comes in. Use
> chkconfig --level <level numbers> <scriptname> <state>
> 
> e.g.
> chkconfig --level 35 myserver on   to have the server start on run levels 3
> & 5
> chkconfig --level 01246 mysever off for the reciprocal.
> 
> You can then check your settings with
> chkconfig --list myserver
> 
> As for the script(s), have a look at the ones for tomcat to give you some
> idea.
> 
> Owen
Technical Details
Message-ID: <3D34B9C2.260677F5@hfx.eastlink.ca>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!isdnet!proxad.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3D322D4F.F759335B@hfx.eastlink.ca> <MPG.179d5ff5e7b163b898b852@newsgroups.borland.com> <3D346152.2E5E859D@hfx.eastlink.ca> <3d346215$2_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,5b5327e0fa81e574
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-07-16 16:43:00 PST
Message-ID: <3D34B9C2.260677F5@hfx.eastlink.ca>
Date: Tue, 16 Jul 2002 20:26:42 -0400
From: Alan Shiers <ashiers@hfx.eastlink.ca>
Organization: Mustard Seed Software
X-Mailer: Mozilla 4.78 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.api
Subject: Re: run java app on Linux at boot up
References: <3D322D4F.F759335B@hfx.eastlink.ca> <MPG.179d5ff5e7b163b898b852@newsgroups.borland.com> <3D346152.2E5E859D@hfx.eastlink.ca> <3d346215$2_1@dnews>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 24.222.101.2
X-Trace: dnews 1026861870 24.222.101.2 (16 Jul 2002 16:24:30 -0700)
Lines: 55
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!isdnet!proxad.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews