How to get Apache to Auto-Start at Reboot?

How to get Apache to Auto-Start at Reboot?

Post by John Smit » Sat, 12 Feb 2000 04:00:00



Okay, I am brand new to the Unix world - my company got me a SPARC E250,sent
me to trinaing and I am still hating life.  How long until I become one of
those Unix/linux devotees?

In the meantime, I would greatly appreciate info on getting Apache to
automatically restart when I reboot the server. Right not I have to go to
usr/local/apache/bin and do the httpd thing.

Thank you in advance!!!

PS - Are there any good Apache resources in the way of usenet groups or
websites?

 
 
 

How to get Apache to Auto-Start at Reboot?

Post by smarl.. » Sat, 12 Feb 2000 04:00:00




> Okay, I am brand new to the Unix world - my company got me a SPARC
E250,sent
> me to trinaing and I am still hating life.  How long until I become
one of
> those Unix/linux devotees?

> In the meantime, I would greatly appreciate info on getting Apache to
> automatically restart when I reboot the server. Right not I have to go
to
> usr/local/apache/bin and do the httpd thing.


Nope, you post to usenet, you read on usenet.  It's not a place to ask
for private responses to things others might find useful...

Are you running Solaris or Linux (they both work on ultra sparc
hardware, so it could be either.)

If you are running a unix flavor with SYS V startups, then there should
be a directory like /etc/rc.d that controls startup.

In sysV there will be a set of directories like:

rc1.d, rc2.d, rc3.d, rc4.d, rc5.d and rc6.d

These directories have links to scripts stored in the init.d directory.
The scripts in the init.d directory are used to start and stop
services.  If you look in init.d there should be an httpd script.
Inside each script there is a section called stop and a section called
start.

When you make a link to these files in the rc3.d or rc5.d directories,
you start it with either a capitol S or a capitol K.  The first letter
is followed by a two digit number.  When a machine enters a run level,
the K scripts are run first, in numeric order, and called the linked
scripts with a stop command.  So, K08autofs -> ../init.d/autofs would
result in the autofs stop being run.  Next, K20xxx and so on.

Then the S00 through S99 scripts are run.  Run levels 3 to 5 on my
machine are linked like so:  S85httpd -> ../init.d/httpd  which results
in my /etc/rc.d/init.d/httpd script being run with a start command.

Since run level 3 is console mode, and run level 5 is Xwindows (4 isn't
really used much.) you would want to do this while in rc3.d, rc4.d and
rc5.d:

ln -s ../init.d/httpd S85httpd

And that should tell it to come up each boot.

Failing that, you could just toss the following line at the end of
rc.local in the /etc/rc.d directory:

httpd

And be done with it.

Quote:> PS - Are there any good Apache resources in the way of usenet groups
> or websites?

This is one of the better usenet groups there is.

For web sites, take a look at www.apache.org, which has lots of hidden
info in the apache documentation area, and www.apacheweek.com, which has
a great deal of good info.

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

How to get Apache to Auto-Start at Reboot?

Post by John Imri » Sat, 12 Feb 2000 04:00:00



> Okay, I am brand new to the Unix world - my company got me a SPARC E250,sent
> me to trinaing and I am still hating life.  How long until I become one of
> those Unix/linux devotees?

About 2 minuits after you decover that the documentation on your system is far
more helpfull than M$ Windows/NT help files.

Quote:

> In the meantime, I would greatly appreciate info on getting Apache to
> automatically restart when I reboot the server. Right not I have to go to
> usr/local/apache/bin and do the httpd thing.

When the computer starts it runs through a searies of startup scripts held in
the /etc/rc.d directory. In a simaler way that MS products use config.sys and
autoexec.bat. Look for one called rc.local and add your Apache startup command
to that.

Quote:> PS - Are there any good Apache resources in the way of usenet groups or
> websites?

Yes. This news group and http://www.apache.org and http://www.apacheweek.com and
...

John Imrie

 
 
 

How to get Apache to Auto-Start at Reboot?

Post by Jerem » Sat, 12 Feb 2000 04:00:00



> In the meantime, I would greatly appreciate info on getting Apache to
> automatically restart when I reboot the server. Right not I have to go to
> usr/local/apache/bin and do the httpd thing.

You need to put a startup script in the appropriate place.  If you're
running Solaris on that Sparc, the easiest way to accomplish this
is to make symlinks to 'apachectl' in the right places.

 ln -s /usr/local/apache/bin/apachectl /etc/rc3.d/S80apache
 ln -s /usr/local/apache/bin/apachectl /etc/rc0.d/K40apache

You can also use a script that calls apachectl if you want.

If you're running Linux, the directory structure is somewhat different.

Post to Usenet, read on Usenet.

--

 
 
 

How to get Apache to Auto-Start at Reboot?

Post by al » Wed, 16 Feb 2000 04:00:00




