LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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-04-2009, 12:32 AM   #1
an_sush
Member
 
Registered: Nov 2008
Posts: 46

Rep: Reputation: 15
Add programs to startup


What is the way to add new programs to be run at startup of the system
I want Samba server and Vuze program to be automatically started at startup and not to be started manually

also wats the way to stop/kill the already running samba server

i m on red hat 5
 
Old 07-04-2009, 12:46 AM   #2
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
simple way
add command in /etc/rc.local

another way

use chkconfig
 
Old 07-04-2009, 02:02 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You can use the chkconfig command to enable the samba service (nmbd) for the runleves you want (3 & 5), or use the system-config-services GUI tool.

For starting Vuse, if it is a gui program, it depends on which desktop you are using. Also check the program itself for an option to autostart it.

Last edited by jschiwal; 07-04-2009 at 02:21 AM.
 
Old 07-04-2009, 03:25 AM   #4
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Rep: Reputation: 38
FYI
Slackware uses /etc/rc.d/rc.local instead of /etc/rc.local. And chkconfig does not exist.
 
Old 07-04-2009, 04:27 AM   #5
geek.ksa
Member
 
Registered: Jan 2009
Location: Dhahran, Saudi Arabia
Distribution: RHEL 5
Posts: 42

Rep: Reputation: 17
to kill the already running samba, run the command:

ps -ef | egrep 'samba|smb' | grep -v egrep

The second column of the output should contain the PID of the running process

then, once you have it, say it was 4443, execute

kill -9 4443

This will "kill" the process
 
Old 07-04-2009, 04:33 PM   #6
cmdln
Member
 
Registered: Apr 2009
Location: Lawrence, KS
Distribution: Debian, Centos
Posts: 108
Blog Entries: 1

Rep: Reputation: 25
The "redhat" way to configure a service to start on boot or not is to use chkconfig. If the program does not have it's own init script you can either write one yourself or just shove the command in /etc/rc.local. I think /etc/rc.local needs to return 0 for success but Im not positive.

So...
chkconfig samba on

to subsuquently start and stop a service the proper way is to use the service command which is really just a wrapper around /etc/init.d/servicename so you can use that too

service samba start
/etc/init.d/samba start

start stop and restart should be valid options for any init script.
 
Old 07-05-2009, 03:08 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Quote:
Originally Posted by okos View Post
FYI
Slackware uses /etc/rc.d/rc.local instead of /etc/rc.local. And chkconfig does not exist.
Yes, but the OP is running RHEL 5.
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:18 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
Open Source Consulting | Domain Registration