Home arrow Apache arrow Page 3 - Getting Started with Apache

Installing Apache from Binary Distribution - Apache

Learn the basic steps necessary to download, install, and configure a basic Apache server. This article is from chapter two of Pro Apache by Peter Wainwright. (Apress, 2004, ISBN: 1590593006).

  1. Getting Started with Apache
  2. Installing Apache
  3. Installing Apache from Binary Distribution
  4. Installing Apache from Prebuilt Packages
  5. Installing Apache by Hand
  6. Upgrading Apache
  7. Basic Configuration
  8. Administrator’s E-Mail Address
  9. Starting, Stopping, and Restarting the Server
  10. Generic Invocation Options
  11. Windows-Specific Invocation Options
  12. Testing the Server
  13. Testing the Server Configuration Without Starting It
  14. Using Graphical Configuration Tools
By: Apress Publishing
Rating: starstarstarstarstar / 19
December 13, 2004

print this article



Binary distributions are archived copies of the compiled Apache source and contain a complete Apache server, all supporting scripts and configuration files, a complete copy of the source code, and an installation script to install the server into the desired location. They don’t, however, contain scripts to automatically start and stop Apache with the operating system.

Distributions are available for several variants of Unix, OS/2, Netware, BeOS, and MacOS X from the Apache home page at http://www.apache.org/dist/httpd/binaries/. Refer to the “Installing Apache from Prebuilt Packages” section for more information.

NOTE Linux administrators will find packages under the linux subdirectory, and you can find Solaris packages similarly under solaris.
MacOS X administrators
will also find distributions for MacOS X/Darwin—the darwin and macosx subdirectories have the same contents, so either will do—as well as MacOS X Server/Rhapsody, similarly in macosxserver or rhapsody .Windows packages for Windows 9x ,ME, NT, 2000, and XP are also available from this location. Both self-installing and Windows installer packages are available, but these aren’t basic binary distributions as described here.

On platforms for which binary distributions are available, you can download and install Apache with only a few steps.

Using Unix as an example, first download either the compress archive (suffix .Z) or the gzip archive (suffix .gz). For other platforms, such as OS/2, you may also find a ZIP archive available. Because gzipped archives are compressed more efficiently than compressed ones, you should get the gzip archive if you have gzip available to decompress it. If you don’t, this might be a good time to install it.

Once the archive is downloaded, unpack it:

$ gunzip apache_1.3.28-i686-whatever-linux22.tar.gz
$ tar xvf apache_1.3.28-i686-whatever-linux22.tar

This archive is for a Linux server, kernel version 2.2 or higher, running on a machine with at least an Intel Pentium II processor. Archives for other platforms are named appropriately in the relevant platform subdirectory. When a platform is available for more than one processor architecture, as Linux is, be careful to download the correct binary distribution—a Sparc or Alpha distribution is of little use to an Intel server, for example.

You can also extract the archive in one step, leaving the archive in a compressed state to conserve disk space:

$ gunzip -c apache_1.3.28-i686-whatever-linux22.tar.gz | tar xvf -

On systems with the GNU version of tar, which includes all Linux and BSD platforms, you can also extract the archive in one step (note the extra z in zxvf to signify that the archive is compressed):

$ tar zxvf apache_1.3.28-i686-whatever-linux22.tar.gz

On systems that don’t have gzip installed, download the .Z archive and use the standard Unix uncompress utility instead:

$ uncompress apache_1.3.28-i686-whatever-linux22.tar.Z

This is actually the most complex part of the process. Once the archive is unpacked, go into the newly created Apache directory:

$ cd apache_1.3.28

Then run the included installation script:

$ ./install-bindist.sh

If you want to install Apache somewhere other than /usr/local/apache, give the installation script the path you want to use, for example:

$ ./install-bindist.sh /home/httpd/

This should produce a working Apache installation in the desired location. If you’re installing on a Unix server and want to install into a standard system location, you’ll need to have root privileges to perform this step. After the installation is complete, you may remove both the archive and the unpacked archive directory. You’re now ready to configure Apache.

An interesting point of binary distributions is that you can create them yourself, using the source distribution. This allows you to create a fully customized server that matches your needs and then distribute it yourself. The created binary distribution is the same as the standard distribution in all respects except for the customizations you make.

NOTE Creating and installing your own binary distribution is covered in Chapter 3.

Installing Apache from Source

As mentioned, you can also download Apache source distributions from the official Apache site. They’re located in http://www.apache.org
and come in either ZIP format (.zip) or gzip format (.gz).

Again, mirrors exist, and you should use the mirror closest to you—note that choosing the Download from a Mirror link from the main site should select a suitable mirror automatically. Once downloaded, the source can be compiled using Microsoft Visual C++ compiler on Windows and gcc on most other platforms. This is the major subject of Chapter 3, so I’ll not dwell on it further here. 

This chapter is from Pro Apache by Peter Wainwright. (Apress, 2004, ISBN: 1590593006). Check it out at your favorite bookstore today. Buy this book now.

>>> More Apache Articles          >>> More By Apress Publishing

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Apache Unveils Cassandra 1.2
- Apache on ARM Chips? Dell and Calxeda Help M...
- The Down Side of Open Source Software
- VMware Unveils Serengeti for Apache Hadoop
- SAP Takes Steps to Improve Hadoop Integration
- Looking to Hone Apache Hadoop Skills?
- How to Install Joomla on WAMPP
- Working with XAMPP and Wordpress
- GUI Available for Apache Camel
- Reduce Server Load for Apache and PHP Websit...
- Creating a VAMP (Vista, Apache, MySQL, PHP) ...
- Putting Apache in Jail
- Containing Intrusions in Apache
- Server Limits for Apache Security
- Setting Permissions in Apache

Developer Shed Affiliates


Dev Shed Tutorial Topics: