-   *BSD (
-   -   FreeBSD starting services (

reddazz 04-15-2005 03:32 PM

FreeBSD starting services
I have decided to install apache, mysql and webmin via ports. How do I get these services to automatically start at boot time. After installing webmin, I got a message that putting webmin_enable="YES" in /etc/rc.conf would start webmin at boot time, but this doesn't happen and its the same for apache2 and mysql. I can start apache2 manually by doing /usr/local/etc/rc.d/ start, but webmin and mysql won't start using the scripts. I don't even get an error on screen, so I can't understand why they are failing to start. Any help is appreciated.

hemmelig 04-17-2005 05:01 AM

Did you remember to run 'rehash' after installing mysql or webmin via Ports?
If so, check your logs. They are the key to solving all unexpected errors.

reddazz 04-17-2005 08:48 AM

Can you explain a bit more about what you mean by running "rehash". Thanks.

sigsegv 04-17-2005 09:44 AM

Rehash has nothing to do with it. Rehash is only for things that use the C shell (which rc scripts do not). The only time you have to use it is when you install software and your shell needs to scan your path again (rehash).

The short answer is "Run `/usr/local/etc/rc.d/ rcvar` and set the correct variables in rc.conf"

Things about the FreeBSD service starting at boot time have changed a little bit in the recent past. Basically, anything in /usr/local/etc/rc.d with an extention of '.sh' and set executable will be run at boot time.

The thing that has changed is that that used to be all that was required. It was a pain to tell the new users how to do all that though, so they adopted something closer to Net and Open's solution of installing all the scripts so that they would be executed at startup, but they check rc.conf to see if they should actualy activate the service that they're in charge of.

See the handbook for more information.

reddazz 04-17-2005 11:14 AM

Thanks, I have managed to get apache2 and mysql starting at boot time. As for webmin its another issue, it just won't start manually or at boot time, so I will just have to keep searching for a solution.

All times are GMT -5. The time now is 01:16 AM.