Tough excercise I would say, definately on the beginning nevertheless I was able to make it. Let me share with you how to compile php 5 with mysql support on 64bit platform running AIX 5.3.
- Download sources from PHP.net site
- extract it to temporary location
gzip -d php-5.2.9.tar.gz
tar -xvf php-5.2.9.tar
./configure --prefix=/usr/local --enable-module=so --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/apache2/conf --with-png-dir=/opt/freeware/include/libpng/png.h --with-zlib-dir=/opt/freeware/lib --enable-shared --disable-static --with-zlib --with-bz2 --with-libxml-dir=/opt/freeware/include/libxml2 --with-jpeg-dir=/opt/freeware/lib --with-png-dir=/opt/freeware/lib --with-xpm-dir=/opt/freeware/lib --with-freetype-dir=/opt/freeware/lib --with-mysql=/usr/local/mysql
- edit pcre_internal.h accordingly to the below output
*** 562,570 **** /* Miscellaneous definitions. The #ifndef is to pacify compiler warnings in environments where these macros are defined elsewhere. */ ! #ifndef FALSE typedef int BOOL; #define FALSE 0 #define TRUE 1 #endif --- 562,572 ---- /* Miscellaneous definitions. The #ifndef is to pacify compiler warnings in environments where these macros are defined elsewhere. */ ! #ifndef BOOL typedef int BOOL; + #endif + #ifndef FALSE #define FALSE 0 #define TRUE 1 #endif
- Execute make
- Navigate to libraries
- Convert library from static to dinamic
ar -x libphp5.a
- Copy dynamic library to apache modules location
cp libphp5.so /usr/local/apache2/modules/
- Apply necessary changes to httpd.conf file so, php module will be loaded on startup
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
DirectoryIndex index.html, index.php
- Restart apache stack
I have realized you may find some posts speaking about how to compile/install certain linux things on AIX but I have forgot to mention about pre-requisites. So, here is the corrective post.
Whenever you want to compile/install any of the linux applications there are several binaries and libraries required to allow you complete that task. Which in my understanding is at the end having application up and running.
How should you proceed than? Well, except exploring what are the requirements of the application you want to install you should get incorporate below mentioned binaries installed into your AIX os:
- RPM - will allow you to install rest of the packages - Download
- GCC-C++ - GNU c++ compiler along with - Download
- GCC- GNUc compiler followed by - Download
- libgcc - Download
See below how to do it
- Download rpm.rte
- install rpm package to be able to install rpm packages
installp -qaXgd rpm.rte rpm.rte
- install all above mentioned compile packages with additional libraries (you may install oll of them at once - just separate ftp links by space
rpm -ihv <RPM_LOCATION> <RPM_LOCATION>
You are done with basic preparation. Now you should explore which other packages/libraries/binries application you want to install is dependent on.
For complete list of Linux Tools please visit IBM Toolbox page where you will get instructions, licenses and packages.