*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
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.
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/apache2.sh 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.
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.
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/whatever.sh 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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.