> > In the meantime, I would greatly appreciate info on getting Apache to
> > automatically restart when I reboot the server. Right not I have to go
to
> > usr/local/apache/bin and do the httpd thing.

> You need to put a startup script in the appropriate place.  If you're
> running Solaris on that Sparc, the easiest way to accomplish this
> is to make symlinks to 'apachectl' in the right places.

>  ln -s /usr/local/apache/bin/apachectl /etc/rc3.d/S80apache
>  ln -s /usr/local/apache/bin/apachectl /etc/rc0.d/K40apache

> You can also use a script that calls apachectl if you want.

> If you're running Linux, the directory structure is somewhat different.


> Post to Usenet, read on Usenet.

> --


--
Posted via CNET Help.com
http://www.help.com/
 
 
 

How to get Apache to Auto-Start at Reboot?

Post by al » Wed, 16 Feb 2000 04:00:00


I was able to get this far in my admin guide.  I'm unfamiliar with writing
scripts is my difficulty.  I cannot find a start/stop script supplied with
the Apache for Sun ULTRA.  Is there an archive of these?  Thank alot.  Al



> > In the meantime, I would greatly appreciate info on getting Apache to
> > automatically restart when I reboot the server. Right not I have to go
to
> > usr/local/apache/bin and do the httpd thing.

> You need to put a startup script in the appropriate place.  If you're
> running Solaris on that Sparc, the easiest way to accomplish this
> is to make symlinks to 'apachectl' in the right places.

>  ln -s /usr/local/apache/bin/apachectl /etc/rc3.d/S80apache
>  ln -s /usr/local/apache/bin/apachectl /etc/rc0.d/K40apache

> You can also use a script that calls apachectl if you want.

> If you're running Linux, the directory structure is somewhat different.


> Post to Usenet, read on Usenet.

> --


--
Posted via CNET Help.com
http://www.help.com/
 
 
 

How to get Apache to Auto-Start at Reboot?

Post by John Imri » Thu, 17 Feb 2000 04:00:00



> >Nope, you post to usenet, you read on usenet.  It's not a place to ask
> >for private responses to things others might find useful...

> Puh-lease -  who made you arbiter of all such things? Not all of us
> have easy access to usenet, and often posting to any usenet groups
> takes heroics at a fairly high level. And, as such, reading replies
> much the same. Asking for private replies if possible is not
> unreasonable.

> After all, since you clearly assume responsiblity for such things, you
> know that most news clients allow simultaneously emailing and posting
> replies.

> Sheesh...

I tend to post a reply to the NG and e-mail the orig*poster ... But
then I'm a Nice Guy (tm)

John Imrie

 
 
 

How to get Apache to Auto-Start at Reboot?

Post by Jerem » Fri, 18 Feb 2000 04:00:00



> I was able to get this far in my admin guide.  I'm unfamiliar with
> writing scripts is my difficulty.  I cannot find a start/stop script
> supplied with the Apache for Sun ULTRA.  Is there an archive of these?

You can just use the apachectl script that comes with Apache.  Since it
takes 'start' and 'stop' as arguments, it can work as an init.d startup
script.  You can just link it in the right places.

You can also write/use a script for it, but if you're not comfortable
doing that, using apachectl is the easiest thing to do.

--

 
 
 

How to get Apache to Auto-Start at Reboot?

Post by Jerem » Fri, 18 Feb 2000 04:00:00



>> Nope, you post to usenet, you read on usenet.  It's not a place to ask
>> for private responses to things others might find useful...

> Puh-lease -  who made you arbiter of all such things? Not all of us
> have easy access to usenet, and often posting to any usenet groups
> takes heroics at a fairly high level. And, as such, reading replies
> much the same. Asking for private replies if possible is not
> unreasonable.

This isn't the help desk.  I'll answer questions on the group because
it can help many people, not just the person asking.  If someone wants
personal attention, they can pay for my time.  And in my experience,
sending private replies generates more private questions.

--

 
 
 

1. How can I auto-reboot a SUN, then auto-login, then auto-start a program?

My Sun (Solaris 2.6) server is running a program as a listener, when it
receives the "installation" command from remote user, it will call a
script which will automatically reboot the machine, then auto-login,
then automatically restart the listener to do the installation ...

Does anyone know how to implement this script,

Thanks a lot,

Hua.


2. Mysterious lock-ups under ISC SVR3 unix: seeking help!

3. How to auto-reboot a SUN, then auto-login, then auto-start a program?

4. Export DOS partitions via NFS

5. Getting Samba to auto start after cold boot/reboot

6. Chipsets for X

7. !!Getting rid of auto start programs at start/Dialing up freeserve!!

8. gdb not displaying content of the object

9. Auto-start Apache on Solaris 2.7

10. How to auto-start apache when AIX boot.

11. Apache 1.3.6 Auto-Start on SCO

12. AUTO START OPENWIN UPON REBOOT, not LOGIN

13. auto start/stop of database on Solaris reboot?