Installing from Debian Packages
Problem
You have a computer running Debian, or one of the Debian-based distributions, such as Ubuntu, and wish to install Apache.
Solution
Using apt-get, install the apache2 package:
# apt-get install apache2-mpm-preforkDiscussion
As with any package-based Linux distribution, it’s usually best to stick with the packages supplied by that distribution in order to have ease of updates, and maximum interoperability with other packages installed on the same system. On Debian, this means using apt-get.
It’s a good idea to install the apache2-dev package as well, as it provides utilities, such as apxs, which will be useful in installing third-party modules, should the need arise.
Debian has its own unique arragement of configuration files,
which is unlike that of any other distribution. Both modules and sites
(virtual hosts) are arranged in subdirectories so that they can be
enabled or disabled at will using utilities that come with Debian’s
version of Apache. For example, to enable a particular module, you
will use the a2enmod command, which
makes the appropriate changes to the server configuration file to
cause that module to be loaded. For example:
# a2enmod rewriteFor a full description of where Debian places its files and directories, you should consult http://wiki.apache.org/httpd/DistrosDefaultLayout.
See Also
man a2enmod
man apt-get
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access