Softpanorama
(slightly skeptical) Open Source Software Educational Society

May the source be with you, but remember the KISS principle ;-)

Softpanorama Search

Compiling Apache  2.2.8 on AIX

News

Open Source packages for AIX

Redbooks Recommended Links GCC on AIX Compilation of open source on AIX
aix toolbox Apache+PHP on AIX Compiling Apache 1.3 on AIX   Humor Etc

There are two ways to install Apache on AIX:

The description below is adapted from IBM Wikis - AIX 5L Wiki - aixopen

Precompiled versions of apache for AIX

Precompiled binaries of Apache for AIX if available from several sources. RPM packages are probably the best choice and are available from several sources:

AIX 5L Open Source Packages Main - Apache lists dependencies for Apache:

Source RPM:

Package dependencies:

Compiling Apache 2.2.8 on AIX

By A default AIX 5.3 ML 03 is "Apache-friendly": the the only additional package the Apache requires is  libgcc.

  1. Make sure you have a few hundred MB of free space in following places
  2. Download
  3. Install the gcc compiler and libgcc library as the root user
    rpm -Uvh gcc-4*.rpm
    rpm -Uvh libgcc-4*rpm
     
  4. Uncompress the Apache Web Server source
    gunzip -c <  httpd-2.2.8.tar.gz  | tar xvf - 
  5. Add /opt/freeware/bin to the PATH

    export PATH=/opt/freeware/bin:$PATH

  6. Run the configure script (it take approximately 20 min on a reasonably powerful server):

    Compilation with LDAP libraries

    1. export PATH=/opt/freeware/bin:$PATH
    2. ./configure -C --prefix=/usr/local/apache2 \
      --enable-so --enable-info\
      --with-ldap \
      --enable-ldap=static \
      --enable-authnz-ldap=static

    Or in a single line

    ./configure -C --enable-so --enable-info --prefix /usr/local/apache2 -with-ldap=yes --enable-ldap=static --enable-authnz-ldap=static  
     
  7. Compile Apache2 by typing (as a regular AIX user):
    make
  8. Install Apache2 - all the important stuff will be in /usr/local/apache2. Type as the root user:
    make install
  9. If it all goes wrong, you can run "make clean" to start again from point 6.

Configuring Apache2+ on AIX

Assuming you have just compiled and installed Apache2+ as in the above section, you need several steps to configure Apache on AIX:

  1. You will need to make at least one modification to the Apache config file  before you start it:  change the line "User daemon" to "User nobody" and the line "Group daemon" to "Group nobody".
    vi /usr/local/apache2/conf/httpd.conf
  2. Test the Apache2 configuration
    /usr/local/apache2/bin/apachectl -t
  3. Start Apache2
    /usr/local/apache2/bin/apachectl -k start
  4. Point your browser at http:/your-machine-dns-name and you should be informed that it is working (Apache will load the test page that comes with the installation).

Configuring Apache2.2.8 on AIX - For Production Use

Note: the default web pages directory (/usr/local/apache2/htdocs) is not a good location as you risk filling up the /usr filesystem. this is what I recommend as a minimum of changes to the default Apache configuration:

Below we assume you will use default /usr/local/apache2/htdocs for some quick testing and will set up the alternative filesystem later on but don't forget.

Old News

Runtime definitions missing for 2.2.8 on AIX 5.3 Apache Users

On Thu, Feb 14, 2008 at 10:30 AM, O'DELL, TODD E (ATTOPS)
<to2958[at]att.com> wrote:
> I'm able to build the 2.2.8 Apache on a AIX 5.3 server. It will compile
> and install but when I go to start it I get this:
>
> exec(): 0509-036 Cannot load program httpd because of the following
> errors:
> rtld: 0712-001 Symbol XML_ParserFree was referenced
> from module /web/apache/production/lib/libaprutil-1.so(), but a
> runtime definition
> of the symbol was not found.

ISTR a problem with libtool on AIX where the relinkde/installed
version of apr-util has a hard-coded reference to expat that cannot be
overridden by LIBPATH. This should only affect running the Apache code
on a different system, as the hard-coded path ought to at least be
correct.

You might want to try temporarily using the apr-util libs from
srclib/apr-util/.libs/ instead of the ones re-linked by libtool, and
see if it helps at all.

