LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-13-2009, 03:40 PM   #1
ringding
LQ Newbie
 
Registered: Feb 2005
Distribution: RH9, RHEnt.
Posts: 23

Rep: Reputation: 0
How to add programs to startup after reboot....


I have 2 services I need to start upon reboot...here are the commands I am currently using from the terminal:

/usr/local/apache2/bin/apachectl start
and
/var/jboss43/jboss-as/bin/run.sh -c jboss01 -b taxjbc29.globaltax.ge.com &

Do I simply put these commands in rc.local? If so How? Iread somewhere that you enter commands as you would in a terminal?

Redhat AS 4
Thanks
 
Old 07-13-2009, 03:57 PM   #2
fbianconi
Member
 
Registered: Apr 2008
Location: argentina
Distribution: Arch
Posts: 86

Rep: Reputation: 22
look here:

http://www.fedorafaq.org/basics/#startonboot

is not red hat, but can't be too different

Last edited by fbianconi; 07-13-2009 at 04:06 PM. Reason: not red hat, but fedora.
 
Old 07-13-2009, 04:01 PM   #3
ringding
LQ Newbie
 
Registered: Feb 2005
Distribution: RH9, RHEnt.
Posts: 23

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by fbianconi View Post
My commands do not start with...well...a command...they start with a directory path...so do the commands need to start with a real command that lives in the environment variable?

Could these commands be chkconfig'd

Last edited by ringding; 07-13-2009 at 04:24 PM.
 
Old 07-13-2009, 05:04 PM   #4
fbianconi
Member
 
Registered: Apr 2008
Location: argentina
Distribution: Arch
Posts: 86

Rep: Reputation: 22
It's normal for commands to start with the path. Otherwise the shell should look for them in the paths in the $PATH variable of the shell. It is not just fine, but better to point with the full path when you want to make sure that "those files" should be executed, and not others with the same name. It's THE way to go (specially when extra security is needed).

Quote:
Do I simply put these commands in rc.local? If so How? Iread somewhere that you enter commands as you would in a terminal?
yes, exactly.

also you might (as in "I'm not sure if it's needed") have to make it executable by changing the permissions with chmod +x <file>
 
Old 07-13-2009, 09:51 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
The apache one should be chkconfig'd in RH, assuming you installed using the RH tools, not by hand.

iirc, its called 'httpd' rather than apache as far as chkconfig is concerned.

Last edited by chrism01; 07-13-2009 at 09:52 PM.
 
Old 07-13-2009, 11:44 PM   #6
viGeek
LQ Newbie
 
Registered: Jul 2009
Posts: 28

Rep: Reputation: 17
I would put them in rc.local, that would be the best place IMO, it's executed during the final boot phase thus any confrontation would be minimal amongst services and resources.
 
  


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
Add programs to startup an_sush Linux - Newbie 6 07-05-2009 04:08 AM
How to add startup programs in Sessions? markw10 Ubuntu 2 03-11-2009 04:25 AM
Managing startup programs; removing YOU icon from startup General SUSE / openSUSE 2 06-14-2007 09:48 PM
Mandriva startup scripts (need to add something to startup before X starts) thunderweasel Mandriva 3 01-01-2006 01:55 AM
unable to add programs from add/remove programs dav7500 Linux - Software 2 02-26-2004 08:25 PM


All times are GMT -5. The time now is 10:59 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration