<?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/"
	>

<channel>
	<title>Randomness from RES</title>
	<atom:link href="http://www.robertswarthout.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.robertswarthout.com</link>
	<description>Things that I run across that might be useful to others...</description>
	<pubDate>Wed, 20 Aug 2008 19:06:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7-bleeding</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Benchmarking of MySQL Persistent Connections vs Non-Persistent Connections</title>
		<link>http://www.robertswarthout.com/2008/08/benchmarking-of-mysql-persistent-connections-vs-non-persistent-connections/</link>
		<comments>http://www.robertswarthout.com/2008/08/benchmarking-of-mysql-persistent-connections-vs-non-persistent-connections/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 14:37:37 +0000</pubDate>
		<dc:creator>Robert Swarthout</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<category><![CDATA[Benchmarking]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.robertswarthout.com/?p=28</guid>
		<description><![CDATA[This post will be about the what always seems to be a hot topic among PHPers about what connection type to use when connection to a MySQL database.
I used MySQL 5.0.45, PHP 5.2.4 for this benchmarking. You can download the same sample MySQL database that is used for this set of benchmarking by visiting http://dev.mysql.com/doc/#sampledb. [...]]]></description>
			<content:encoded><![CDATA[<p>This post will be about the what always seems to be a hot topic among PHPers about what connection type to use when connection to a MySQL database.</p>
<p>I used MySQL 5.0.45, PHP 5.2.4 for this benchmarking. You can download the same sample MySQL database that is used for this set of benchmarking by visiting <a href="http://dev.mysql.com/doc/#sampledb">http://dev.mysql.com/doc/#sampledb</a>. In the list of example databases, choose the one named &#8217;sakila&#8217;.</p>
<p>For each connection type I will run three tests to see compensate for variations in tests. I will be using <a href="http://www.acme.com/software/http_load/">http_load</a> to do the benchmarking of the connection file. To view each of the connection files, download the file bundle at the end of this post.</p>
<p>Below is the benchmark command with the options used for each run.</p>
<blockquote><p>./http_load -verbose -parallel 20 -seconds 600 urls.txt</p></blockquote>
<p>The urls.txt file contains the following:</p>
<blockquote><p>http://127.0.0.1/mysql_connection_bench_{CONNECT_TYPE}.php</p></blockquote>
<p>Between each benchmark run I will restart both Apache and MySQL.</p>
<p><strong>Results for the standard MySQL functions in PHP using mysql_connect.</strong></p>
<p>Run #1:</p>
<blockquote><p>11024 fetches, 20 max parallel, 44096 bytes, in 600.007 seconds<br />
4 mean bytes/connection<br />
18.3731 fetches/sec, 73.4925 bytes/sec<br />
msecs/connect: 0.22087 mean, 48.992 max, 0.03 min<br />
msecs/first-response: 1087.74 mean, 2880.95 max, 355.012 min<br />
HTTP response codes: code 200 &#8212; 11024</p></blockquote>
<p>Run #2:</p>
<blockquote><p>10895 fetches, 20 max parallel, 43580 bytes, in 600.004 seconds<br />
4 mean bytes/connection<br />
18.1582 fetches/sec, 72.6328 bytes/sec<br />
msecs/connect: 0.219867 mean, 48.58 max, 0.031 min<br />
msecs/first-response: 1100.1 mean, 2623.47 max, 369.341 min<br />
HTTP response codes: code 200 &#8212; 10895</p></blockquote>
<p>Run #3:</p>
<blockquote><p>11134 fetches, 20 max parallel, 44536 bytes, in 600.003 seconds<br />
4 mean bytes/connection<br />
18.5566 fetches/sec, 74.2264 bytes/sec<br />
msecs/connect: 0.217796 mean, 42.036 max, 0.03 min<br />
msecs/first-response: 1076.59 mean, 3079.73 max, 270.734 min<br />
HTTP response codes: code 200 &#8212; 11134</p></blockquote>
<p><strong>Results for the standard MySQL functions in PHP using mysql_pconnect.</strong></p>
<p>Run #1:</p>
<blockquote><p>10982 fetches, 20 max parallel, 43928 bytes, in 600.025 seconds<br />
4 mean bytes/connection<br />
18.3026 fetches/sec, 73.2103 bytes/sec<br />
msecs/connect: 0.216663 mean, 69.795 max, 0 min<br />
msecs/first-response: 1091.52 mean, 3166.82 max, 254.36 min<br />
HTTP response codes: code 200 &#8212; 10982</p></blockquote>
<p>Run #2:</p>
<blockquote><p>11002 fetches, 20 max parallel, 44008 bytes, in 600.001 seconds<br />
4 mean bytes/connection<br />
18.3366 fetches/sec, 73.3465 bytes/sec<br />
msecs/connect: 0.20555 mean, 47.176 max, 0.031 min<br />
msecs/first-response: 1089.51 mean, 2953.82 max, 414.826 min<br />
HTTP response codes: code 200 &#8212; 11002</p></blockquote>
<p>Run #3:</p>
<blockquote><p>11196 fetches, 20 max parallel, 44784 bytes, in 600 seconds<br />
4 mean bytes/connection<br />
18.66 fetches/sec, 74.6399 bytes/sec<br />
msecs/connect: 0.2013 mean, 22.478 max, 0.03 min<br />
msecs/first-response: 1070.5 mean, 2506.02 max, 448.161 min<br />
HTTP response codes: code 200 &#8212; 11196</p></blockquote>
<p><strong>Results for non-persistent connections with PDO_MYSQL.</strong></p>
<p>Run #1:</p>
<blockquote><p>10995 fetches, 20 max parallel, 43980 bytes, in 600.008 seconds<br />
4 mean bytes/connection<br />
18.3248 fetches/sec, 73.299 bytes/sec<br />
msecs/connect: 0.203731 mean, 17.309 max, 0.029 min<br />
msecs/first-response: 1090.44 mean, 2852.34 max, 358.45 min<br />
HTTP response codes: code 200 &#8212; 10995</p></blockquote>
<p>Run #2:</p>
<blockquote><p>10971 fetches, 20 max parallel, 43884 bytes, in 600.002 seconds<br />
4 mean bytes/connection<br />
18.285 fetches/sec, 73.1398 bytes/sec<br />
msecs/connect: 0.21357 mean, 32.036 max, 0 min<br />
msecs/first-response: 1092.36 mean, 3515.71 max, 456.688 min<br />
HTTP response codes: code 200 &#8212; 10971</p></blockquote>
<p>Run #3:</p>
<blockquote><p>11161 fetches, 20 max parallel, 44644 bytes, in 600.001 seconds<br />
4 mean bytes/connection<br />
18.6016 fetches/sec, 74.4065 bytes/sec<br />
msecs/connect: 0.20571 mean, 31.679 max, 0.031 min<br />
msecs/first-response: 1073.96 mean, 2539.06 max, 351.236 min<br />
HTTP response codes: code 200 &#8212; 11161</p></blockquote>
<p><strong>Results for persistent connections with PDO_MYSQL.</strong></p>
<p>Run #1:</p>
<blockquote><p>10347 fetches, 20 max parallel, 41388 bytes, in 600.006 seconds<br />
4 mean bytes/connection<br />
17.2448 fetches/sec, 68.9793 bytes/sec<br />
msecs/connect: 0.253049 mean, 96.354 max, 0 min<br />
msecs/first-response: 1158.52 mean, 2596.78 max, 282.647 min<br />
HTTP response codes: code 200 &#8212; 10347</p></blockquote>
<p>Run #2:</p>
<blockquote><p>11106 fetches, 20 max parallel, 44424 bytes, in 600.008 seconds<br />
4 mean bytes/connection<br />
18.5098 fetches/sec, 74.0391 bytes/sec<br />
msecs/connect: 0.226898 mean, 51.29 max, 0.03 min<br />
msecs/first-response: 1079.29 mean, 2393.4 max, 311.85 min<br />
HTTP response codes: code 200 &#8212; 11106</p></blockquote>
<p>Run #3:</p>
<blockquote><p>10978 fetches, 20 max parallel, 43912 bytes, in 600.029 seconds<br />
4 mean bytes/connection<br />
18.2958 fetches/sec, 73.1831 bytes/sec<br />
msecs/connect: 0.210895 mean, 30.339 max, 0 min<br />
msecs/first-response: 1091.98 mean, 3455.6 max, 373.751 min<br />
HTTP response codes: code 200 &#8212; 10978</p></blockquote>
<p><strong>Results Analysis</strong></p>
<ul>
<li>mysql_connect
<ul>
<li>Average requests per second: 18.3626</li>
<li>Average requests completed: 11,017</li>
</ul>
</li>
<li>mysql_pconnect
<ul>
<li>Average requests per second: 18.4330</li>
<li>Average requests completed: 11,060</li>
</ul>
</li>
<li>PDO_MySQL non-persistent
<ul>
<li>Average requests per second: 18.4038</li>
<li>Average requests completed: 11,042</li>
</ul>
</li>
<li>PDO_MySQL persistent
<ul>
<li>Average requests per second: 18.0168</li>
<li>Average requests completed: 10,810</li>
</ul>
</li>
</ul>
<p>Basically what the numbers above shows us is that in an isolated environment it makes no difference which connection type you are going to use. My past experience in live heavily trafficked environment says that using non-persistent connections is better than using persistent connections. Where this difference comes shows itself the most is when an apache thread will hang and still hold the persistent connection to mysql preventing other apache processes from connecting. By tweaking your apache and mysql settings you can achieve very good performance with non-persistent connections.</p>
<p><a href="/wp-content/uploads/benchmarking_source.tar.gz">Source files</a> for this benchmarking test.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertswarthout.com/2008/08/benchmarking-of-mysql-persistent-connections-vs-non-persistent-connections/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Submitted a talk proposal to php&#124;works 2008 today</title>
		<link>http://www.robertswarthout.com/2008/06/submitted-a-talk-proposal-to-phpworks-2008-today/</link>
		<comments>http://www.robertswarthout.com/2008/06/submitted-a-talk-proposal-to-phpworks-2008-today/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 20:14:28 +0000</pubDate>
		<dc:creator>Robert Swarthout</dc:creator>
		
		<category><![CDATA[Conference]]></category>

		<category><![CDATA[Sphinx Search]]></category>

		<category><![CDATA[php|works]]></category>

		<guid isPermaLink="false">http://www.robertswarthout.com/rswarthout/2008/06/submitted-a-talk-proposal-to-phpworks-2008-today/</guid>
		<description><![CDATA[So I have submitted my first conference talk proposal. PHP&#124;works 2008 is going to be held in Atlanta here again this year. My proposed talk is about implementing the open source fulltext search engine Sphinx in a website. Let&#8217;s hope that it gets accepted! :-D
]]></description>
			<content:encoded><![CDATA[<p>So I have submitted my first conference talk proposal. PHP|works 2008 is going to be held in Atlanta here again this year. My proposed talk is about implementing the open source fulltext search engine Sphinx in a website. Let&#8217;s hope that it gets accepted! :-D</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertswarthout.com/2008/06/submitted-a-talk-proposal-to-phpworks-2008-today/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP Subversion Frontend - Part 1</title>
		<link>http://www.robertswarthout.com/2008/05/php-subversion-frontend-part-1/</link>
		<comments>http://www.robertswarthout.com/2008/05/php-subversion-frontend-part-1/#comments</comments>
		<pubDate>Mon, 26 May 2008 20:21:49 +0000</pubDate>
		<dc:creator>Robert Swarthout</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://www.robertswarthout.com/rswarthout/2008/05/php-subversion-frontend-part-1/</guid>
		<description><![CDATA[I am going to begin the process of explaining how to setup a PHP frontend to a remote subversion (SVN) working copy. The post today will talk about how to correctly setup apache to work in a multi-user setup.
One of the the nice things about SVN is that it keeps track of who changes what [...]]]></description>
			<content:encoded><![CDATA[<p>I am going to begin the process of explaining how to setup a PHP frontend to a remote subversion (SVN) working copy. The post today will talk about how to correctly setup apache to work in a multi-user setup.</p>
<p>One of the the nice things about SVN is that it keeps track of who changes what line and what changes they made on that line. SVN bases the username it stores on who committed the file. The trick in getting a PHP frontend to SVN to work correctly is that the user that apache is running as needs to be the user who is performing the commit action. To do this and make it work in a multiple user environment I have setup apache to proxy through requests to a specific URL to another instance of apache running as the needed user. In this setup you will need to have mod_proxy either loaded or compiled into your apache setup.</p>
<p>For example a request sent to http://rswarthout.svn.dummydomain.com would be routed through a proxy in apache to another instance of apache at http://127.0.0.1:8001. This internal address will handle the apache requests and pass it back to the web facing apache server instance.</p>
<p>The apache virtual host config below is for the web facing apache instance:</p>
<blockquote><p>&lt;VirtualHost 12.34.56.78:80&gt;<br />
ServerName rswarthout.svn.dummydomain.com<br />
ProxyPreserveHost On<br />
ProxyPass / http://127.0.0.1:8001/<br />
ProxyPassReverse / http://127.0.0.1:8001/<br />
&lt;VirtualHost&gt;</p></blockquote>
<p>You will need to start a seperate instance of apache and pass it the config file to run. The config file below will start apache and have it listen on IP 127.0.0.1 only on port 8001.</p>
<blockquote><p>Listen 127.0.0.1:8001</p>
<p>LoadModule php5_module        modules/libphp5.so<br />
AddType application/x-httpd-php .php</p>
<p>DocumentRoot &#8220;/home/svn.dummydomain.com/public_html&#8221;</p>
<p>&lt;Directory &#8220;/home/svn.dummydomain.com/public_html&#8221;&gt;<br />
Options -Indexes FollowSymLinks<br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
&lt;/Directory&gt;</p>
<p>User rswarthout<br />
Group rswarthout</p>
<p>DirectoryIndex index.php index.html</p>
<p>php_admin_value include_path &#8220;.:/home/svn.dummydomain.com/:/usr/share/pear&#8221;</p></blockquote>
<p>In the above apache config you will see that I am setting the include path for PHP as well in the last line. This is not a requirement but it is good practice to only have files accessible through apache that need to be. To start a seperate instance of apache with the above config run the following command.</p>
<blockquote><p>/path/to/apache/httpd -f /path/to/above/config/file.conf</p></blockquote>
<p>That is all for this piece of the puzzle. Next time I will begin to explain the PHP side of the puzzle. When this puzzle is broken up into its smaller pieces it is quite easy to work through.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertswarthout.com/2008/05/php-subversion-frontend-part-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>31,622,400 second hiatus</title>
		<link>http://www.robertswarthout.com/2008/05/31556926-second-hiatus/</link>
		<comments>http://www.robertswarthout.com/2008/05/31556926-second-hiatus/#comments</comments>
		<pubDate>Tue, 20 May 2008 15:17:07 +0000</pubDate>
		<dc:creator>Robert Swarthout</dc:creator>
		
		<category><![CDATA[I dunno]]></category>

		<guid isPermaLink="false">http://www.robertswarthout.com/rswarthout/2008/05/31556926-second-hiatus/</guid>
		<description><![CDATA[So it has been 1 year to the day since my last post, too long! A lot has happened in the last year, I will spare you most of the details. Recently I have started working for Schematic in Atlanta and started a used auto sales site, EasyAutoSales.com with some friends. If you are in [...]]]></description>
			<content:encoded><![CDATA[<p>So it has been 1 year to the day since my last post, too long! A lot has happened in the last year, I will spare you most of the details. Recently I have started working for <a href="http://www.schematic.com">Schematic</a> in Atlanta and started a used auto sales site, <a href="http://www.easyautosales.com">EasyAutoSales.com</a> with some friends. If you are in the market to buy a new/used car/truck/van/bus/motorcycle/carriage you should stop by and check it out. I will try my best to write further posts as we make progress on EasyAutoSales as I am sure I will run across things that would be of help to others.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertswarthout.com/2008/05/31556926-second-hiatus/feed/</wfw:commentRss>
		</item>
		<item>
		<title>IE 6, Apache mod_deflate, blank pages&#8230;</title>
		<link>http://www.robertswarthout.com/2007/05/ie-6-apache-mod_deflate-blank-pages/</link>
		<comments>http://www.robertswarthout.com/2007/05/ie-6-apache-mod_deflate-blank-pages/#comments</comments>
		<pubDate>Sun, 20 May 2007 16:42:10 +0000</pubDate>
		<dc:creator>Robert Swarthout</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://www.robertswarthout.com/rswarthout/2007/05/ie-6-apache-mod_deflate-blank-pages/</guid>
		<description><![CDATA[I just ran across an interesting bug in IE 6 when a page is loading an external javascript file. If Apache is outputting the external javascript compressed (gzip) IE will do one of the following things:

Return a blank page
Try loading the page forever

Prior to finding this bug, our apache settings for mod_deflate looked like&#8230;
AddOutputFilterByType DEFLATE [...]]]></description>
			<content:encoded><![CDATA[<p>I just ran across an interesting bug in IE 6 when a page is loading an external javascript file. If Apache is outputting the external javascript compressed (gzip) IE will do one of the following things:</p>
<ol>
<li>Return a blank page</li>
<li>Try loading the page forever</li>
</ol>
<p>Prior to finding this bug, our apache settings for mod_deflate looked like&#8230;</p>
<blockquote><p>AddOutputFilterByType DEFLATE text/html text/css text/xml text/plain application/x-javascript</p></blockquote>
<p>Now it looks like&#8230;</p>
<blockquote><p>AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript<br />
BrowserMatch ^Mozilla/4 gzip-only-text/html<br />
BrowserMatch ^Mozilla/4\.[0678] no-gzip<br />
BrowserMatch \bMSIE\s7Â  !no-gzip !gzip-only-text/html</p></blockquote>
<p>Making these changes seemed to have fixed the issue. Now when a page is loaded in IE6, any external javascript file will not be gzipped and their page load will be slower. I suppose that is punishment for not upgrading to IE7 or getting Firefox.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertswarthout.com/2007/05/ie-6-apache-mod_deflate-blank-pages/feed/</wfw:commentRss>
		</item>
		<item>
		<title>JavaScript - Safari Bug?</title>
		<link>http://www.robertswarthout.com/2007/02/javascript-safari-bug/</link>
		<comments>http://www.robertswarthout.com/2007/02/javascript-safari-bug/#comments</comments>
		<pubDate>Thu, 08 Feb 2007 01:10:00 +0000</pubDate>
		<dc:creator>Robert Swarthout</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://www.robertswarthout.com/rswarthout/2007/02/javascript-safari-bug/</guid>
		<description><![CDATA[On PaperBackSwap and SwapaCD we have some tool-tip rollovers that display a definition of what we define as keywords. (This can be seen in action on http://www.paperbackswap.com/help/hdtw.php. The word &#8220;credit&#8221; has been highlighted.) It came to our attention the other day that Safari was display anything replaced by JavaScript as $&#038; which was suppose to [...]]]></description>
			<content:encoded><![CDATA[<p>On PaperBackSwap and SwapaCD we have some tool-tip rollovers that display a definition of what we define as keywords. (This can be seen in action on <a href="http://www.paperbackswap.com/help/hdtw.php">http://www.paperbackswap.com/help/hdtw.php</a>. The word &#8220;credit&#8221; has been highlighted.) It came to our attention the other day that Safari was display anything replaced by JavaScript as $&#038; which was suppose to be the text or &#8220;keyword&#8221; it found. We have a separate JavaScript file that gets loaded into the page that has the keywords we have definitions for. Well the $&#038; worked for in both IE 6 and 7, Firefox 1.5 and 2 and Opera but not Safari. Simply changing the $&#038; to $1 since I only needed the first thing it found solved the problem. So now when the user clicks one of the links with dashes under it they get the definition of that keyword loaded up from the server with an AJAX call. Yipee now all the browsers are working again&#8230;..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertswarthout.com/2007/02/javascript-safari-bug/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP frontend to Subversion (SVN)</title>
		<link>http://www.robertswarthout.com/2007/01/php-frontend-to-subversion-svn/</link>
		<comments>http://www.robertswarthout.com/2007/01/php-frontend-to-subversion-svn/#comments</comments>
		<pubDate>Fri, 26 Jan 2007 14:56:32 +0000</pubDate>
		<dc:creator>Robert Swarthout</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://www.robertswarthout.com/?p=13</guid>
		<description><![CDATA[So over the last week I have been working on and off with a PHP frontend to SVN. The frontend needed to be designed in such a way that each developer could access their working copies and make the full range of actions against them. I decided to also use an AJAX setup so that [...]]]></description>
			<content:encoded><![CDATA[<p><a title="dev_file_control.jpg" class="imagelink" href="http://www.robertswarthout.com/wp-content/uploads/2007/01/dev_file_control.jpg"><img align="right" alt="dev_file_control.jpg" id="image14" title="dev_file_control.jpg" src="http://www.robertswarthout.com/wp-content/uploads/2007/01/dev_file_control.thumbnail.jpg" /></a>So over the last week I have been working on and off with a PHP frontend to SVN. The frontend needed to be designed in such a way that each developer could access their working copies and make the full range of actions against them. I decided to also use an AJAX setup so that pages would be quickly loaded and updated by a single toggle of a folder. The first issue that I had to deal with was when a SVN command was issues it needed to be issued as the owner of the code so that SVN could track edits correctly. After googling around for a bit I quickly realized that there was not a viable Apache MPM that would serve virtual hosts under different users and groups. Then the light bulb flipped on, setup a proxy and redirect requests to developer.dev.domain.com to its own instance of apache running as the user and group &#8216;developer&#8217;. This would ensure that all SVN commands would run as &#8216;developer&#8217; when executed. I then moved onto setting up the interface. The features that are working at this time are:</p>
<ol>
<li>create working copy from repository (svn checkout)</li>
<li>delete working copy</li>
<li>svn add</li>
<li>svn blame</li>
<li>svn commit</li>
<li>svn copy</li>
<li>svn delete</li>
<li>svn diff</li>
<li>svn move</li>
<li>svn propset</li>
<li>search files (via a grep/find combination, omitting .svn folders)</li>
<li>svn log</li>
<li>svn rename</li>
<li>svn status</li>
<li>update local working copy</li>
<li>update stage environment</li>
<li>publish stage environment</li>
</ol>
<p>A few things that I learned while working with doing the SVN commands was that when executing a command via the php function exec() I need to add the flag &#8211;config-dir=$USER_HOME_DIR/.subversion (or where ever the users .subversion folder is located). Also if a command does not seem to be executing correctly you can add &#8220;2>&#038;1&#8243; without quotations to the command being run and it will return any error messages through the $ouput variable for exec();</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertswarthout.com/2007/01/php-frontend-to-subversion-svn/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Our new hardware setup</title>
		<link>http://www.robertswarthout.com/2007/01/our-new-hardware-setup/</link>
		<comments>http://www.robertswarthout.com/2007/01/our-new-hardware-setup/#comments</comments>
		<pubDate>Wed, 24 Jan 2007 22:43:30 +0000</pubDate>
		<dc:creator>Robert Swarthout</dc:creator>
		
		<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://www.robertswarthout.com/?p=9</guid>
		<description><![CDATA[After our latest purchase with Dell, all I can say is that Micheal Dell will be able to buy a nice new watch. Currently in the office we have a stack of new machines that are getting close to being fully configured ready for the move to the data center. If anyone is looking for [...]]]></description>
			<content:encoded><![CDATA[<p><img border="1" align="left" alt="Photo of the new servers" id="image8" title="Photo of the new servers" src="http://www.robertswarthout.com/wp-content/uploads/2007/01/server_stack_l.thumbnail.jpg" />After our latest purchase with Dell, all I can say is that Micheal Dell will be able to buy a <a href="http://www.steindiamonds.com/watches_view_details.asp?product_id=493">nice new watch</a>. Currently in the office we have a stack of new machines that are getting close to being fully configured ready for the move to the data center. If anyone is looking for a collocation facility in the Atlanta, Georgia area I would highly recommend <a href="http://www.qualitytech.com">Quality Tech</a>. Quality Tech is the former E-Delta Com and have a really cool <a href="http://www.qualitytech.com/content/view/53/100/">data center in Suwanee</a>, which will be the home to our new boxes. We ended up with the following combination of servers:</p>
<ul>
<li>7 - Poweredge 860</li>
<ul>
<li>2 - <a href="http://www.linuxvirtualserver.org/">LVS</a></li>
<ul>
<li>Director, Slave configuration with hot failover for <a href="http://www.linux-ha.org/">high-availability</a></li>
</ul>
<li>2 - WWW</li>
<li>2 - NFS</li>
<ul>
<li>Director, Slave configuration using <a href="http://www.linux-ha.org/">hearbeat</a></li>
<li>Replicate Data in real time with <a href="http://www.drbd.org/">DRBD</a> to allow for hot failover</li>
<li>Will also serve web traffic at half of the ratio compared to the WWW boxes</li>
</ul>
<li>1 - DEV</li>
</ul>
<li>3 - Poweredge 2950</li>
<ul>
<li>2 - DB (MySQL dual master configuration)</li>
<li>1 - Backup Master with <strong><span style="font-style: italic">alot</span></strong> of storage space</li>
</ul>
<li>1 - Poweredge SC430</li>
<ul>
<li>data set compilation, mostly sits idle</li>
</ul>
<li>1 - Clone Machine</li>
<ul>
<li>Old Backup server, will become backup slave</li>
</ul>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.robertswarthout.com/2007/01/our-new-hardware-setup/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Install of Apache 2.2.3, MySQL 5.0.18 and PHP 5.2.0</title>
		<link>http://www.robertswarthout.com/2007/01/install-of-apache-223-mysql-5018-and-php-520/</link>
		<comments>http://www.robertswarthout.com/2007/01/install-of-apache-223-mysql-5018-and-php-520/#comments</comments>
		<pubDate>Tue, 16 Jan 2007 15:43:30 +0000</pubDate>
		<dc:creator>Robert Swarthout</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<category><![CDATA[Fedora]]></category>

		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.robertswarthout.com/?p=7</guid>
		<description><![CDATA[After getting our new servers delivered I came to the conclusion very quickly that I would like a way to easily get the same configurations on every box without having to spend the rest of my life doing so. Each box needed to have Apache, MySQL and PHP installed and configured. I decided to write [...]]]></description>
			<content:encoded><![CDATA[<p>After getting our new servers delivered I came to the conclusion very quickly that I would like a way to easily get the same configurations on every box without having to spend the rest of my life doing so. Each box needed to have <a href="http://httpd.apache.org/">Apache</a>, <a href="http://www.mysql.com">MySQL</a> and <a href="http://www.php.net">PHP</a> installed and configured. I decided to write a bash script to do this for me. In the end I am very happy with the way that the script works. It leaves very little work to be done once the script is done running. In the end I have two scripts, one is for a 32bit machine and one is for 64bit machines. Below is the 64bit script. The install will compile PHP with all of the supported modules that we need. The only thing that needs to be done with PHP is the setting the correct config options in the php.ini, this includes putting in <a href="http://pecl.php.net/apc">APC</a> cache extension.</p>
<blockquote><p>#!/bin/sh</p>
<p># Abort on any errors<br />
set -e</p>
<p># Where do you want all this stuff built?<br />
SRCDIR=/home/support/software/source</p>
<p># Unpack our large file that contains all needed packages that are not going to be obtained from yum<br />
#rm -Rf ${SRCDIR}<br />
#gzip -d nbs_core_install.gz<br />
#cd nbs_core_install/<br />
#cp -R * ${SRCDIR}/</p>
<p># Install gcc<br />
yum -y install gcc</p>
<p># Install cc<br />
yum -y install cc</p>
<p># Install libtool<br />
yum -y install libtool</p>
<p># Extract OpenSSH and install openssh and the sshd in the init.d<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/openssh-4.5p1.tar.gz<br />
cd ${SRCDIR}/openssh-4.5p1<br />
./configure<br />
make<br />
make install<br />
cp -f ${SRCDIR}/sshd.init.d /etc/rc.d/init.d/sshd<br />
chmod 755 /etc/rc.d/init.d/sshd<br />
rm -f /etc/rc.d/rc3.d/S70sshd<br />
cd /etc/rc.d/rc3.d &#038;&#038; ln -s /etc/rc.d/init.d/sshd S70sshd<br />
rm -Rf ${SRCDIR}/openssh-4.5p1</p>
<p># Install libjpeg-devel<br />
yum -y install libjpeg-devel</p>
<p># Install jpeg.v6b<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/jpegsrc.v6b.tar.gz<br />
cd ${SRCDIR}/jpeg-6b<br />
cp /usr/share/libtool/config.guess ./<br />
cp /usr/share/libtool/config.sub ./<br />
./configure &#8211;enable-shared<br />
make libdir=/usr/lib64<br />
install -d /usr/local/man/man1<br />
make libdir=/usr/lib64 install<br />
rm -Rf ${SRCDIR}/jpeg-6b</p>
<p># Install libtiff &#038; libtiff-devel<br />
yum -y install libtiff libtiff-devel</p>
<p># Install Ghostscript (needed for ImageMagick)<br />
yum -y install ghostscript</p>
<p># Install ImageMagick<br />
yum -y install ImageMagick</p>
<p># Install libxml2<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/libxml2-2.6.27.tar.gz<br />
cd ${SRCDIR}/libxml2-2.6.27<br />
./configure &#8211;enable-shared<br />
make<br />
make install<br />
make tests<br />
rm -Rf ${SRCDIR}/libxml2-2.6.27</p>
<p># Install libxslt<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/libxslt-1.1.19.tar.gz<br />
cd ${SRCDIR}/libxslt-1.1.19<br />
./configure &#8211;prefix=/usr<br />
make<br />
make install<br />
rm -Rf ${SRCDIR}/libxslt-1.1.19</p>
<p># Install zlib<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/zlib-1.2.3.tar.gz<br />
cd ${SRCDIR}/zlib-1.2.3<br />
./configure &#8211;shared &#8211;prefix=/usr<br />
make<br />
make install<br />
rm -Rf ${SRCDIR}/zlib-1.2.3</p>
<p># Install libmcrypt<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/libmcrypt-2.5.7.tar.gz<br />
cd ${SRCDIR}/libmcrypt-2.5.7<br />
./configure &#8211;disable-posix-threads &#8211;prefix=/usr<br />
make<br />
make install</p>
<p># Install libmcrypt lltdl<br />
cd  ${SRCDIR}/libmcrypt-2.5.7/libltdl<br />
./configure &#8211;prefix=/usr &#8211;enable-ltdl-install<br />
make<br />
make install<br />
rm -Rf ${SRCDIR}/libmcrypt-2.5.7</p>
<p># Install mhash<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/mhash-0.9.7.1.tar.gz<br />
cd ${SRCDIR}/mhash-0.9.7.1<br />
./configure &#8211;prefix=/usr<br />
make<br />
make install<br />
rm -Rf ${SRCDIR}/mhash-0.9.7.1</p>
<p># Install Freetype<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/freetype-2.2.1.tar.gz<br />
cd ${SRCDIR}/freetype-2.2.1<br />
./configure<br />
make<br />
make install<br />
rm -Rf ${SRCDIR}/freetype-2.2.1</p>
<p># Install libidn<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/libidn-0.6.9.tar.gz<br />
cd ${SRCDIR}/libidn-0.6.9<br />
./configure &#8211;with-iconv-prefix=/usr &#8211;prefix=/usr<br />
make<br />
make install<br />
rm -Rf ${SRCDIR}/libidn-0.6.9</p>
<p># Install OpenSSL<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/openssl-0.9.8d.tar.gz<br />
cd ${SRCDIR}/openssl-0.9.8d<br />
./config<br />
make<br />
make test<br />
make install<br />
rm -Rf ${SRCDIR}/openssl-0.9.8d</p>
<p># Install cURL<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/curl-7.15.0.tar.gz<br />
cd ${SRCDIR}/curl-7.15.0<br />
./configure &#8211;enable-ipv6 &#8211;enable-cookies &#8211;enable-crypto-auth &#8211;prefix=/usr<br />
make<br />
make install<br />
rm -Rf ${SRCDIR}/curl-7.15.0</p>
<p># Install c-client (IMAP)<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/imap-2004g.tar.Z<br />
cd ${SRCDIR}/imap-2004g<br />
make lrh<br />
cp c-client/c-client.a /usr/lib/libc-client.a<br />
cp c-client/*.h /usr/include<br />
rm -Rf ${SRCDIR}/imap-2004g</p>
<p># Install Apache<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/httpd-2.2.3.tar.gz<br />
cd ${SRCDIR}/httpd-2.2.3<br />
./configure &#8211;enable-rewrite &#8211;enable-ssl &#8211;enable-deflate &#8211;enable-so &#8211;enable-proxy &#8211;prefix=/usr/local/apache2<br />
make<br />
make install<br />
rm -Rf ${SRCDIR}/httpd-2.2.3</p>
<p># Install httpd init.d file<br />
cd ${SRCDIR}<br />
rm -f /etc/rc.d/init.d/httpd<br />
cp httpd.init.d /etc/rc.d/init.d/httpd<br />
chmod 755 /etc/rc.d/init.d/httpd<br />
rm -f /etc/rc.d/rc3.d/K*httpd<br />
rm -f /etc/rc.d/rc3.d/S*httpd<br />
cd /etc/rc.d/rc3.d &#038;&#038; ln -s /etc/rc.d/init.d/httpd F15sshd</p>
<p># Install libpng<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/libpng-1.2.15.tar.gz<br />
cd ${SRCDIR}/libpng-1.2.15<br />
./configure<br />
make<br />
make install<br />
rm -Rf ${SRCDIR}/libpng-1.2.15</p>
<p># Install MySQL<br />
yum -y install perl-DBI<br />
cd ${SRCDIR}<br />
rpm -i MySQL-server-standard-5.0.18-0.rhel4.x86_64.rpm<br />
rpm -i MySQL-client-standard-5.0.18-0.rhel4.x86_64.rpm<br />
rpm -i MySQL-devel-standard-5.0.18-0.rhel4.x86_64.rpm<br />
rpm -i MySQL-shared-standard-5.0.18-0.rhel4.x86_64.rpm<br />
rpm -i MySQL-standard-debuginfo-5.0.18-0.rhel4.x86_64.rpm<br />
ln -s /usr/lib64/mysql/libmysqlclient.a /usr/lib/libmysqlclient.a</p>
<p># Install Flex<br />
yum -y install flex</p>
<p># Install libdv<br />
yum -y install libdv</p>
<p># Install re2c needed for php pfro compile<br />
cd ${SRCDIR}<br />
tar zxf ${SRCDIR}/re2c-0.11.0.tar.gz<br />
cd ${SRCDIR}/re2c-0.11.0<br />
./configure<br />
make<br />
make install</p>
<p># Install PHP<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/php-5.2.0.tar.gz<br />
cd ${SRCDIR}/php-5.2.0<br />
./configure &#8216;&#8211;prefix=/usr&#8217; &#8216;&#8211;exec-prefix=/usr&#8217; &#8216;&#8211;bindir=/usr/bin&#8217; &#8216;&#8211;sbindir=/usr/sbin&#8217; &#8216;&#8211;sysconfdir=/etc&#8217; &#8216;&#8211;datadir=/usr/share&#8217; &#8216;&#8211;includedir=/usr/include&#8217; &#8216;&#8211;libdir=/usr/lib64&#8242; &#8216;&#8211;libexecdir=/usr/libexec&#8217; &#8216;&#8211;localstatedir=/var&#8217; &#8216;&#8211;sharedstatedir=/usr/com&#8217; &#8216;&#8211;mandir=/usr/share/man&#8217; &#8216;&#8211;infodir=/usr/share/info&#8217; &#8216;&#8211;with-mcrypt=/usr&#8217; &#8216;&#8211;with-config-file-path=/etc&#8217; &#8216;&#8211;with-bz2&#8242; &#8216;&#8211;with-curl&#8217; &#8216;&#8211;with-curl-ssl&#8217; &#8216;&#8211;with-exec-dir=/usr/bin&#8217; &#8216;&#8211;with-freetype-dir=/usr&#8217; &#8216;&#8211;with-png-dir=/usr&#8217; &#8216;&#8211;with-gd&#8217; &#8216;&#8211;with-ttf&#8217; &#8216;&#8211;with-gdbm&#8217; &#8216;&#8211;with-gettext&#8217; &#8216;&#8211;with-ncurses&#8217; &#8216;&#8211;with-gmp&#8217; &#8216;&#8211;with-iconv&#8217; &#8216;&#8211;with-jpeg&#8217; &#8216;&#8211;with-openssl&#8217; &#8216;&#8211;with-png&#8217; &#8216;&#8211;with-regex=system&#8217; &#8216;&#8211;with-xsl=/usr&#8217; &#8216;&#8211;with-expat-dir=/usr&#8217; &#8216;&#8211;with-zlib&#8217; &#8216;&#8211;with-layout=GNU&#8217; &#8216;&#8211;with-kerberos=/usr/kerberos&#8217; &#8216;&#8211;with-apxs2=/usr/local/apache2/bin/apxs&#8217; &#8216;&#8211;without-oci8&#8242; &#8216;&#8211;enable-inline-optimization&#8217; &#8216;&#8211;enable-gd-native-ttf&#8217; &#8216;&#8211;enable-exif&#8217; &#8216;&#8211;enable-ftp&#8217; &#8216;&#8211;enable-sockets&#8217; &#8216;&#8211;enable-trans-sid&#8217; &#8216;&#8211;enable-memory-limit&#8217; &#8216;&#8211;disable-rpath&#8217; &#8216;&#8211;disable-debug&#8217; &#8216;&#8211;with-mysql=/usr/local/mysql&#8217; &#8216;&#8211;with-mysqli=/usr/bin/mysql_config&#8217;<br />
make<br />
make install<br />
cp php.ini-dist /etc/php.ini<br />
rm -Rf ${SRCDIR}/php-5.2.0</p>
<p># Install Memcache PHP Extension<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/memcache-2.1.0.tgz<br />
cd ${SRCDIR}/memcache-2.1.0<br />
phpize<br />
./configure<br />
make<br />
mkdir /usr/local/phpextensions/<br />
cp ${SRCDIR}/memcache-2.1.0/modules/memcache.so /usr/local/phpextensions/<br />
rm -Rf ${SRCDIR}/memcache-2.1.0</p>
<p># Install APC (php cache)<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/APC-3.0.12p2.tgz<br />
cd ${SRCDIR}/APC-3.0.12p2<br />
phpize<br />
./configure &#8211;enable-apc-mmap=yes &#8211;with-apxs2=/usr/local/apache2/bin/apxs<br />
make<br />
cd ${SRCDIR}/APC-3.0.12p2/modules/<br />
cp apc.so /usr/local/phpextensions</p>
<p># Install libevent-devel<br />
yum -y install libevent-devel</p>
<p># Install Memcache Daemon<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/memcached-1.2.1.tar.gz<br />
cd ${SRCDIR}/memcached-1.2.1<br />
./configure<br />
make<br />
make install<br />
rm -Rf ${SRCDIR}/memcached-1.2.1</p>
<p># Install BRUTIS<br />
cd ${SRCDIR}<br />
cp monitor.php /home/support/<br />
chmod 700 /home/support/monitor.php<br />
cp ${SRCDIR}/crontab_root /var/spool/cron/root</p>
<p># Install perl-Net-SSLeay<br />
yum -y install perl-Net-SSLeay</p>
<p># Install Webmin<br />
cd ${SRCDIR}<br />
rpm -U webmin-1.310-1.noarch.rpm</p>
<p>echo<br />
echo<br />
echo &#8212;&#8212;&#8212;- INSTALL COMPLETE! &#8212;&#8212;&#8212;-<br />
echo<br />
echo</p></blockquote>
<p>And here is the 32bit script.</p>
<blockquote><p>#!/bin/sh</p>
<p># Abort on any errors<br />
set -e</p>
<p># Where do you want all this stuff built?<br />
SRCDIR=/home/support/software/source</p>
<p># Install gcc<br />
yum -y install gcc</p>
<p># Install libtool<br />
yum -y install libtool</p>
<p># Extract OpenSSH and install openssh and the sshd in the init.d<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/openssh-4.5p1.tar.gz<br />
cd ${SRCDIR}/openssh-4.5p1<br />
./configure<br />
make<br />
make install<br />
cp -f ${SRCDIR}/sshd.init.d /etc/rc.d/init.d/sshd<br />
chmod 755 /etc/rc.d/init.d/sshd<br />
rm -f /etc/rc.d/rc3.d/S70sshd<br />
cd /etc/rc.d/rc3.d &#038;&#038; ln -s /etc/rc.d/init.d/sshd S70sshd<br />
rm -Rf ${SRCDIR}/openssh-4.5p1</p>
<p># Install libjpeg-devel<br />
yum -y install libjpeg-devel</p>
<p># Install jpeg.v6b<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/jpegsrc.v6b.tar.gz<br />
cd ${SRCDIR}/jpeg-6b<br />
cp /usr/share/libtool/config.guess ./<br />
cp /usr/share/libtool/config.sub ./<br />
./configure &#8211;enable-shared<br />
make<br />
install -d /usr/local/man/man1<br />
make install<br />
rm -Rf ${SRCDIR}/jpeg-6b</p>
<p># Install libtiff &#038; libtiff-devel<br />
yum -y install libtiff libtiff-devel</p>
<p># Install Ghostscript (needed for ImageMagick)<br />
yum -y install ghostscript</p>
<p># Install ImageMagick<br />
yum -y install ImageMagick</p>
<p># Install libxml2<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/libxml2-2.6.27.tar.gz<br />
cd ${SRCDIR}/libxml2-2.6.27<br />
./configure &#8211;enable-shared<br />
make<br />
make install<br />
make tests<br />
rm -Rf ${SRCDIR}/libxml2-2.6.27</p>
<p># Install libxslt<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/libxslt-1.1.19.tar.gz<br />
cd ${SRCDIR}/libxslt-1.1.19<br />
./configure &#8211;prefix=/usr<br />
make<br />
make install<br />
rm -Rf ${SRCDIR}/libxslt-1.1.19</p>
<p># Install libmcrypt<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/libmcrypt-2.5.7.tar.gz<br />
cd ${SRCDIR}/libmcrypt-2.5.7<br />
./configure &#8211;prefix=/usr<br />
make<br />
make install</p>
<p># Install Freetype<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/freetype-2.2.1.tar.gz<br />
cd ${SRCDIR}/freetype-2.2.1<br />
./configure<br />
make<br />
make install<br />
rm -Rf ${SRCDIR}/freetype-2.2.1</p>
<p># Install OpenSSL<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/openssl-0.9.8d.tar.gz<br />
cd ${SRCDIR}/openssl-0.9.8d<br />
./config<br />
make<br />
make test<br />
make install<br />
rm -Rf ${SRCDIR}/openssl-0.9.8d</p>
<p># Install cURL<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/curl-7.15.0.tar.gz<br />
cd ${SRCDIR}/curl-7.15.0<br />
./configure &#8211;enable-ipv6 &#8211;enable-cookies &#8211;enable-crypto-auth &#8211;prefix=/usr<br />
make<br />
make install<br />
rm -Rf ${SRCDIR}/curl-7.15.0</p>
<p># Install c-client (IMAP)<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/imap-2004g.tar.Z<br />
cd ${SRCDIR}/imap-2004g<br />
make lrh<br />
cp c-client/c-client.a /usr/lib/libc-client.a<br />
cp c-client/*.h /usr/include<br />
rm -Rf ${SRCDIR}/imap-2004g</p>
<p># Install Apache<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/httpd-2.2.3.tar.gz<br />
cd ${SRCDIR}/httpd-2.2.3<br />
./configure &#8211;enable-rewrite &#8211;enable-ssl &#8211;enable-deflate &#8211;enable-so &#8211;enable-proxy &#8211;prefix=/usr/local/apache2<br />
make<br />
make install<br />
rm -Rf ${SRCDIR}/httpd-2.2.3</p>
<p># Install httpd init.d file<br />
cd ${SRCDIR}<br />
rm -f /etc/rc.d/init.d/httpd<br />
cp httpd.init.d /etc/rc.d/init.d/httpd<br />
chmod 755 /etc/rc.d/init.d/httpd<br />
rm -f /etc/rc.d/rc3.d/K*httpd<br />
rm -f /etc/rc.d/rc3.d/S*httpd<br />
cd /etc/rc.d/rc3.d &#038;&#038; ln -s /etc/rc.d/init.d/httpd F15sshd</p>
<p># Install libpng<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/libpng-1.2.15.tar.gz<br />
cd ${SRCDIR}/libpng-1.2.15<br />
./configure<br />
make<br />
make install<br />
rm -Rf ${SRCDIR}/libpng-1.2.15</p>
<p># Install MySQL<br />
yum -y install perl-DBI<br />
cd ${SRCDIR}<br />
rpm -i MySQL-server-standard-5.0.18-0.rhel3.i386.rpm<br />
rpm -i MySQL-client-standard-5.0.18-0.rhel3.i386.rpm<br />
rpm -i MySQL-devel-standard-5.0.18-0.rhel3.i386.rpm<br />
rpm -i MySQL-shared-standard-5.0.18-0.rhel3.i386.rpm</p>
<p># Install Flex<br />
yum -y install flex</p>
<p># Install libdv<br />
yum -y install libdv</p>
<p># Install PHP<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/php-5.2.0.tar.gz<br />
cd ${SRCDIR}/php-5.2.0<br />
./configure &#8216;&#8211;prefix=/usr&#8217; &#8216;&#8211;exec-prefix=/usr&#8217; &#8216;&#8211;bindir=/usr/bin&#8217; &#8216;&#8211;sbindir=/usr/sbin&#8217; &#8216;&#8211;sysconfdir=/etc&#8217; &#8216;&#8211;datadir=/usr/share&#8217; &#8216;&#8211;includedir=/usr/include&#8217; &#8216;&#8211;libdir=/usr/lib64&#8242; &#8216;&#8211;libexecdir=/usr/libexec&#8217; &#8216;&#8211;localstatedir=/var&#8217; &#8216;&#8211;sharedstatedir=/usr/com&#8217; &#8216;&#8211;mandir=/usr/share/man&#8217; &#8216;&#8211;infodir=/usr/share/info&#8217; &#8216;&#8211;with-mcrypt=/usr&#8217; &#8216;&#8211;with-config-file-path=/etc&#8217; &#8216;&#8211;with-bz2&#8242; &#8216;&#8211;with-curl&#8217; &#8216;&#8211;with-curl-ssl&#8217; &#8216;&#8211;with-exec-dir=/usr/bin&#8217; &#8216;&#8211;with-freetype-dir=/usr&#8217; &#8216;&#8211;with-png-dir=/usr&#8217; &#8216;&#8211;with-gd&#8217; &#8216;&#8211;with-ttf&#8217; &#8216;&#8211;with-gdbm&#8217; &#8216;&#8211;with-gettext&#8217; &#8216;&#8211;with-ncurses&#8217; &#8216;&#8211;with-gmp&#8217; &#8216;&#8211;with-iconv&#8217; &#8216;&#8211;with-jpeg&#8217; &#8216;&#8211;with-openssl&#8217; &#8216;&#8211;with-png&#8217; &#8216;&#8211;with-regex=system&#8217; &#8216;&#8211;with-xsl=/usr&#8217; &#8216;&#8211;with-expat-dir=/usr&#8217; &#8216;&#8211;with-zlib&#8217; &#8216;&#8211;with-layout=GNU&#8217; &#8216;&#8211;with-kerberos=/usr/kerberos&#8217; &#8216;&#8211;with-apxs2=/usr/local/apache2/bin/apxs&#8217; &#8216;&#8211;without-oci8&#8242; &#8216;&#8211;enable-inline-optimization&#8217; &#8216;&#8211;enable-gd-native-ttf&#8217; &#8216;&#8211;enable-exif&#8217; &#8216;&#8211;enable-ftp&#8217; &#8216;&#8211;enable-sockets&#8217; &#8216;&#8211;enable-trans-sid&#8217; &#8216;&#8211;enable-memory-limit&#8217; &#8216;&#8211;disable-rpath&#8217; &#8216;&#8211;disable-debug&#8217; &#8216;&#8211;with-mysql=/usr/local/mysql&#8217; &#8216;&#8211;with-mysqli=/usr/bin/mysql_config&#8217;<br />
make<br />
make install<br />
cp php.ini-dist /etc/php.ini<br />
rm -Rf ${SRCDIR}/php-5.2.0</p>
<p># Install Memcache PHP Extension<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/memcache-2.1.0.tgz<br />
cd ${SRCDIR}/memcache-2.1.0<br />
phpize<br />
./configure<br />
make<br />
mkdir /usr/local/phpextensions/<br />
cp ${SRCDIR}/memcache-2.1.0/modules/memcache.so /usr/local/phpextensions/<br />
rm -Rf ${SRCDIR}/memcache-2.1.0</p>
<p># Install APC (php cache)<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/APC-3.0.12p2.tgz<br />
cd ${SRCDIR}/APC-3.0.12p2<br />
phpize<br />
./configure &#8211;enable-apc-mmap=yes &#8211;with-apxs2=/usr/local/apache2/bin/apxs<br />
make<br />
cd ${SRCDIR}/APC-3.0.12p2/modules/<br />
cp apc.so /usr/local/phpextensions</p>
<p># Install libevent-devel<br />
yum -y install libevent-devel</p>
<p># Install Memcache Daemon<br />
cd ${SRCDIR}<br />
tar xzf ${SRCDIR}/memcached-1.2.1.tar.gz<br />
cd ${SRCDIR}/memcached-1.2.1<br />
./configure<br />
make<br />
make install<br />
rm -Rf ${SRCDIR}/memcached-1.2.1</p>
<p># Install BRUTIS<br />
cd ${SRCDIR}<br />
cp monitor.php /home/support/<br />
chmod 700 /home/support/monitor.php<br />
cp ${SRCDIR}/crontab_root /var/spool/cron/root</p>
<p># Install perl-Net-SSLeay<br />
yum -y install perl-Net-SSLeay</p>
<p># Install Webmin<br />
cd ${SRCDIR}<br />
rpm -U webmin-1.310-1.noarch.rpm</p>
<p>echo<br />
echo<br />
echo &#8212;&#8212;&#8212;- INSTALL COMPLETE! &#8212;&#8212;&#8212;-<br />
echo<br />
echo</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.robertswarthout.com/2007/01/install-of-apache-223-mysql-5018-and-php-520/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Fedora Core 5 NAT routing</title>
		<link>http://www.robertswarthout.com/2007/01/fedora-core-5-nat-routing/</link>
		<comments>http://www.robertswarthout.com/2007/01/fedora-core-5-nat-routing/#comments</comments>
		<pubDate>Tue, 16 Jan 2007 15:27:55 +0000</pubDate>
		<dc:creator>Robert Swarthout</dc:creator>
		
		<category><![CDATA[Fedora]]></category>

		<guid isPermaLink="false">http://www.robertswarthout.com/?p=6</guid>
		<description><![CDATA[After searching online for a hour or so I was able to get iptables setup correctly to use a Fedora Core 5 server as a router for an internal network. The following iptable rules is all I needed. I ended making a file and putting these 4 lines into it, then calling the file at [...]]]></description>
			<content:encoded><![CDATA[<p>After searching online for a hour or so I was able to get iptables setup correctly to use a <a href="http://fedora.redhat.com">Fedora Core</a> 5 server as a router for an internal network. The following iptable rules is all I needed. I ended making a file and putting these 4 lines into it, then calling the file at system bootup from rc.local.</p>
<blockquote><p>iptables &#8211;flush -t nat</p>
<p>iptables &#8211;table nat &#8211;append POSTROUTING &#8211;out-interface eth0 -j MASQUERADE<br />
iptables &#8211;append FORWARD &#8211;in-interface eth0 -j ACCEPT</p>
<p>echo 1 &gt; /proc/sys/net/ipv4/ip_forward</p></blockquote>
<p>The above setup does make an assumptions, that all nodes within the network will use static IP address. They all need to have their gateway addresses set to the IP address of the routing server. Now I need to figure out how to get this working with <a href="http://www.linuxvirtualserver.org">LVS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertswarthout.com/2007/01/fedora-core-5-nat-routing/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
