LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-06-2007, 05:56 PM   #1
crash_override_me
Member
 
Registered: Aug 2005
Location: India, New Delhi
Distribution: Debian Etch, Ubuntu
Posts: 342

Rep: Reputation: 30
Running tomcat & postgres each bootup


hi guys,

how do i make tomcat & postgresql server run on each bootup..?

tomcat's bin: /usr/local/tomcat/bin
postresql's bin: /usr/local/pgsql/bin

i am using Ubuntu 6.06
 
Old 06-07-2007, 03:54 PM   #2
traene
Member
 
Registered: Jan 2005
Distribution: Archlinux, Debian, Centos
Posts: 222

Rep: Reputation: 35
You can provide Sys 5 style init scripts. These are located under /etc/init.d or /etc/rc.d.
This kind of scripts take one argument with at least:'start','stop', maybe 'status'

RedHat provides a 'chkconfig', you may find some similar solution for Ubuntu.
 
Old 06-08-2007, 02:10 AM   #3
crash_override_me
Member
 
Registered: Aug 2005
Location: India, New Delhi
Distribution: Debian Etch, Ubuntu
Posts: 342

Original Poster
Rep: Reputation: 30
can i put the commands to start them in /etc/init.d/rc.local ??
 
Old 06-08-2007, 11:15 AM   #4
traene
Member
 
Registered: Jan 2005
Distribution: Archlinux, Debian, Centos
Posts: 222

Rep: Reputation: 35
Poooh - good question. I am using arch, and there are no /etc/rc.d/rc0.d -- /etc/rc.d/rc5.d, however handling of runlevels is done in some kind of way.
Yes, you can put your programs in /etc/rc.local, and they will be started, i guess when the system starts. Using a runlevel friendly way, however, will make sure, that the processes will be finished in a nice way.

You may search for: find /etc -name "tomcat" or find /etc -name "postmaster" (i guess this is the postgres daemon, right?

You may also have a look for runlevels in wikipedia, for instance.
 
Old 06-08-2007, 01:50 PM   #5
crash_override_me
Member
 
Registered: Aug 2005
Location: India, New Delhi
Distribution: Debian Etch, Ubuntu
Posts: 342

Original Poster
Rep: Reputation: 30
Quote:
I am using arch, and there are no /etc/rc.d/rc0.d -- /etc/rc.d/rc5.d, however handling of runlevels is done in some kind of way.
i am using Ubuntu.. & i don't have rc.d in /etc however i have init.d & rc0.d to rc6.d + rcS.d

i think most deb. based distros have this..!!
 
Old 06-16-2007, 07:27 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
In that case create a startup-script for both of those in
/etc/init.d (use a small one of the others you find there
as a template regarding start, stop and the like) and then
place symlinks in the respective rcX.d directories.

See /etc/rc2.d/README (for example) and /etc/init.d/README
for more information ....


Cheers,
Tink
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I am using three tomcats and i want to know which tomcat service is running chnlinux Linux - Newbie 1 06-06-2007 02:47 PM
Running PHP in Tomcat sathiiish Linux - Software 2 05-02-2007 04:32 PM
Running tomcat with apache? namgayp Linux - Server 1 01-17-2007 05:41 AM
invalid binary "/usr/bin/postgres" while running postgresql ukrainet Linux - Newbie 1 12-01-2004 08:36 AM
Problem getting tomcat running SuSE lover Linux - Distributions 2 09-18-2004 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration