Blogs Classifieds Downloads FlashChat Gallery Googlemap Invite Friends Links Projects Reviews Wiki
 


Welcome to the pSeries Tech Forums, our free peer-based support site for administrators, engineers and architects working with IBM pSeries servers and software.

You are currently viewing our site as a guest which gives you limited access to view most discussions, articles, tutorials and access our other free features. By joining our community you will be able to collaborate with administrators, engineers and architects charged with designing, delivering or maintaining IBM pSeries server environments.

Founded by a recognized IBM pSeries consultant and IBM Redbook author, pSeries Tech Forums was developed with the single mission of bringing IBM pSeries professionals together into a single self-help community.

Registration is fast, simple and absolutely free to all IT professionals with responsibility for or interest in IBM pSeries servers. We invite you to join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Our Sponsors
Want to advertise?  


Comment
 
LinkBack (3) Tutorial Tools
<!-- google_ad_section_start -->Compiling Apache2 and PHP 5.1 on AIX<!-- google_ad_section_end -->
Compiling Apache2 and PHP 5.1 on AIX
Fred Sherman, pSeries Engineer
Published by FASherman
July 9th, 2006
<!-- google_ad_section_start -->Compiling Apache2 and PHP 5.1 on AIX<!-- google_ad_section_end -->

Introduction

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
Tutorial Tools

Featured Tutorials
Read more
Virtualization and Power

Starting with Virtualization
  #1  
By rzs0502 on July 19th, 2006
Smile Re: Compiling Apache2 and PHP 5.1 on AIX

Excellent post!
Thanks you for sharing this information.
It has save me a lot of time and frustration.
(except now I'm struggling with getting the php mysql extensions to work) :-)
Reply With Quote
  #2  
By lamoreau on July 22nd, 2006
Re: Compiling Apache2 and PHP 5.1 on AIX

Great Step by Step Post.

Very helpful and saved me a lot of time getting Apache up and running!

wlamore
Reply With Quote
Comment

Bookmarks

These are the 100 most searched terms
Search Cloud
0042-001 0042-001 nim 0513-001 the system resource controller daemon is not active 0513-001 the system resource controller daemon is not active. 0514-061 0514-061 cannot find a child device 0514-061 cannot find a child device. 0516-787 0516-787 extendlv 0516-787 extendlv: maximum allocation for logical volume 110000ac aa00e1f3 aio aix aix aio aix freeware aixif_arp_dup_addr b150f22a b181f22a b181fb53 ba010004 c1001020 d133c002 dacnone dcb47997 fcp_array_err6 fget_config gnu tar aix gsclvmd gtar aix hi yall hmc root password hmc vmware hscl05db ibm p6 ibm p6 520 libpopt aix libpopt.a libpopt.a(libpopt.so.0) is needed by rsync-2.6.2-1 migratelv mksysb navisphere agent nim server pseries pseriestech rsync aix sc_disk_err4 scan_error_chrp vio server websm xhost file ... powered by Simple Search Cloud


LinkBacks (?)
LinkBack to this Thread: http://www.pseriestech.org/forum/tutorials/compiling-apache2-php-5-1-aix-105.html
Posted By For Type Date
Compiling Apache 2.2.8 on AIX This thread Refback September 25th, 2008 10:59
Compiling PHP on AIX This thread Refback August 20th, 2008 02:38
Open Source packages for AIX This thread Refback June 24th, 2008 03:23

Currently Active Users Viewing This Tutorial: 1 (0 members and 1 guests)
 
Tutorial Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Powered by vbWiki Pro 1.3 RC5. Copyright ©2006-2007, NuHit, LLC

vBulletin Skin developed by: vBStyles.com

Tutorial powered by GARS 2.1.8m ©2005-2006


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50