start services at startup automatically
Could anyone explain me how i can configure services at startup?
I have an apache installed and want it to automatically start at the beginning.
I use Mandrake linux, but I have compiled the sources myself and now I don't
find them in the graphical configuration tool (where you can turn off/on the services) from mandrake.
So I start them always in the command line, but i couldn't find out how to make it start at boottime, maybe I have to put it in the init.d/ directory and link it to rc.d4/ (if I am in runlevel 4) ?
Re: start services at startup automatically
Installing from the distro's package might be a better option though, as that way you'll be able to track updates with the rest of the system.
The start/stop scripts are stored in init.d. When you add the service via chkconfig that will create a link in the approiate rc.d directory.
Or you can add a line in the rc.local file to start a service.
i have a similar problem or maybe not
I'm kinda new to this so please bear with me
I'm running mandrake 9.1 on my PC
when i boot the network service or interface doesn't come up
However when i go into mandrake control center i can run drake connect and start the network interface which afterward it works.
i can tell by running /sbin/ifconfig from rxvt before and after i run drake connect
i dont have this problem on my laptop which is running the same distro.
can any body help me?
I have the same problem, too... (though 1st priority is the problem above for me in meanwhile)..If I can figure anything out about it, I will come back and post it...
maybe some guru has some nice hints?
To the 1st problem from above:
How do I create such a start/stop script for my etc/init.d ?
Do I just have to write into a file the command "/usr/local/apache/bin/apachectl start" and make it executable??
I've recognized that after bringing up the networkcard with drake, it now seems to start up automatically everytime I reboot...
What me makes worry is this httpd daemon...
Because I compiled it by source, I don't know how to do this with drake...
so maybe somebody could give me a hint to my question from above ?
Ok, I reread the thread...I think I will give it a try and append it to my /etc/rc.d/rc.local script to the end:
hope this will work, the next reboot will be tomorrow...anyway, I 'd be very interested how this works with the runlevel-dircetories...
Write shell-script to /etc/init.d and then link it to rc5.d (for runlevel 5) , is this correct so??
you probably have already a script to start apache on your computer. Look in /etc/rc.d/rc.httpd. If this script exists, just change the permissions so that it can be read and executed. chmod 755 /etc/rc.d/rc.httpd. If it does not exist on your computer, try to find one on apache web page or elsewhere on the internet.
thx a lot, I'll give it a try soon...
nethertheless, the way described before worked very well, I just have appended the command "apachectl start" to the rc.local ... ;)
What I suggest is now, that I could simple create a file rc.httpd and put that command into it ?
Would this work also?
yes, anything you put in /etc/rc.d starting with rc. is run at startup. The file has to be executable also. Here is the content of script that was installed by default in my /etc/rc.d/rc.httpd
# Start/stop/restart the Apache web server.
# To make Apache start automatically at boot, make this
# file executable: chmod 755 /etc/rc.d/rc.httpd
case "$1" in
/usr/sbin/apachectl start ;;
/usr/sbin/apachectl stop ;;
/usr/sbin/apachectl restart ;;
echo "usage $0 start|stop|restart" ;;
As you can see, it is very alike but with a little more options. (restart is very useful).
chkconfig --level 35 sshd on
--level you can define which level the service should run at start up.This it runs at 3 and 5.run chkconfig you can see the list of services and run level configured at startup.
You know this thread was from 2004/2005?
|All times are GMT -5. The time now is 09:20 AM.|