Home > Articles

Installing and Building Apache 2

  • Print
  • + Share This
This lesson covers downloading, building, and installing Apache on both Unix and Windows platforms. It covers a basic installation of the server and how to enable loadable module support for extensibility. Other lessons in the book expand on how to create a custom version of the server and enable/disable different modules.

See all Sams Teach Yourself on InformIT Web Development Tutorials.

Apache 2 is the new, long awaited version of Apache, the dominant web serving platform on the Internet that powers high profile web sites such as Amazon and News.com. Apache 2 comes packed with features and improvements over the previous version of Apache, the 1.3 series. The most important are:

  • Increased performance and scalability with a new multithreaded architectures
  • A modular, extensive framework that supports filters and multiprotocol modules
  • Improved portability and support for non-Unix platforms such as Windows

These changes will attract many new users to Apache (especially in the Windows world) and are significant enough that existing Apache 1.3 administrators will need guidance when upgrading. I wrote the Teach Yourself Apache 2 book with them in mind.

The book presents in clear, simple to understand terms, everything you need to know about building, deploying, monitoring and managing Apache 2 servers and associated third party modules (such as PHP and mod_perl), both on Windows and Unix platforms such as Linux and Solaris. While comprehensive, the book follows a practical, hands-on approach, avoiding being a simple listing and explanation of configuration directives (the existing Apache reference documentation already does a good job at that).

In writing the book, I drew on different sources of experience. Being part of the original developer team at Covalent technologies, a provider of Apache related software, gives me an unique insight and understanding on the latest Apache developments and the problems enterprise companies face when deploying Apache servers. Being the author of the Comanche GUI configuration tool for Apache gives me a daily exposure to the problems new users face taking their first steps with Apache.

I have selected four chapters for InformIT that I believe are a good sample of the tasks Apache administrators need to carry out.

—Daniel Lopez

This chapter is from the book

Previous hours introduced you to the architecture of the Web and Apache. At this point, you are ready to install Apache and get to work. In this hour, you will learn

  • How to download, compile, and install a basic Apache server on Unix

  • How to download and install a basic Apache server on Windows operating systems

This hour also covers binary, source, and prepackaged installations.

Choosing the Appropriate Installation Method

Several options are available to get a basic Apache installation in place. Apache is open source, meaning that you can have access to the full source code of the software, which in turn enables you to build your own custom sever. Additionally, pre-built Apache binary distributions are available for most modern Unix platforms. Finally, Apache comes already bundled with a variety of Linux distributions, and commercial versions can be purchased from software vendors such as Covalent Technologies and IBM.

Building from Source

Building from source gives you the greatest flexibility, enabling you to build a custom server, remove modules you do not need, and extend the server with third-party modules. Building Apache from source code enables you to easily upgrade to the latest versions and quickly apply security patches. Updated versions from vendors usually take days or weeks to appear.

Building Apache from the source code is not that difficult for simple installations, but can grow in complexity when third-party modules and libraries are involved. Hour 18, "Extending Apache," explains how to extend Apache.

Installing a Binary

Unix binary installations are available from vendors and can also be downloaded from the Apache Software Foundation Web site. They provide a convenient way to install Apache for first-time users.

Third-party commercial vendors provide prepackaged Apache installations together with an application server, additional modules, support, and so on.

The ASF provides an installer for Windows systems—a platform where a compiler is not as commonly available as in Unix systems.

Apache Version Naming

Starting with Apache 2.0, Apache server releases are named with three digits and an optional qualifier (alpha or beta). The first digit refers to the main Apache release version, the second digit to the major revision, and the third digit to the minor revision. A qualifier of alpha means that the code has not reached production-level quality and the feature set is subject to change. In general, only developers working on the Apache code base or advanced users curious about the latest features should run alpha code. A beta version means that although the code is still not production-ready, the feature set is more or less complete and the server is considered stable enough for general testing. A sample Apache release name is 2.0.28-beta.

NOTE

As a side note, Apache developers take great pride in the quality of their code. As a result, beta versions of Apache are much more stable and feature-rich than commercial product beta software. The drawback is that sometimes the development cycle takes way too long.

  • + Share This
  • 🔖 Save To Your Account