You might also want to try picking up a newer libtool and re-building.
 

Bug 40765 – library libgcc_s_pthread not found

------- Comment #1 From Neal Daskal 2006-10-16 10:41:36 PST -------
libgcc rpm was missing - why didn't ./configure pick this up?
------- Comment #2 From Joe Orton 2006-10-17 01:08:30 PST -------
configure never attempts to link a shared library.  This is a system
configuration issue.

Error when compile httpd 2.2.8 on AIX 5.2 - The UNIX Forums

Originally Posted by aldowsary 
collect2: library libgcc_s_pthread not found

seems to be the root of all evil. Maybe a wrongly set LIBPATH or missing library at all? There is a library libpthread.so in AIX 5.3, but you seem to need an equivalent library for the gcc compiler.

TekWire.Net - Building Apache & PHP on AIX 5.2

21 December 2006

Compiling Apache2 and PHP 5.1 on AIX

July 9th, 2006  | FASherman

This build was accomplished on AIX 5.3 ML 03 with no IBM compilers installed. I highly recommend building and installing Apache 2 and PHP 5.1 together. Performing these separately can have unpredicted results.

Prerequisites

  1. Make sure you have the necessary free space in the following filesystems:
    • /usr
    • /opt
    • /home
    • /tmp
  2. Download the following:
  3. Install libm.a from the AIX CDROM
  4. Install the compiler and library

    rpm -Uvh gcc-4*.rpm
    rpm -Uvh libgcc-4*rpm
Compiling Apache2+ using GCC
  1. Uncompress the Apache Web Server source into your home directory

    # gunzip httpd-2*tar.gz
    # tar xvf httpd-2*.tar
    # cd httpd*
  2. Build the configuration file enabling shared object

    # ./configure -C --enable-so --prefix /usr/local/apache2
  3. Compile the server

    # make
     
  4. Install the server (/usr/local/apache2)
# make install
 
Compiling PHP using GCC
  1. Uncompress the PHP source code file and untar the file

    # gunzip php*tar.gz
    # tar xvf php*.tar
    # cd php-5.1.4
  2. Build the configuration file enabling shared objects

    # export PATH=/opt/freeware/bin:$PATH
    # ./configure --prefix=/usr/local --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/apache2/conf --with-gd --with-pear --with-gettext --with-mime-magic --with-zlib-dir=/opt/freeware/lib --enable-shared --disable-static --with-png --with-zlib --with-bz2 --with-xml --with-jpeg-dir=/opt/freeware/lib --with-png-dir=/opt/freeware/lib --with-xpm-dir=/opt/freeware/lib --with-freetype-dir=/opt/freeware/lib
  3. Compile PHP with the following command:

    # make

    NOTE: There will be compiler warnings about pointers type mismatches. The can be disregarded.
  4. Install PHP with the following two commands
# cp .libs/libphp5.so /usr/local/apache2/modules
# cp php.ini-recommended /usr/local/apache2/conf/php.ini

 
Configuring Apache2 with PHP
  1. Stop Apache2

    # /usr/local/apache2/bin/apachectl -k stop
  2. Edit /usr/local/apache2/conf/httpd.conf, adding the following at the end

    LoadModule php5_module modules/libphp5.so
    AddType application/x-httpd-php .php
    DirectoryIndex index.php

     
  3. Edit the /usr/local/apache2/conf/php.ini file

    Change the php variable:
    ;date.timezone =
    to reflect your timezone
  4. Restart Apache2

    # /usr/local/apache2/bin/apachectl -k start
  5. Now test PHP with Apache2
    • Create a test web page

      # vi /usr/local/apache2/htdocs/phpinfo.php


      <h1> PHP testing </h1>
      <?PHP phpinfo() ?>
    • Open the page in your browser: http://your_server/phpinfo.php
    • Verify the php data
    • Delete phpinfo.php

      # rm /usr/local/apache2/htdocs/phpinfo.php

hints on Apache 2 and PHP on AIX

IBM Wikis - AIX 5L Wiki - aixopen

This Wiki page contains the following sections: 

Recommended Links


In case of broken links please try to use Google search. If you find the page please notify us about new location
Google     



Copyright © 1996-2009 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Site uses AdSense so you need to be aware of Google privacy policy. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

Disclaimer:

Last modified: August 15, 2009