LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices

Reply
 
Search this Thread
Old 02-28-2007, 12:44 PM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 447

Rep: Reputation: 30
Cool need a script to run oracle service


Dear Friend ,

I am using oracle9.2.0.4 in RHEL4 . I want a situation where the following two services ( which is used as "oracle" user) are always automatically up when the machine is starting :


/u01/app/oracle/product/9.2.0/bin/agentctl

/u01/app/oracle/product/9.2.0/Apache/Apache/bin/apachectl

Plz give me some solution . How can I start these service during boot time of the pc .
 
Old 02-28-2007, 11:47 PM   #2
hijack204
LQ Newbie
 
Registered: May 2006
Posts: 13

Rep: Reputation: 0
add it to startup in /etc/rc.d/rc.local
 
Old 03-01-2007, 12:25 AM   #3
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
echo "/u01/app/oracle/product/9.2.0/bin/agentctl" >> /etc/rc.d/rc.local

echo "/u01/app/oracle/product/9.2.0/Apache/Apache/bin/apachectl" >> /etc/rc.d/rc.local

or you can write a script that will handle the start/stop of these, put it inside init.d and add it to your init using chkconfig add.
 
Old 03-01-2007, 08:53 AM   #4
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 447

Original Poster
Rep: Reputation: 30
Add chkcinfig How ?

prozac,

Thx for ur advice . According to ur advice I make Script name "test" using the following Lines :

echo "/u01/app/oracle/product/9.2.0/bin/agentctl" >> /etc/rc.d/rc.local
echo "/u01/app/oracle/product/9.2.0/Apache/Apache/bin/apachectl" >> /etc/rc.d/rc.local

Now u tell me
"add it to your init using chkconfig add"
Plz tell me the procedure little bit briefly How can I add my script "test" with chkconfig so that it runs automatically during bootup the pc .

My another question is,What it the basic difference

"/etc/rc.d/rc.local" and "/etc/rc.d/init.d" .

Waiting for ur reply ... ...

Last edited by shipon_97; 03-01-2007 at 08:54 AM.
 
Old 03-02-2007, 12:18 AM   #5
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
Code:
echo "/u01/app/oracle/product/9.2.0/bin/agentctl" >> /etc/rc.d/rc.local
echo "/u01/app/oracle/product/9.2.0/Apache/Apache/bin/apachectl" >> /etc/rc.d/rc.local
These lines appended to rc.local are enough to make agentctl and apache to run at every system boot. This is the preferred way to go.

However, you can also write a script to start/stop apache and others just like the other scripts inside init.d (you can copy a matching script then edit it to suit for apache and the other). These scripts should be inside the init.d directory. then you can do 'chkconfig add new-script-name' which will make it visible to ntsysv menu from where you can enable/disable it to run it at boot times just like all the others already there.
 
Old 03-02-2007, 08:43 AM   #6
hijack204
LQ Newbie
 
Registered: May 2006
Posts: 13

Rep: Reputation: 0
Shipon please read over this page it will answer all the questions you have.


http://www.yolinux.com/TUTORIALS/Lin...itProcess.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Oracle Report could not run on RedHat LInux aamerjavaid Red Hat 1 09-05-2006 07:20 PM
Oracle Reports Could not run on Ubuntu Linux aamerjavaid Ubuntu 1 09-05-2006 11:27 AM
How do I run a PHP script as a service? robbiemorgan Linux - Newbie 3 04-13-2005 03:03 PM
Priority: script to run on boot vs. "service iptables save" iheardrain Linux - General 5 09-30-2004 10:53 PM
on Network Up Script run? On Battery power run script? v2-ncl Linux - General 0 12-08-2003 10:34 AM


All times are GMT -5. The time now is 02:32 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration