pavement

Apache2, Installing

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
m
Line 30: Line 30:
  
 
First, I changed to the [[superuser]], as we'll be installing software. I changed directory to the '''www''' section of the ports tree, and filtered a listing of that directories contents for all ports that contained the word 'apache' using [[grep]]. The one we want is '''apache2'''. I then changed to that directory, and issued the [[make]] command, with options '''install''' and '''clean''' specified, to install the software and clean up the makefiles when done.
 
First, I changed to the [[superuser]], as we'll be installing software. I changed directory to the '''www''' section of the ports tree, and filtered a listing of that directories contents for all ports that contained the word 'apache' using [[grep]]. The one we want is '''apache2'''. I then changed to that directory, and issued the [[make]] command, with options '''install''' and '''clean''' specified, to install the software and clean up the makefiles when done.
 +
 +
Note that you'll want to check the file /usr/ports/www/apache/Makefile.doc to see what modules you can build into apache2 -- e.g., [[LDAP]] or [[IPv6]] or threading. To include the one you want, you'd want to build apache like so:
 +
 +
samizdata# '''make -DWITH_LDAP_MODULE install clean
  
 
After a seconds, minutes, or hours (depending on whether your hardware is going to waste, reasonable, or a throwback to the early 90's), Apache2's installation will be completed, and you'll be faced with this note:
 
After a seconds, minutes, or hours (depending on whether your hardware is going to waste, reasonable, or a throwback to the early 90's), Apache2's installation will be completed, and you'll be faced with this note:

Revision as of 02:43, 6 March 2005

Apache 2.0

See also Apache - Apache Controlling - Apache Configuration

We'll walk through the installation for Apache2. It's very simple to install - in earlier versions of Apache, you had to install either mods or different versions depending on whether you wanted to enable certain features (ssl, etc). With Apache2, they are incorporated into the main package, and enabled or disabled when you configure Apache. There are a few exceptions, but most everything you'll need to run a modern feature-rich webserver is included with the Apache2 port.

Note: As always, before installing any ports, update your ports tree with cvsup if it has been a while.

Let's get started:

>su
Password: (enter root password)
oyabun# cd /usr/ports/www
oyabun# ls | grep apache
apache-contrib
apache-forrest
apache-jserv
apache13
apache13+ipv6
apache13-fp
apache13-modperl
apache13-modssl
apache13-modssl+ipv6
apache13-ssl
apache2
mod_jk-apache2
mod_jk2-apache2
oyabun# cd apache2
oyabun# make install clean

First, I changed to the superuser, as we'll be installing software. I changed directory to the www section of the ports tree, and filtered a listing of that directories contents for all ports that contained the word 'apache' using grep. The one we want is apache2. I then changed to that directory, and issued the make command, with options install and clean specified, to install the software and clean up the makefiles when done.

Note that you'll want to check the file /usr/ports/www/apache/Makefile.doc to see what modules you can build into apache2 -- e.g., LDAP or IPv6 or threading. To include the one you want, you'd want to build apache like so:

samizdata# make -DWITH_LDAP_MODULE install clean

After a seconds, minutes, or hours (depending on whether your hardware is going to waste, reasonable, or a throwback to the early 90's), Apache2's installation will be completed, and you'll be faced with this note:

Available variables you add/set to /etc/rc.conf.
- apache2_enable (bool):      Set to "NO" by default.
                              Set it to "YES" to enable apache2.
- apache2ssl_enable (bool):   Set to "NO" by default.
                              Set it to "YES" to start apache with SSL
                              (if <IfDefined SSL> exists in httpd.conf).
- apache2limits_enable (bool):Set to "NO" by default.
                              Set it to yes to run `limits $limits_args`
                              just before apache starts.
- apache2_flags (str):        Set to "" by default.
                              Extra flags passed to start command.
- apache2limits_args (str):   Default to "-e -C daemon"
                              Arguments of pre-start limits run.

As you can see from this, ssl suport is included in Apache2, as opposed to Apache 1.3. I included this output because I have a bad habit of scrolling important stuff like this out of the buffer after installations, and it's nice to have it saved here. You don't need to worry about any of this until you configure Apache.

So, Apache2 is now installed, you just need to actually set it up.

Please visit Apache Controlling to learn how to actually start your webserver.

Personal tools