<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wazi &#187; Brad Reeves</title>
	<atom:link href="http://olex.openlogic.com/wazi/author/bradreeves/feed/" rel="self" type="application/rss+xml" />
	<link>http://olex.openlogic.com/wazi</link>
	<description>Thinking OPEN</description>
	<lastBuildDate>Fri, 06 Nov 2009 19:33:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Build Apache 2.2.X on AIX 5.3 Platforms Part II: Common Issues</title>
		<link>http://olex.openlogic.com/wazi/2008/how-to-build-apache-22x-on-aix-53-platforms-part-ii-some-common-errors-and-pitfalls/</link>
		<comments>http://olex.openlogic.com/wazi/2008/how-to-build-apache-22x-on-aix-53-platforms-part-ii-some-common-errors-and-pitfalls/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 15:48:14 +0000</pubDate>
		<dc:creator>Brad Reeves</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[openssl]]></category>

		<guid isPermaLink="false">http://olex.openlogic.com/wazi/?p=1300</guid>
		<description><![CDATA[Building the Apache Web server on AIX is generally a straightforward enterprise in which you:
obtain the code, run a few simple commands (configure, make, and make install)...kidding...read on...]]></description>
			<content:encoded><![CDATA[<h2>Purpose</h2>
<p>Building the Apache Web server on AIX is generally a straightforward enterprise in which you:<br />
obtain the code, run a few simple commands (configure, make, and make install) and then stop by your boss&#8217;s cube to ask if she&#8217;s got anything she&#8217;d like you to take off her plate.</p>
<p>You don&#8217;t know us very well yet, so we&#8217;ll be frank: we say &#8220;straightforward&#8221; with tongue firmly planted in cheek. A quick Google search on the topic will return a plethora of issues users encounter while building the code if they try anything beyond straight vanilla. In other words, if you need an install with any additional modules or capabilities, expect some issues.</p>
<p>We&#8217;ve already covered the vanilla installation, in the first installment of the Building Apache on AIX. This second part of the tutorial takes you beyond those basics. Before attempting any of these work arounds, we recommend that you have met all the requirements for a &#8220;basic&#8221; build.</p>
<h2>Before You Start</h2>
<p>Follow the setup from the first installment of this guide. Building Apache 2.2.X on AIX 5.3 platforms.</p>
<h2>Meat &amp; Potatoes</h2>
<h3>Common Problems</h3>
<p><strong>Neglecting to  clean between failed builds (or builds with numerous, particular errors)</strong><br />
During compilation phase of the build, if any errors are encountered, the subsequent build<br />
must be preceded by a make clean. As Joe Biden would say &#8220;Let me repeat that&#8221;, make clean.<br />
It is important that your build runs from start to finish without errors and that there is<br />
not any artifacts from previous build attempts giving you false positive or false negative results.</p>
<p><strong>Environment Issues</strong><br />
The most frequent issues with a build are ones that are encountered because the build environment<br />
is not set up correctly. Incorrect gcc version, gcc library version, and not adding the<br />
math library (libm.a) are the most common. Setup of these environment elements are covered in<br />
the <a href="http://olex.openlogic.com/wazi/2008/how-to-build-apache-22x-on-aix-53-platforms/">first installment of this guide</a>.</p>
<h3>Configuration options</h3>
<p>The latest versions of Apache Web server have over 160 configuration options and flags, making for millions potential combinations. These options control exactly how the Web server is going to build and, more importantly, how it is going to run. On AIX, there are several options that we have found are either required, or particularly beneficial to complete the build.</p>
<p style="padding-left: 30px;"><code>--prefix=PATH</code><br />
Setting this option is required. PATH is the exact path where the Web server will be installed and run from post compilation.</p>
<p style="padding-left: 30px;"><code>--with-included-apr</code><br />
<code>apr</code> and <code>apr-util </code>are bundled with the Apache Web server source releases, and will be used without any problems in almost all circumstances. However, if <code>apr </code>or <code>apr-util</code> versions 1.0 or 1.1, are installed on your system (as is the case if you are using AIX 5.3), you must either upgrade your <code>apr/apr-util</code> installations to 1.2 and force the use of the bundled libraries, or have <code>httpd</code> use separate builds.</p>
<p style="padding-left: 30px;">To use the bundled <code>apr/apr-util</code> sources, specify the <code>--with-included-apr</code> option added in version 2.2.3 of Apache Web server.</p>
<p style="padding-left: 30px;"><code>--enable-ssl=shared</code><br />
If you choose to add ssl capabilities to your Web server, you must enable this option. This also means that you must have <a href="https://olex.openlogic.com/packages/openssl">OpenSSL</a> installed on your system. On AIX systems a typical install will litter OpenSSL elements across your file system, and this will cause issues as you compile. For instance, we have found complete or portions of OpenSSL installed in the following directories : <code>/usr</code> , <code>/usr/bin</code>, <code>/opt/freeware/bin</code>, <code>/usr/include</code>, <code>/usr/linux</code>. Most often, the correct OpenSSL to use is the libraries found in <code>/usr</code>.  To specify using this one, you must set the following options:</p>
<p style="padding-left: 60px;"><code>--with-ssl=/usr</code> This tells the configuration step to bind to libraries found in and under <code>/usr</code>.</p>
<p style="padding-left: 60px;"><code>--enable-mods-shared=ssl </code>This tells the system to create the <code>ssl</code> module as a shared object.</p>
<p>Other important configuration options include:</p>
<p style="padding-left: 30px;"><code>--enable-so</code>: This configures apache for later installation of shared objects (modules).  Apache httpd can be built either with static, built-in modules, or be built so that modules can be stored outside of the httpd binary file, and may be compiled and added at a later time. Having the ability to add modules after the main build is accomplished using the Apache Extention Tool (apxs).  This dynamic build is enabled by the &#8211;enable-so option. The modules that are built as extentions to the main binary are called Dynamic Shared Objects (DSO).</p>
<p>Finally, here are a few optional modules you may include during your configuration:</p>
<p style="padding-left: 30px;"><strong>Proxy Modules</strong><br />
<code>--enable-proxy</code><br />
<code>--enable-proxy-ajp</code><br />
<code>--enable-proxy-balancer</code></p>
<p style="padding-left: 30px;"><strong>Configuring Proxy</strong></p>
<ul>
<li>Forward Proxy</li>
</ul>
<p><code>ProxyRequests On<br />
ProxyVia On</p>
<p>&lt;Proxy *&gt;<br />
<span class="indent"> Order deny,allow<br />
Deny from all<br />
Allow from internal.example.com<br />
</span> &lt;/Proxy&gt; </code></p>
<ul>
<li>Reverse Proxy</li>
</ul>
<p><code> ProxyRequests Off</p>
<p>&lt;Proxy *&gt;<br />
<span class="indent"> Order deny,allow<br />
Allow from all<br />
</span> &lt;/Proxy&gt;</p>
<p>ProxyPass /path http://domainname.com/thing<br />
ProxyPassReverse /path http://domainname.com/thing</code></p>
<ul>
<li>Proxy Access</li>
</ul>
<p><code> &lt;Proxy *&gt;<br />
<span class="indent"> Order Deny,Allow<br />
Deny from all<br />
Allow from 192.168.0<br />
</span> &lt;/Proxy&gt; </code></p>
<p style="padding-left: 30px;"><strong>Helper Modules</strong><br />
<code>--enable-module=rewrite</code><br />
<code>--enable-module=log_referer</code></p>
<h3>Common Error Messages</h3>
<p><strong>Openssl compilation error. </strong><br />
Sample error: <code>/usr/include/openssl/pq_compat.h:1:3: error: invalid preprocessing directive #IBM_PROLOG_BEGIN_TAG</code></p>
<p>On AIX, it is not uncommon to encounter errors during compilation if ssl is enabled. This is because<br />
IBM&#8217;s OpenSSL package contains a number of include files in <code>/usr/include/openssl</code> where a special &#8220;IBM Prolog&#8221; include line has been added, making the header files incompatible with gcc.<br />
The fix is to edit <code>pq_compat.h</code>, and comment out any lines with <code>IBM_PROLOG_BEGIN_TAG</code>, as well as any associated lines with the Prolog include tag.</p>
<p><strong>Linker errors</strong><br />
Sample error: <code>0711-317 ERROR: Undefined symbol: .BIO_clear_flags</code></p>
<p>On AIX, once you have satisfied the gcc requirements to build Apache two linkers will exist<br />
on your system. Linker errors, like the one seen above, are a result of the pathing to libraries being<br />
different for the compiler and the linker, and can be resolved by setting environment flags.</p>
<p>Now, on all UNIX systems there is a library path that is to be used during link phase, and runtime,<br />
and on all UNIX systems this path is set via the <code>LD_LIBRARY_PATH</code> variable. All Unix systems, that is, except AIX. For this reason, we usually set the path using both the standard and the AIX variable as a safety precaution. The native AIX linker should use <code>LIBPATH</code>, while <code>LD_LIBRARY_PATH</code> will be used by the Gnu linker.</p>
<p>Example library path setup looks like this:</p>
<pre>set LIBPATH=/usr/lib:/lib
set LD_LIBRARY_PATH=/usr/lib:/lib
export LIBPATH LD_LIBRARY_PATH</pre>
<h2>Finishing Up</h2>
<p>Augmenting the basic build with additional modules will add complexity to the build process, but by following this tutorial and properly setting up your environment, most errors can be avoided. Of course, each system can have other libraries and packages installed that can cause additional error messages, or warnings. While we have built Apache on AIX many times, on many different systems, this guide does not claim to, and can&#8217;t possibly, anticipate every situation. Should you encounter other errors, please email them to us, and we&#8217;ll include them in a future revision.</p>
<p>We wish you good luck, and happy compiling.</p>
]]></content:encoded>
			<wfw:commentRss>http://olex.openlogic.com/wazi/2008/how-to-build-apache-22x-on-aix-53-platforms-part-ii-some-common-errors-and-pitfalls/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Build Apache 2.2.X on AIX 5.3 Platforms Part I: Basics</title>
		<link>http://olex.openlogic.com/wazi/2008/how-to-build-apache-22x-on-aix-53-platforms/</link>
		<comments>http://olex.openlogic.com/wazi/2008/how-to-build-apache-22x-on-aix-53-platforms/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 00:00:36 +0000</pubDate>
		<dc:creator>Brad Reeves</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://olex.openlogic.com/wazi/?p=171</guid>
		<description><![CDATA[While there are many binary versions of Apache available for the AIX platform, many people wish to build it themselves, adding modules or custom locations to the Apache web server. Our cookbook will guide you through the system setup and build process for the Apache web server.]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>This is not an AIX administration guide, and any administration tasks suggested by this guide will need to be performed as a &#8220;root&#8221; user. If you&#8217;re unsure of whether or not you <em>are</em> a &#8220;root&#8221; user, then you should stop now, and find someone who knows for sure.</p>
<p>This tutorial will also assume that we&#8217;re building Apache with GCC (GNU Compiler Collection). The steps outlined here may work with other compilers, but have only been tested with GCC.</p>
<h2>Before You Start</h2>
<p>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.</p>
<ol>
<li>Where will you install Apache? In order to compile Apache you&#8217;ll need ~250MB of free disk space in the following areas:
<ul>
<li><strong>Build Directory</strong> &#8211; this is where you&#8217;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<code> /build </code>in the root directory, or in a place where you have free space.</li>
<li><strong>Prefix Directory</strong> &#8211; this is where you want Apache to be installed when you&#8217;re done. By default, Apache installs in the <code>/usr</code> partition.</li>
<li><strong>Tmp Directory </strong>- It&#8217;s always a good idea to have some free space in <code>/tmp</code> during builds.</li>
</ul>
</li>
<li>You&#8217;ll need the following tools :
<ul>
<li><strong>Apache Source Code:</strong> Version 2.2.8 can be obtained <a title="Link to Apache #" href="https://olex.openlogic.com/packages/apache#1543">here</a>. Click on the download link.</li>
<li><strong>GCC 4.0</strong>: GNU C compiler version 4 for AIX 5.3. You&#8217;ll find it <a title="Link to " href="http://www.ibm.com/servers/aix/products/aixos/linux/download.html">here</a>.</li>
<li><strong>libgcc 4.0</strong>: the library for GCC for AIX 5.3. Go <a href="http://www.ibm.com/servers/aix/products/aixos/linux/download.html">here</a> to get it.</li>
</ul>
</li>
<li>You&#8217;ll also need to install libm.a from the AIX 5.3 installation disk 1.  We recommend using &#8220;smitty installp&#8221; to accomplish this install.</li>
<li>Uncompress the Apache source code into a temporary location. We usually create a <code>/hold/Apache-2.2.8</code> directory, but any directory where you have space is fine.</li>
<li>Change directory to <code>/hold/Apache-2.2.8</code> ( <code>cd /hold/Apache-2.2.8</code> )</li>
<li>Run the configure command with the prefix option.   ( <code>./configure --prefix=/usr/local/apache</code> ). This command evaluates your system for its readiness to build Apache. You&#8217;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.</li>
</ol>
<p><strong>Note: Installing the RPMs (Red Hat Package Managers) for GCC should be done as the root user.</strong></p>
<h2>Meat &amp; Potatoes</h2>
<h3>Building Apache</h3>
<p>First you&#8217;ll want to uncompress the Apache source code into a temporary location. We usually create a <code>/hold/Apache-2.2.8</code> directory, but any directory where you have space is fine.</p>
<p>This tutorial will assume that directory is <code>/hold/Apache-2.2.8</code> and will assume that the answer to question 1 in the Prerequisites section above is <code>/usr/local/apache</code>.</p>
<ol>
<li>Make the Apache project. ( <code>make</code> ) 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.</li>
<li>Deploy the Apache Project.  (<code> make install</code> )  Once more, this should be accomplished as the &#8216;root&#8217; user.</li>
<li>Test the project. Change directory to<code> /usr/local/apache/bin</code>.  Run the Apache start-up script. (<code>./apachectl start </code>) You may be warned that Apache can&#8217;t determine the server&#8217;s name, but no worries &#8211; that&#8217;s to be expected, as we have not configured Apache. The server will still start up.</li>
<li>In a web browser go to URL http://localhost.</li>
</ol>
<h2>Finishing Up</h2>
<p>You should see the page load, and it will report &#8220;It Works!&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://olex.openlogic.com/wazi/2008/how-to-build-apache-22x-on-aix-53-platforms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>System Slows Using Red Hat-Bundled Perl</title>
		<link>http://olex.openlogic.com/wazi/2008/system-slows-when-using-red-hat-supplied-perl/</link>
		<comments>http://olex.openlogic.com/wazi/2008/system-slows-when-using-red-hat-supplied-perl/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 19:45:53 +0000</pubDate>
		<dc:creator>Brad Reeves</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://annasorchids.wordpress.com/?p=15</guid>
		<description><![CDATA[Experiencing performance problems with Red Hat and Perl? The Perl that's bundled with Red Hat, along with code that uses the bless/overload combination, can result in a severe system slow down. This is a known issue with Red Hat supplied Perl.]]></description>
			<content:encoded><![CDATA[<h3>Issue:</h3>
<p>Experiencing performance problems with Red Hat and Perl? The Perl that&#8217;s bundled with Red Hat, along with code that uses the bless/overload combination, can result in a severe system slow down. This is a known issue with Red Hat supplied Perl (<a title="Perl Bug Tracker" href="https://bugzilla.redhat.com/show_bug.cgi?id=379791" target="_blank">Bug 379791</a>).</p>
<h3>Trick:</h3>
<p>Here&#8217;s a test, some instructions on interpreting the results of the test, and suggestions on a solution to your system slow down.</p>
<p>First exercise Perl to determine if this known issue is, in fact, the problem you&#8217;re experiencing. To do so, run this test script:</p>

<div class="wp_syntax"><div class="code"><pre class="perl perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span>
<span style="color: #000000; font-weight: bold;">use</span> overload <span style="color: #000066;">q</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span>lt;<span style="color: #009900;">&#41;</span> <span style="color: #339933;">=&amp;</span>gt; <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span>;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">%h</span>;
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$i</span><span style="color: #339933;">=</span>0; <span style="color: #0000ff;">$i</span><span style="color: #339933;">&amp;</span>lt;<span style="color: #cc66cc;">50000</span>; <span style="color: #0000ff;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #0000ff;">$h</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #000066;">bless</span> <span style="color: #009900;">&#91;</span> <span style="color: #009900;">&#93;</span> <span style="color: #339933;">=&amp;</span>gt; <span style="">'main'</span>;
<span style="color: #000066;">print</span> <span style="color: #000000; font-weight: bold;">STDERR</span> <span style="">'.'</span> <span style="color: #b1b100;">if</span> <span style="color: #0000ff;">$i</span> <span style="color: #339933;">%</span> <span style="color: #cc66cc;">1000</span> <span style="color: #339933;">==</span> 0;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The test script will print 50 dots on screen while using the bless operator. On a healthy system, the test should take less than 1 second to complete. With broken Red Hat Perl, the test takes much longer.</p>
<p>As of 8/21/08, there is a hotfix available from Red Hat for RHEL5u3 and RHEL5u2, RHEL4.5. However, users are still reporting performance issues with perl::DBI when bless/overload is utilized. For this reason, OpenLogic recommends that you obtain the <a title="Perl in OLEX" href="https://olex.openlogic.com/packages/perl" target="_blank">latest Perl code</a> from the Certified Library, and compile Perl yourself. The compilation of Perl is fairly straightforward, and should only take a few minutes on a server level platform. When implemented, OpenLogic Support has observed this solution result in 10X to 1000X improvement.</p>
<p>If you run into any problems, or have any questions about how to compile or distribute Perl, please contact OpenLogic support for instructions and help.</p>
<p>Relevant to: Red Hat RHEL4, RHEL5, Fedora 9, Red Hat supplied Perl version 5.8.8-10</p>
]]></content:encoded>
			<wfw:commentRss>http://olex.openlogic.com/wazi/2008/system-slows-when-using-red-hat-supplied-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
