Debian This forum is for the discussion of Debian Linux.
|
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
07-16-2003, 09:17 AM
|
#1
|
Member
Registered: Jun 2003
Posts: 119
Rep:
|
starting apache at bootup
Hi,
Sorry if this is repetitive. But I have tried things and it does not work for me. I have to manually start up whenever I re boot.
I made a file called S61apache.sh in the /etc/rcS.d
and put in
ln -s ../init.d/apache /etc/rcS.d/S61apache.sh
But Apache does not start at bootup
Anything wrong in what I have done?
|
|
|
07-16-2003, 09:46 AM
|
#2
|
LQ Newbie
Registered: Jul 2003
Location: UK
Distribution: Debian 3.0 woody
Posts: 1
Rep:
|
Hi!!
There's no need to create an startup script for apache. apachectl can take the startup parameters (start, stop...), so you just need to copy this script to your init folder and the create a symbolic link to this file...
Follow you'll find how to do it...
[root@MARS bin]# cp /usr/local/apache/bin/apachectl /etc/init.d/apache
[root@MARS bin]# ln -s /etc/init.d/apache /etc/rc2.d/S99apache
note that if you want apache to start in another level different than 2, you'll have to create the symbolic link there as well...
Hope this helps...
pep0.
|
|
|
07-19-2003, 03:00 PM
|
#3
|
Member
Registered: May 2003
Location: NC, USA
Distribution: Slackware 14.0
Posts: 94
Rep:
|
Make sure that ../init.d/apache /etc/rcS.d/S61apache.sh is executable. chmod 755 S61apache.sh
|
|
|
07-23-2003, 01:09 PM
|
#4
|
Member
Registered: Jun 2003
Posts: 119
Original Poster
Rep:
|
Sorry for the delay! Thanks all. I got Apache to start at boot by
doing (as root)
ln -s /etc/init.d/apache /etc/rcS.d/S77apache
|
|
|
07-24-2003, 03:07 AM
|
#5
|
Member
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569
Rep:
|
For starters, the apache package installs its own startup script AND sets itself up to start on boot by default. If you don't want it to start on boot, then there's rarely any point in having it installed, so either remove it or follow my note below to figure out how to disable a startup script without effing with much.
Just a note for everyone. SysV init sucks to configure by hand. Really it does. Don't get me wrong, I love SysV init for its power, but it flat out sucks in a lot of ways. Luckily, Debian developers hated it too and made it so that you pretty much never have to deal with symlinks when updating runlevels.
Here's a quick tutorial.
What you can and should mess with: /etc/init.d (creating your own scripts that go in there and potentially moving existing ones), update-rc.d, and .. that's it
What you absolutely shouldn't mess with: /etc/rc*, symlinks, editing anything in /etc/init.d
The bottom line is, learn update-rc.d, it's dead simple. The short version of the update-rc.d man page (without all the syntax details, just the synopsis of what it is) is: sets up start/kill symlinks at whatever number/level (Default: 20) you want for any script that's in /etc/init.d
So, if you want to stop a startup script from running, and you don't want to eff with everything (and you don't want to remove the package, and there's no debconf question "do you want to run foo on boot?"), then here's what you do (we'll pretend the script is /etc/init.d/foo:
1. mv /etc/init.d/foo /etc/init.d/foo-disabled
2. update-rc.d -n foo remove > /etc/init.d/foo-oldrunlevels
3. update-rc.d foo remove
The first one just moves the old script out of the way so you can put it back in case you want to remove the package. The second one stores what runlevels it used to be installed in in a file. The third one actually removes all the symlinks in the runlevels.
|
|
|
07-24-2003, 08:53 AM
|
#6
|
Member
Registered: Jun 2003
Posts: 119
Original Poster
Rep:
|
>For starters, the apache package installs its own startup script AND sets itself up to start on boot by default.
Well it didn't in my Knoppix install of Debian 
Now it does after the link
|
|
|
07-24-2003, 12:26 PM
|
#7
|
Member
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569
Rep:
|
Quote:
Originally posted by softgun
>For starters, the apache package installs its own startup script AND sets itself up to start on boot by default.
Well it didn't in my Knoppix install of Debian
Now it does after the link
|
Is the apache package off of the Knoppix CD itself? If not, where did you get it? (or did you install it some other way?)
|
|
|
07-25-2003, 09:00 AM
|
#8
|
Member
Registered: Jun 2003
Posts: 119
Original Poster
Rep:
|
Yes it is off the Knopix CD. I am now going over to Mepis starting next week. HopefullyApache wiill start at boot in that.
|
|
|
07-25-2003, 01:03 PM
|
#9
|
Member
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569
Rep:
|
If their apache package doesn't install its own startup script and set itself to boot on start by default, I would consider it a bug and report it to the knoppix maintainer. Perhaps they have good reasons for this, perhaps not.
Also, if this is a knoppix CD to hard drive install, stop right now and install from the official Debian CDs. The knoppic hard drive install, while convenient and functional for a static system, has a sucky upgrade path. Incredibly annoying to deal with. Just use vanilla Debian CDs if this is the case.
|
|
|
08-01-2003, 01:44 PM
|
#10
|
Member
Registered: Jun 2003
Posts: 119
Original Poster
Rep:
|
Official Debian CDs
The trouble is Official Debain CDs like Woody are OLD! Is the First ISO of the Official or Unofficial Sarge distribution useable?
I will certainly go for it if someone says that it installs without driving me up a tree
On the other hand can I download a upgrade CD from Woody to Sarge on the first ISO? Does it upgrade the kernal?
|
|
|
08-05-2003, 02:14 AM
|
#11
|
LQ Newbie
Registered: Aug 2003
Posts: 5
Rep:
|
I just grabbed the newest stable version of Apache2 and it has the exact same problem, for some reason. There is some kind of bug then.
|
|
|
08-05-2003, 08:17 AM
|
#12
|
Member
Registered: Jun 2003
Posts: 119
Original Poster
Rep:
|
On the other hand, after a basic Debian Woody install and apt-get install apache from the CDROM - Apache works nicely and boots at startup. Indeed Zope too and postgresql all work nicely at startup.
Only problem is X -does not work 
|
|
|
All times are GMT -5. The time now is 06:00 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|