<?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>Blog - PonticStar.com &#187; System Administration</title>
	<atom:link href="http://www.ponticstar.com/blog/category/sys-admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ponticstar.com/blog</link>
	<description>Blog about various aspects of programming and web design</description>
	<lastBuildDate>Mon, 28 Jun 2010 19:53:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Strip comments and blank lines from file in Unix</title>
		<link>http://www.ponticstar.com/blog/2010/05/13/strip-comments-and-blank-lines-in-unix/</link>
		<comments>http://www.ponticstar.com/blog/2010/05/13/strip-comments-and-blank-lines-in-unix/#comments</comments>
		<pubDate>Thu, 13 May 2010 13:27:42 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[System Administration]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=106</guid>
		<description><![CDATA[This command displays configuration file stripping commented and blank lines on Unix-like operating system. grep -E -v '^\s*#&#124;^\s*$&#124;^\s*;' file or egrep -v '^\s*#&#124;^\s*$&#124;^\s*;' file]]></description>
			<content:encoded><![CDATA[<p>This command displays configuration file stripping commented and blank lines on Unix-like operating system. </p>
<pre class="brush:shell">
grep -E -v '^\s*#|^\s*$|^\s*;' file
</pre>
<p>or</p>
<pre class="brush:shell">
egrep -v '^\s*#|^\s*$|^\s*;' file
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2010/05/13/strip-comments-and-blank-lines-in-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostgreSQL crashes when using pgcrypto functions</title>
		<link>http://www.ponticstar.com/blog/2009/10/22/postgresql-crashes-when-using-pgcrypto/</link>
		<comments>http://www.ponticstar.com/blog/2009/10/22/postgresql-crashes-when-using-pgcrypto/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 02:44:18 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=103</guid>
		<description><![CDATA[After upgrading PostgreSQL from 7.4 to 8.2 it started crashing sporadically with the following entries in the log file:

<pre>LOG:  server process (pid 21460) was terminated by signal 11
LOG:  terminating any other active server processes
LOG:  all server processes terminated; reinitializing shared memory and semaphores</pre>]]></description>
			<content:encoded><![CDATA[<h3>PROBLEM:</h3>
<p>After upgrading PostgreSQL from 7.4 to 8.2 it started crashing sporadically with the following entries in the log file:</p>
<pre>LOG:  server process (pid 21460) was terminated by signal 11
LOG:  terminating any other active server processes
LOG:  all server processes terminated; reinitializing shared memory and semaphores</pre>
<h3>CAUSE:</h3>
<p>There were changes between PostgreSQL releases in functions definition used by pgcrypto module.</p>
<p>According to <a class="target-blank" href="http://marc.info/?l=postgresql-general&#038;m=118794006505296&#038;w=2">[1]</a> and <a class="target-blank" href="http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/pgcrypto/pgcrypto.sql.in">[3]</a> in PostgreSQL 8.0 the pgcrypto functions were non-strict and checked for <code>NULL</code>s, in PostgreSQL 8.1 they were made <code>STRICT</code>, in PostgreSQL 8.2 the <code>NULL</code> checks were removed from code.</p>
<h3>SOLUTION:</h3>
<p>In order to correct the problem these functions are needed to be recreated. Required SQL commands are defined in pgcrypto.sql which is usually located in<br />
<code>/usr/local/pgsql/share/contrib</code> when pgcrypto is installed.</p>
<pre>psql -d DBNAME -f /usr/local/pgsql/share/contrib/pgcrypto.sql</pre>
<p>Also it is a good idea to add functions to <code>template1</code> database if you use pgcrypto often. <code>template1</code> is the default source database name when using <code>CREATE DATABASE</code> command.</p>
<h3>REFERENCES:</h3>
<ol>
<li><a class="target-blank" href="http://marc.info/?l=postgresql-general&#038;m=118794006505296&#038;w=2">http://marc.info/?l=postgresql-general&#038;m=118794006505296&#038;w=2</a></li>
<li><a class="target-blank" href="http://www.mail-archive.com/pgsql-hackers@postgresql.org/msg109917.html">http://www.mail-archive.com/pgsql-hackers@postgresql.org/msg109917.html</a></li>
<li><a class="target-blank" href="http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/pgcrypto/pgcrypto.sql.in">http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/pgcrypto/pgcrypto.sql.in</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/10/22/postgresql-crashes-when-using-pgcrypto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ultramonkey on CentOS 4 with BlueQuartz (part 2)</title>
		<link>http://www.ponticstar.com/blog/2009/07/03/ultramonkey-on-centos4-with-bluequartz-p2/</link>
		<comments>http://www.ponticstar.com/blog/2009/07/03/ultramonkey-on-centos4-with-bluequartz-p2/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 14:06:43 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[BlueQuartz]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[UltraMonkey]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=88</guid>
		<description><![CDATA[I already wrote about additional steps required to install UltraMonkey on CentOS with BlueQuartz. Soon after that I have discovered that there is more to do if you want to get a perfect setup. One of the steps required to configure load-balanced cluster as described here was to create an IP alias on the loopback [...]]]></description>
			<content:encoded><![CDATA[<p>I already wrote about <a href="http://www.ponticstar.com/blog/2009/06/24/ultramonkey-on-centos4-with-bluequartz/" class="target-blank">additional steps required to install UltraMonkey on CentOS with BlueQuartz</a>. Soon after that I have discovered that there is more to do if you want to get a perfect setup.</p>
<p>One of the steps required to configure load-balanced cluster as described <a href="http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html" class="target-blank">here</a> was to create an IP alias on the loopback interface. It is needed so that real servers or standby director could see traffic for the virtual IP address.</p>
<p>But when creating a virtual site using BlueQuartz GUI it automatically adds an alias on primary network interface (<code>eth0</code> in our case) in addition to the alias we already created manually.</p>
<p><span id="more-88"></span><div id="attachment_89" class="wp-caption aligncenter" style="width: 550px"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2009/07/ultramonkey-on-centos4-with-bluequartz-fig1.png" alt="Adding a new site using BlueQuartz" title="Adding a new site using BlueQuartz" width="540" height="259" class="size-full wp-image-89" /><p class="wp-caption-text">Adding a new site using BlueQuartz</p></div></p>
<p>Now every server would be configured to respond to packets for virtual IP address <code>192.168.6.240</code>, which could result in unpredictable behavior.</p>
<pre>standby# ip addr sh
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    <b>inet 192.168.6.240/32 brd 255.255.255.255 scope global lo</b>
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:10:e0:05:20:0d brd ff:ff:ff:ff:ff:ff
    <b>inet 192.168.6.2/24 brd 192.168.6.255 scope global eth0</b>
    inet 192.168.6.240/24 brd 192.168.6.255 scope global secondary eth0:0
</pre>
<p>If you have completed all the steps to set-up a cluster you should already have fallback interface alias defined in <code>/etc/sysconfig/network-scripts/ifcfg-lo:0</code>. We no longer need BlueQuartz to manage virtual IP address for us.</p>
<p>In order to prevent BlueQuartz from doing that the following files have to be modified:</p>
<div class="filename">/usr/sausalito/handlers/base/vsite/change_net_info.pl</div>
<pre class="brush:perl; gutter:true; first-line:60; highlight:[65]">...
# handle ip address change
if ($vsite_new->{ipaddr})
{
    # make sure that there is a network interface for the new ip
#    vsite_add_network_interface($cce, $vsite_new->{ipaddr});

    # delete the old interface, this is a no op if another site is using the old ip still
    vsite_del_network_interface($cce, $vsite_old->{ipaddr});
} # end of ip address change specific
...
</pre>
<div class="filename">/usr/sausalito/handlers/base/vsite/vsite_create.pl</div>
<pre class="brush:perl; gutter:true; first-line:91; highlight:[93]">...
# make sure there is a network interface for this ip
#vsite_add_network_interface($cce, $vsite->{ipaddr});
...
 </pre>
<p>This way when you add or modify a virtual site assigned to virtual IP address BlueQuartz won&#8217;t add its address to one of the network interfaces because we already took care of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/07/03/ultramonkey-on-centos4-with-bluequartz-p2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UltraMonkey on CentOS 4 with BlueQuartz</title>
		<link>http://www.ponticstar.com/blog/2009/06/24/ultramonkey-on-centos4-with-bluequartz/</link>
		<comments>http://www.ponticstar.com/blog/2009/06/24/ultramonkey-on-centos4-with-bluequartz/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 13:10:23 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[BlueQuartz]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[UltraMonkey]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=80</guid>
		<description><![CDATA[CONFIGURATION: Server is configured as director to be a part of high availability and load balancing cluster as described here: http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html CentOS 4 with Bluequartz from Nuonce.net is used as operating system. PROBLEM: As a part of configuration an alias for loopback interface had to be created so server can accept packets for the virtual [...]]]></description>
			<content:encoded><![CDATA[<h3>CONFIGURATION:</h3>
<p>Server is configured as director to be a part of high availability and load balancing cluster as described here:<br />
<a href="http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html">http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html</a></p>
<p>CentOS 4 with Bluequartz from <a href="http://www.nuonce.net">Nuonce.net</a> is used as operating system. <span id="more-80"></span></p>
<h3>PROBLEM:</h3>
<p>As a part of configuration an alias for loopback interface had to be created so server can accept packets for the virtual service:</p>
<div class="filename">/etc/sysconfig/network-scripts/ifcfg-lo:0</div>
<pre>DEVICE=lo:0
IPADDR=192.168.6.240
NETMASK=255.255.255.255
NETWORK=192.168.6.0
BROADCAST=192.168.6.255
ONBOOT=yes
NAME=loopback
</pre>
<p>When <code>heartbeat</code> starts on director, it removes the alias on loopback interface <code>lo</code> and creates virtual IP address on interface <code>eth0</code>.</p>
<p>Here is how all interfaces look like before problem occurs:</p>
<pre>[root@server ~]# ip addr show
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:19:db:df:15:12 brd ff:ff:ff:ff:ff:ff
    inet 192.168.6.1/24 brd 192.168.6.255 scope global eth0
    <b>inet 192.168.6.240/24 brd 192.168.6.255 scope global secondary eth0</b>
</pre>
<p>However after certain amount of time the alias with virtual IP appears on loopback interface again:</p>
<pre>[root@server ~]# ip addr sh
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
    <b>inet 192.168.6.240/32 brd 192.168.6.255 scope global lo:0</b>
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:19:db:df:15:12 brd ff:ff:ff:ff:ff:ff
    inet 192.168.6.1/24 brd 192.168.6.255 scope global eth0
    <b>inet 192.168.6.240/24 brd 192.168.6.255 scope global secondary eth0</b>
</pre>
<h3>NOTE:</h3>
<p>This problem only affects servers acting as load balancers / directors. Real servers running on CentOS / Bluequartz are not affected.</p>
<h3>CAUSE:</h3>
<p>It turns out this problem is caused by <code>swatch</code> which is utilized by BlueQuartz. Every 15 minutes it checks the status of all interfaces that have <code>ONBOOT=yes</code> and brings them up if they are down.</p>
<p>See <code>/usr/sausalito/swatch/bin/am_network.sh</code> for more information.</p>
<h3>SOLUTION:</h3>
<p>In order to prevent <code>swatch</code> from manipulating our virtual IP address, you have to turn off <code>ONBOOT</code> parameter since that what it looks for.</p>
<div class="filename">/etc/sysconfig/network-scripts/ifcfg-lo:0</div>
<pre>...
ONBOOT=no
...</pre>
<p>Then disable <code>heartbeat</code> from starting automatically and make sure it is off.</p>
<pre>[root@server ~]# chkconfig heartbeat off
[root@server ~]# chkconfig --list heartbeat | grep heartbeat
heartbeat       0:off   1:off   2:off   3:off   4:off   5:off   6:off
</pre>
<p>Finally bring the alias and <code>heartbeat</code> up in <code>rc.local</code>. This script file is run once, before all other scripts have run but before the logon prompt appears.</p>
<div class="filename">/etc/rc.local</div>
<pre>...
ifup lo:0
/etc/init.d/heartbeat start
</pre>
<h3>LINKS:</h3>
<ol>
<li><a href="http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html">Streamline High Availability and Load Balancing</a></li>
<li><a href="http://www.jedi.com/obiwan/technology/ultramonkey-rhel4.html">How to install Ultra Monkey LVS in a 2-Node HA/LB Setup on CentOS/RHEL4</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/06/24/ultramonkey-on-centos4-with-bluequartz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ColdFusion 8 on CentOS 4 with BlueQuartz</title>
		<link>http://www.ponticstar.com/blog/2009/05/14/coldfusion8-on-centos4/</link>
		<comments>http://www.ponticstar.com/blog/2009/05/14/coldfusion8-on-centos4/#comments</comments>
		<pubDate>Thu, 14 May 2009 15:44:53 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[BlueQuartz]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=62</guid>
		<description><![CDATA[When starting ColdFusion for the first time connector wizard cannot configure web server correctly.
<pre>Starting ColdFusion 8...
The ColdFusion 8 server is starting up and will be available shortly.
======================================================================
Running the ColdFusion 8 connector wizard
======================================================================
Configuring the web server connector (Launched on the first run of the ColdFusion 8 start script)
Running apache connector wizard...
ColdFusion 8 not started, will retry connector 12 more time(s)
ColdFusion 8 not started, will retry connector 11 more time(s)
ColdFusion 8 not started, will retry connector 10 more time(s)
ColdFusion 8 not started, will retry connector 9 more time(s)
ColdFusion 8 not started, will retry connector 8 more time(s)
ColdFusion 8 not started, will retry connector 7 more time(s)
ColdFusion 8 not started, will retry connector 6 more time(s)
ColdFusion 8 not started, will retry connector 5 more time(s)
ColdFusion 8 not started, will retry connector 4 more time(s)
ColdFusion 8 not started, will retry connector 3 more time(s)
ColdFusion 8 not started, will retry connector 2 more time(s)
ColdFusion 8 not started, will retry connector 1 more time(s)
The connector wizard has not been able to contact the local ColdFusion 8, connector installation aborted.
======================================================================
ColdFusion 8 has been started.
ColdFusion 8 will write logs to /opt/coldfusion8/logs/cfserver.log
======================================================================
</pre>
]]></description>
			<content:encoded><![CDATA[<h3>PROBLEM:</h3>
<p>When starting ColdFusion for the first time connector wizard cannot configure web server correctly.</p>
<pre>Starting ColdFusion 8...
The ColdFusion 8 server is starting up and will be available shortly.
======================================================================
Running the ColdFusion 8 connector wizard
======================================================================
Configuring the web server connector (Launched on the first run of the ColdFusion 8 start script)
Running apache connector wizard...
ColdFusion 8 not started, will retry connector 12 more time(s)
ColdFusion 8 not started, will retry connector 11 more time(s)
ColdFusion 8 not started, will retry connector 10 more time(s)
ColdFusion 8 not started, will retry connector 9 more time(s)
ColdFusion 8 not started, will retry connector 8 more time(s)
ColdFusion 8 not started, will retry connector 7 more time(s)
ColdFusion 8 not started, will retry connector 6 more time(s)
ColdFusion 8 not started, will retry connector 5 more time(s)
ColdFusion 8 not started, will retry connector 4 more time(s)
ColdFusion 8 not started, will retry connector 3 more time(s)
ColdFusion 8 not started, will retry connector 2 more time(s)
ColdFusion 8 not started, will retry connector 1 more time(s)
The connector wizard has not been able to contact the local ColdFusion 8, connector installation aborted.
======================================================================
ColdFusion 8 has been started.
ColdFusion 8 will write logs to /opt/coldfusion8/logs/cfserver.log
======================================================================
</pre>
<div class="filename">/opt/coldfusion8/logs/cfserver.log:</div>
<pre>java.net.UnknownHostException: foo.mydomain.com: foo.mydomain.com</pre>
<div class="filename">/opt/coldfusion8/runtime/lib/wsconfig/wsconfig.log:</div>
<pre>05/06 07:59:07 info Macromedia JRun 4.0 (Build 108487)
05/06 07:59:08 error Could not connect to any JRun/ColdFusion servers on host localhost.
Possible causes:
o Server not running
  -Start Macromedia JRun4 or ColdFusion 8 server
o Server running
  -JNDI listen port in jndi.properties blocked by TCP/IP filtering or firewall
   on server
  -host restriction in security.properties blocking communication with server</pre>
<h3>CAUSE:</h3>
<p>This behavior could be caused by using non-resolvable host name (<code>foo.mydomain.com</code> in our example) along with <code>/etc/hosts</code> file having incorrect permissions.</p>
<pre>[root@foo ~]# ls -la /etc/hosts
-rw-r-----  1 root root 1514 May  4 18:04 /etc/hosts</pre>
<h3>SOLUTION:</h3>
<p>To resolve this issue <code>/etc/hosts</code> has to have <code>0644</code> access permission:</p>
<pre>
[root@foo ~]# chmod 0644 /etc/hosts
[root@foo ~]# ls -la /etc/hosts
-rw-r--r--  1 root root 1514 May  4 18:04 /etc/hosts
</pre>
<p>On distributions with BlueQuartz (<a href="http://www.osoffice.co.uk">Strongbolt</a>, <a href="http://www.blueonyx.it">BlueOnyx</a>, etc) it could be caused by <code>/usr/sausalito/handlers/nuonce/fixhosts/fixhosts</code> script (see <a class="target-blank" href="http://www.nuonce.net/support/viewthread.php?fid=44&amp;tid=1087">this post</a>). To prevent this script from resetting permissions again, add the following line at the end of the script:</p>
<pre>/bin/chmod 0644 /etc/hosts</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/05/14/coldfusion8-on-centos4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to compile Strongbolt kernel on Cobalt RaQ4</title>
		<link>http://www.ponticstar.com/blog/2009/04/27/how-to-compile-strongbolt-kernel-on-cobalt-raq4/</link>
		<comments>http://www.ponticstar.com/blog/2009/04/27/how-to-compile-strongbolt-kernel-on-cobalt-raq4/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 03:08:30 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Cobalt RaQ4]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=52</guid>
		<description><![CDATA[Cobalt RaQ4 was laying around collecting dust so I decided to give it a second chance. Guys from OS Office (http://www.osoffice.co.uk) put together Strongbolt &#8211; excellent Linux distribution based on CentOS with Cobalt RaQ support. I wanted to use Cobalt RaQ4 to test highly available and load balanced cluster configuration. However current Strongbolt kernel 2.6.16i586 [...]]]></description>
			<content:encoded><![CDATA[<p>Cobalt RaQ4 was laying around collecting dust so I decided to give it a second chance. Guys from OS Office (<a href="http://www.osoffice.co.uk">http://www.osoffice.co.uk</a>) put together Strongbolt &#8211; excellent Linux distribution based on CentOS with Cobalt RaQ support. </p>
<p>I wanted to use Cobalt RaQ4 to test highly available and load balanced cluster configuration. However current Strongbolt kernel 2.6.16i586 doesn’t have IP virtual server support and had to be recompiled. <span id="more-52"></span>I’ve used the following page as a reference while building a kernel &#8211; <a href="http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html">http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html</a>.</p>
<p>Below is a list of steps required to compile a kernel with virtual server support. If you don&#8217;t need this functionality please ignore steps 6 and 13.</p>
<ol>
<li>Logged in as root, downloaded and extracted kernel source code.
<pre>wget http://www.osoffice.co.uk/linux/raq4-sb-kernel-source/2.6/linux-2.6.16-raq4-source.tar.gz
tar -xzf linux-2.6.16-raq4-source.tar.gz -C /usr/src
cd /usr/src/linux-2.6.16-raq4-standard/</pre>
</li>
<li>Installed compiler and required libraries.
<pre>yum install gcc ncurses-devel</pre>
</li>
<li>To prevent overwriting any existing kernel modules on the system modified kernel version to something unique in <code>/usr/src/linux-2.6.16-raq4-standard/Makefile</code>.
<pre>VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 16
EXTRAVERSION = -ipvs</pre>
</li>
<li>Current kernel configuration settings are stored in <code>/proc/config.gz</code>. Since I only need to make minor changes to the configuration it would be wise to re-use the configuration file.
<pre>zcat /proc/config.gz > /usr/src/linux-2.6.16-raq4-standard/.config</pre>
</li>
<li>Run the configuration utility. Configuration file <code>.config</code> created in previous step will be loaded automatically.
<pre>make menuconfig</pre>
</li>
<li>In the menu, selected <code>Networking -> Networking options -> IP: Virtual Server Configuration</code> and then made the following choices:
<pre>   <M> IP virtual server support (EXPERIMENTAL)
   [ ]   IP virtual server debugging (NEW)
   (12)  IPVS connection table size (the Nth power of 2) (NEW)
   ---   IPVS transport protocol load balancing support
   [*]   TCP load balancing support
   [*]   UDP load balancing support
   [ ]   ESP load balancing support (NEW)
   [ ]   AH load balancing support (NEW)
   ---   IPVS scheduler
   <M>   round-robin scheduling
   <M>   weighted round-robin scheduling
   <M>   least-connection scheduling
   <M>   weighted least-connection scheduling
   <M>   locality-based least-connection scheduling
   <M>   locality-based least-connection with replication scheduling
   <M>   destination hashing scheduling
   <M>   source hashing scheduling
   <M>   shortest expected delay scheduling
   <M>   never queue scheduling
   ---   IPVS application helper
   <M>   FTP protocol helper (NEW)</pre>
</li>
<li>Removed compiled kernel that came with the source files.
<pre>rm vmlinux.bz2</pre>
</li>
<li>Compiled the kernel.
<pre>make vmlinux</pre>
</li>
<li>Compiled and installed all the loadable modules.
<pre>make modules
make modules_install</pre>
</li>
<li>Made a backup of the current kernel.
<pre>cp /boot/vmlinux.bz2 /boot/vmlinux-`uname -r`.bz2
chmod 0644 /boot/vmlinux-`uname -r`.bz2</pre>
</li>
<li>Compressed and installed the kernel. Since one of the Strongbolt forum users experienced a problem booting kernel compressed with default settings (see <a href="http://www.osoffice.co.uk/forum/viewtopic.php?f=7&#038;t=391">http://www.osoffice.co.uk/forum/viewtopic.php?f=7&#038;t=391</a>), compression method #4 was used.
<pre>bzip2 -4 vmlinux
cp vmlinux.bz2 /boot</pre>
</li>
<li>Rebooted the server.</li>
<li>Loaded virtual server kernel modules.
<pre>modprobe ip_vs ip_vs_rr</pre>
</li>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/04/27/how-to-compile-strongbolt-kernel-on-cobalt-raq4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
