The Open Admin Tool (OAT) is an open source web-basedadministration tool for Informix Dynamic Server (IDS). It is a web consolewhere users can manage dbspaces, schedule tasks and monitorMACH 11 clusters etc. through their web browsers.
OAT is a web console that is hosted on a single web server.Other machines that have access to the web server’s network can simply open upa web browser, type in the web server machine’s URL, and they can use OAT tomanage their database servers.
In order to host the Open Admin Tool website, the followingprerequisites have to be setup:
- Informix Client SDK or Informix Connect
- A web server, such as Apache 2.0.
- PHP 5.2.4 dynamically loaded as an Apache 2.0 module. It also has to have the following extensions enabled
- Gd (requires libpng and libjpeg libraries)
- Openssl (requires libssl and libcrypto libraries)
- Libxml (requires libxml2 libraries)
The Open Admin Tool can be hosted on any platforms that haveall of the above setup.
This article will provide the steps on how to setup OAT on aMac OS X Platform.
First step is to install Informix Client SDK for Mac OS.
The Mac OS will already have an Apache web server installed.We can use the Apache web server that comes with Mac OS. We do not need toinstall other web servers.
The Mac OS will also have an installed PHP,however the PHP that comes with Mac OS does not have all the extensions thatOAT requires. We cannot use the PHP that comes with Mac OS. We have to compilePHP binaries from source.
Our goal here is to build our own PHP binaries anddynamically load it to the Apache web server that comes with Mac OS.
Before starting to compile PHP, make sure that you havelibpng, libjpeg, openssl and libxml2 installed into /usr/local/ or /
Obtain the latest PHP source code from php.net (http://www.php.net/downloads.php).Decompress the source code package and issue the following commands.
The “configure” command will generate a makefile specific toyour machine’s build environment. The “make” command will use the generatedmakefile to create PHP binaries.
The “configure” and “make” command will not always runsmoothly. It is dependent on your machine’s setup. Please see the followingsection about debugging the “configure” command for more information.
If the “configure” and “make” command ran smoothly, you canrun the “make install” command. This command will copy the php binaries to/path/to/where/you/want/to/install/php. It will also overwrite the PHP apachehandler (the glue between Apache and PHP, called libphp5.so) at /usr/libexec/apache2/.You may want to backup the Mac OS’s default libphp5.so before running “makeinstall”
After the “make install” command, the php binaries can befound under /path/to/where/you/want/to/install/php/.
Right now we have compiled the PHP binaries that have allthe extension modules that OAT requires, EXCEPT the pdo_informix extension.This extension DOES NOT come with PHP source code from php.net. We have tocompile it from source code separately from PHP, and enable it as a dynamic PHPextension module. We will go through the process of compiling pdo_informix inthe later section “Compiling pdo_informix extension and enabling it in PHP”.
Right now we also have compiled the PHP apache handler (theglue between PHP and apache). This will appear as a file called “libphp5.so”,under /usr/libexec/apache2/. This file will be loaded as a dynamic Apachemodule. This will be described in the later section “Enabling PHP in Apache”
The next thing you have to do is to create a phpconfiguration file. Copy the sample php.ini file from/path/to/php/source/code/php.ini-dist to /path/to/where/you/installed/php/lib
Then edit the php.ini file. Make the following changes tothe php.ini file.
memory_limit = 128M
OAT requires a greater memory limit. Thus we increased thememory limit here.
The extension_dir is the directory where dynamic PHPextension modules will reside. Dynamic PHP extensions have to be placed underextension_dir, and enabled in the php.ini configuration file. The pdo_informixextension module will be handled in this fashion.
The --prefix tag lets you specify where you want to installthe php binaries. You have to make sure that you have the write permissions tothat directory before configuring PHP.
The --with-apxs2 tag lets you specify where to find yourapache binaries, so that the apache handler (i.e. the glue between Apache andPHP) can be built. This apache handler will appear as a file called“libphp5.so” after the compilation. It will appear under /usr/libexec/apache2/.This document will talk about how to dynamically load this handler to theApache web server in the later section “Enable PHP in Apache”. Here we areusing the Mac OS default Apache web server, thus this flag should be set topoint to /usr/sbin/apxs.
The --enable and --with flags specify what extensions youwant to enable. Pdo_informix will be enabled separately after we compile thePHP binaries.
The “configure” and “make” command will not always runsmoothly. One possible reason is that the prerequisite libraries are notpresent. For example, the php gd extension will not compile if libpng andlibjpeg libraries are not found on your machine. The openssl extension will notcompile if libssl and libcrypto libraries are not found. The libxml extensionwill not compile if libxml2 libraries are not found. Make sure that you have
Another possible reason is that the library architecture andthe compilation flag do not match. If your libpng,
If you encounter problems, you can look into the
You may also add the --disable-all tag to the configurecommand. This will disable all other extensions that we did not specify in theconfigure command. Compiling fewer extensions will give us fewer errors. SinceOAT doesn’t require those extra extensions, it is okay to add the --disable-allflag.
Download the latest pdo_informixsource code from http://pecl.php.net/package/PDO_INFORMIX
Before you compile pdo_informix.Make sure that CFLAGS are set accordingly. If your Client SDK/
Decompress the pdo_informix sourcecode and run the following commands
This compiles the pdo_informixextension module. It will appear as a file “pdo_informix.so”under /path/to/pdo_informix/source/code/modules/
Copy pdo_informix.so to the PHP
Add the following line to the php.ini configuration file (Under/path/to/where/you/installed/php/lib/php.ini)
This will enable the pdo_informixextension in PHP.
After PHP has been built successfully, the PHP apachehandler (the glue between PHP and apache) will be created. This will appear asa file called “libphp5.so”, under /usr/libexec/apache2/
We have to edit the Apacheconfiguration file (httpd.conf) to load thelibphp5.so. This can be done by adding the following three lines in/etc/apache2/httpd.conf. These lines might already exist in the
You also have to setup the Apacheenvironment variables. You will have to edit the /usr/sbin/envvarsfile. Add the following lines in the envvars file.
You may now start the Apacheweb server. Issue the following command with root user access permissions.
UnpackOAT source code at /Library/WebServer/Documents/OpenAdminTool.The ownership of all files under this directory has to be changed too. Makesure these files are owned by the user and group that runsapache. (These should match the user and group settings in/etc/apache2/httpd.conf)
Visithttp://<hostname>.<domainname>//OpenAdminTool/index.php andcontinue with the OAT web install. OAT should be operational after the OAT webinstall.