Open Source Software Technical Articles

Want the Best of the Wazi Blogs Delivered Directly to your Inbox?

Subscribe to Wazi by Email

Your email:

Connect with Us!

Current Articles | RSS Feed RSS Feed

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

  
  
  

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.

19a98812-f823-48dc-841e-bf029c63c6d7

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.



    1. You'll need the following tools :


        • 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.



    • 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.

    • 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.

    • Change directory to /hold/Apache-2.2.8 ( cd /hold/Apache-2.2.8 )

    • 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.

    • 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.

    • Deploy the Apache Project.  ( make install )  Once more, this should be accomplished as the 'root' user.

    • 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.

    • In a web browser go to URL http://localhost.


Finishing Up


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




This work is licensed under a Creative Commons Attribution 3.0 Unported License
Creative Commons License.


This work is licensed under a Creative Commons Attribution 3.0 Unported License
Creative Commons License.

Comments

Currently, there are no comments. Be the first to post one!
Post Comment
Name
 *
Email
 *
Website (optional)
Comment
 *

Allowed tags: <a> link, <b> bold, <i> italics