Build Apache 2.2.X on AIX 5.3 Platforms Part I: Basics

By on Wednesday, October 1st, 2008 in Technical | Related Software Packages: | Keywords: ,

While there are many binary versions of Apache available for the AIX platform, many people wish to build it themselves so they can add modules or custom locations to the Apache Web server. Should you need that flexibility, this tutorial will guide you.

This is not an AIX administration guide, and any administration tasks suggested by this guide will need to be performed as a “root” user. If you’re unsure of whether or not you are a “root” user, then you should stop now, and find someone who knows for sure.

This tutorial will also assume that we’re building Apache with GCC (GNU Compiler Collection). The steps outlined here may work with other compilers, but have only been tested with GCC.

Before You Start

In order to properly prepare the system and the Apache build configuration, we need to make a checklist of where you want Apache and what use you wish to make of it.

  1. Where will you install Apache? In order to compile Apache you’ll need ~250MB of free disk space in the following areas:
    • Build Directory – this is where you’ll build the code. It can be anywhere on the file system. Although many people choose to do this in their home directory, we recommend that you create a specific directory.  Something like /build in the root directory, or in a place where you have free space.
    • Prefix Directory – this is where you want Apache to be installed when you’re done. By default, Apache installs in the /usr partition.
    • Tmp Directory - It’s always a good idea to have some free space in /tmp during builds.
  2. You’ll need the following tools :
    • Apache Source Code: Download Apache version 2.2.8.
    • GCC 4.0: GNU C compiler version 4 for AIX 5.3. You’ll find it here.
    • libgcc 4.0: the library for GCC for AIX 5.3. Go here to get it.
  3. You’ll also need to install libm.a from the AIX 5.3 installation disk 1.  We recommend using “smitty installp” to accomplish this install.
  4. Uncompress the Apache source code into a temporary location. We usually create a /hold/Apache-2.2.8 directory, but any directory where you have space is fine.
  5. Change directory to /hold/Apache-2.2.8 ( cd /hold/Apache-2.2.8 )
  6. Run the configure command with the prefix option.   ( ./configure --prefix=/usr/local/apache ). This command evaluates your system for its readiness to build Apache. You’ll notice that some things will be found, and others will not be found. As long as the configure completes without errors, you may continue the build process.

Note: Installing the RPMs (Red Hat Package Managers) for GCC should be done as the root user.

Meat & Potatoes

Building Apache

First you’ll want to uncompress the Apache source code into a temporary location. We usually create a /hold/Apache-2.2.8 directory, but any directory where you have space is fine.

This tutorial will assume that directory is /hold/Apache-2.2.8 and will assume that the answer to question 1 in the Prerequisites section above is /usr/local/apache.

  1. Make the Apache project. ( make ) The make command reads the Makefile that was created in the configuration step. This will run for approximately 15 minutes. You may see some warnings, but again, as with the configuration step, if it completes without errors, it is fine.
  2. Deploy the Apache Project.  ( make install )  Once more, this should be accomplished as the ‘root’ user.
  3. Test the project. Change directory to /usr/local/apache/bin.  Run the Apache start-up script. (./apachectl start ) You may be warned that Apache can’t determine the server’s name, but no worries – that’s to be expected, as we have not configured Apache. The server will still start up.
  4. In a web browser go to URL http://localhost.

Finishing Up

You should see the page load, and it will report “It Works!”

Download the Guide to Open Source Licenses

Related posts:

  1. Build Apache 2.2.X on AIX 5.3 Platforms Part II: Common Issues
  2. Apache HTTP Server FAQ
  3. Using Apache as a File Server with DAV and LDAP
  4. Smart Access Control with Apache
  5. Installing Apache HTTP Server with a Quick-Start Config

Related Open-Source Packages

Apache: See all Apache Articles » Get Apache Support at OLEX »

Brad Reeves

Linux. KDE. Open Source. Refuses to own an iPod. Drives a Mini Cooper. Brad's a Senior Content Engineer at OpenLogic but get this: he's also been a ski patrol guy, basketball coach, line cook, and trainer at HP (for starters). Brad has earned his guru status, and - if you want something done? Folks actually refer to him as the "office do-er of everything". Cooks veggies in all manner of delicious ways, but eats only meat. Able to benchpress any given 17 year old. This guy? Totally deserves the superman logo and if it weren't for that pesky copyright, we'd give it to him. In color.

One Response to “Build Apache 2.2.X on AIX 5.3 Platforms Part I: Basics”

  1. Jeff Barry says:

    I ran configure as described but do not get the desired Makefile – I output stdout and stderr to two separate files – stdout was clean and I didn’t see any strings containing “rror” (error) in stdout. I am attempting to build 2.2.11 with GCC and IBMs perl – where else might I need to look??

Leave a Reply

© 2012 OpenLogic, Inc. | Licensing | Privacy Policy | Terms of Use

Bad Behavior has blocked 2290 access attempts in the last 7 days.