*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.
It really amounts to no more than a script for the init scripts. You can usually find the "service" script in /sbin; it should be pretty easy to replicate in FreeBSD (with which I have very little experience).
Without rewriting the handbook -- Here's the short answer. Most ports that have daemons place a startup script into /usr/local/etc/rc.d/<something>.sh
When the system is coming up, rc executes all the scripts in /usr/local/etc/rc.d/ that end in .sh. Fairly recently, a mechanism wa added so that you have to enable the daemons in /etc/rc.conf. You can find out what variables need to be set by running the script with the argument rcvar. So, for Apache, do this: /usr/local/etc/rc.d/apache2.sh rcvar. You should get something like this:
Code:
# apache2
$apache2_enable=YES
You need to place that in your rc.conf. Then your apache will start at boot time.
As for starting/stopping manually, you can either use apachectl or /usr/local/etc/rc.d/apache2.sh. The rc script is really just a wrapper around apachectl, so either one will work fine.
Thanks for the links. I read both. But still can't get Apache installed in FreeBSD way.
First i removed the existing Apache
rm -rf /usr/local/apache2
that i installed from source.
My FreeBSD version is 5.2. Now i tryed sysinstall, but can't find apache on the CD, also tryed FTP site, but says release v5.2 not found on FTP server.
The FreeBSD team doesn't appear to be housing packages for 5.2R anymore, so you'll either have to upgrade to 5.3 (which I would personally recommend over 5.2) or install the ports system detailed here and at the previous URLs I posted.
What you downloaded is the port metafiles that control the build. They consist of a makefile and some other stuff that tells the system how to fetch and build Apache (and required supporting programs if any)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.