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 |
simple way
add command in /etc/rc.local another way use chkconfig :) |
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. |
FYI
Slackware uses /etc/rc.d/rc.local instead of /etc/rc.local. And chkconfig does not exist. |
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 |
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. |
Quote:
|
All times are GMT -5. The time now is 04:20 AM. |