newbie question

newbie question

Post by Darre » Sat, 25 Jan 2003 05:11:41



I am quite new to FreeBSD, I have 4.5 installed text mode only on a 486 :)
and I also installed apache 2.0.43 everything runs good, question though,
how do i make it so everytime i reboot my computer, apache will start
automatically?
 
 
 

newbie question

Post by Lowell Gilber » Sat, 25 Jan 2003 05:20:58



> I am quite new to FreeBSD, I have 4.5 installed text mode only on a 486 :)
> and I also installed apache 2.0.43 everything runs good, question though,
> how do i make it so everytime i reboot my computer, apache will start
> automatically?

Put a script in '/usr/local/etc/rc.d'.  
The Apache port does this for you automatically, I think.

"man rc.local" for details on how to do it by hand.

 
 
 

newbie question

Post by Simon Barne » Sat, 25 Jan 2003 07:04:36


Quote:> Put a script in '/usr/local/etc/rc.d'.  
> The Apache port does this for you automatically, I think.

> "man rc.local" for details on how to do it by hand.

I think the port will only create a file apache.sh.sample. You will need to copy
it the apache.sh and make it executable. This has the advantage, that the port
will only overwrite the .sample file when you update apache, and not the script
that might have been carefully adapted by you.

Simon

 
 
 

newbie question

Post by Ralph Huntingto » Sat, 25 Jan 2003 07:10:37


Quote:> I am quite new to FreeBSD, I have 4.5 installed text mode only on a 486 :)
> and I also installed apache 2.0.43 everything runs good, question though,
> how do i make it so everytime i reboot my computer, apache will start
> automatically?

Any executable .sh file located in /usr/local/etc/rc.d/ will be run on
startup (last in the boot sequence) with an argument of 'start'. So, for
example, you might create

/usr/local/etc/rc.d/rclocal.sh

with contents like (for example)

#!/bin/sh
/path/to/apachectl $1

The '$1' will take the 'start' argument and apply it, or you could just say
it explicitly and discard the argument.

#!/bin/sh
/path/to/apachectl start

Remember to chmod your startup script executable.        -=r=-

 
 
 

newbie question

Post by Lowell Gilber » Sat, 25 Jan 2003 07:44:50



> > Put a script in '/usr/local/etc/rc.d'.  
> > The Apache port does this for you automatically, I think.

> > "man rc.local" for details on how to do it by hand.

> I think the port will only create a file apache.sh.sample. You will need to copy
> it the apache.sh and make it executable. This has the advantage, that the port
> will only overwrite the .sample file when you update apache, and not the script
> that might have been carefully adapted by you.

The port's makefile seems to disagree.
Have I missed something?


                ${ECHO} "Installing ${PREFIX}/etc/rc.d/apache2.sh startup file."; \
                ${INSTALL_SCRIPT} -m 751 ${WRKDIR}/apache2.sh ${PREFIX}/etc/rc.d/apache2.sh; \
        fi

 
 
 

newbie question

Post by Simon Barne » Sat, 25 Jan 2003 21:52:17


>> I think the port will only create a file apache.sh.sample. You will need to copy
>> it the apache.sh and make it executable. This has the advantage, that the port
>> will only overwrite the .sample file when you update apache, and not the script
>> that might have been carefully adapted by you.

> The port's makefile seems to disagree.
> Have I missed something?


>            ${ECHO} "Installing ${PREFIX}/etc/rc.d/apache2.sh startup file."; \
>            ${INSTALL_SCRIPT} -m 751 ${WRKDIR}/apache2.sh ${PREFIX}/etc/rc.d/apache2.sh; \
>    fi

No, you're right. I should have had a look at the Makefile before my post.

My postings points out the policy that ports should follow when they install
configuration files and the like. At least, the Apache 2 port will check
whether there is already a startup file.

Simon

 
 
 

1. Newbie (I mean REAL NEWBIE) question

Sorry, I'm not a pc idiot, just completely new to linux. I lurked here
for a day or two and didn't see the answer.

Can I run Windows95 in a Linux RedHat 5.2 shell? This would let me play
Linux but still use my favorite apps. I've set it up to dual boot, but I
want to actually run one or two Win95 sessions in Linux itself.

Someone told me it was possible, but in the 4 days of having RedHat on
my system I can't figure it out...

Sorry for the dumb question.

Nick
--

Nick Smeltzer CNE


2. EGA on linux

3. linux newbie--newbie question follows

4. Sparcstation 10 Video query

5. Newbie question - mailing list, or web site dealing with newbies security in linux?

6. Command to get linux version

7. NEWBIE.. Extremely Newbie questions.

8. automating FTP

9. Newbie Questions (ICEWM Background, ppp question, mem > 64mb)

10. sar Question (probably a newbie question)

11. Netscape configuration question; newbie question.

12. Kernel compile question. (another newbie question)

13. Newbie Question - Supported Hardware Question.