Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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) ?
Originally posted by merlin23
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) ?
Exactly right.
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.
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 ?
Quote:
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??
Is it a normal shell-script I need to write??
EDIT:
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:
/usr/local/bin/apachectl start
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.
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
#!/bin/sh
#
# /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
#
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) ?
You can use chkconfig command in redhat.
eg:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.