<?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>Racker Hacker &#187; fedora</title>
	<atom:link href="http://rackerhacker.com/tag/fedora/feed/" rel="self" type="application/rss+xml" />
	<link>http://rackerhacker.com</link>
	<description>Words of wisdom from a server administrator</description>
	<lastBuildDate>Tue, 07 Feb 2012 14:07:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>The Kerberos-hater&#039;s guide to installing Kerberos</title>
		<link>http://rackerhacker.com/2012/02/05/the-kerberos-haters-guide-to-installing-kerberos/</link>
		<comments>http://rackerhacker.com/2012/02/05/the-kerberos-haters-guide-to-installing-kerberos/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 21:03:52 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[kerberos]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[nis]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[rhca]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2949</guid>
		<description><![CDATA[As promised in my earlier post entitled Kerberos for haters, I've assembled the simplest possible guide to get Kerberos up an running on two CentOS 5 servers. Also, I don't really hate Kerberos. It's a bit of an inside joke with my coworkers who are studying for some of the RHCA exams at Rackspace. The [...]<p><a href="http://rackerhacker.com/2012/02/05/the-kerberos-haters-guide-to-installing-kerberos/">The Kerberos-hater's guide to installing Kerberos</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://rackerhacker.com/wp-content/uploads/2012/02/haters_gonna_hate_elephhant.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/02/haters_gonna_hate_elephhant-238x300.jpg" alt="Haters gonna hate - elephant" title="Haters gonna hate - elephant" width="171" height="216" class="alignright size-medium wp-image-2953" /></a>As promised in my earlier post entitled <a href="/2012/02/02/kerberos-for-haters/">Kerberos for haters</a>, I've assembled the simplest possible guide to get Kerberos up an running on two CentOS 5 servers.</p>
<p>Also, I don't really <em>hate</em> Kerberos.  It's a bit of an inside joke with my coworkers who are studying for some of the <a href="http://www.redhat.com/training/certifications/rhca/">RHCA</a> exams at Rackspace.  The additional security provided by Kerberos is quite good but the setup involves a lot of small steps.  If you miss one of the steps or if you get something done out of order, you may have to scrap the whole setup and start over unless you can make sense of the errors in the log files.  A lot of my dislikes for Kerberos comes from the number of steps required in the setup process and the difficulty in tracking down issues when they crop up.</p>
<p>To complete this guide, you'll need the following:</p>
<ul>
<li>two CentOS, Red Hat Enterprise Linux or Scientific Linux 5 servers or VM's</li>
<li>some patience</li>
</ul>
<p>Here's how I plan to name my servers:</p>
<ul>
<li><strong>kdc.example.com</strong> - the Kerberos KDC server at 192.168.250.2</li>
<li><strong>client.example.com</strong> - the Kerberos client at 192.168.250.3</li>
</ul>
<p><strong>CRITICAL STEP:</strong> Before getting started, ensure that both systems have their hostnames properly set and both systems have the hostnames and IP addresses of both systems in <code>/etc/hosts</code>.  Your server and client must be able to know the IP and hostname of the other system as well as themselves.</p>
<p>First off, we will need <a href="http://en.wikipedia.org/wiki/Network_Information_Service">NIS</a> working to serve up the user information for our client.  Install the NIS server components on the KDC server:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# yum install ypserv</pre></div></div>

<p>Set the NIS domain and set a static port for <code>ypserv</code> to make it easier to firewall off.  Edit <code>/etc/sysconfig/network</code> on the KDC server:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">NISDOMAINNAME=EXAMPLE.COM
YPSERV_ARGS=&quot;-p 808&quot;</pre></div></div>

<p>Manually set the NIS domain on the KDC server and add it to <code>/etc/yp.conf</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# nisdomain EXAMPLE.COM
[root@kdc ~]# echo &quot;domain EXAMPLE.COM server kdc.example.com&quot; &gt;&gt; /etc/yp.conf</pre></div></div>

<p>Adjust <code>/var/yp/securenets</code> on the KDC server for additional security:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# echo &quot;255.0.0.0 127.0.0.0&quot; &gt;&gt; /var/yp/securenets
[root@kdc ~]# echo &quot;255.255.255.0 192.168.250.0&quot; &gt;&gt; /var/yp/securenets</pre></div></div>

<p>Start the NIS server and generate the NIS maps:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# /etc/init.d/ypserv start; chkconfig ypserv on
[root@kdc ~]# make -C /var/yp</pre></div></div>

<p>I usually like to prepare my iptables rules ahead of time so I ensure that it doesn't derail me later on.  Paste this into the KDC's terminal:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">iptables -N SERVICES
iptables -I INPUT -j SERVICES
iptables -A SERVICES -p tcp --dport 111 -j ACCEPT -m comment --comment &quot;rpc&quot;
iptables -A SERVICES -p udp --dport 111 -j ACCEPT -m comment --comment &quot;rpc&quot;
iptables -A SERVICES -p tcp --dport 808 -j ACCEPT -m comment --comment &quot;nis&quot;
iptables -A SERVICES -p udp --dport 808 -j ACCEPT -m comment --comment &quot;nis&quot;
iptables -A SERVICES -p tcp --dport 88 -j ACCEPT -m comment --comment &quot;kerberos&quot;
iptables -A SERVICES -p udp --dport 88 -j ACCEPT -m comment --comment &quot;kerberos&quot;
iptables -A SERVICES -p udp --dport 464 -j ACCEPT -m comment --comment &quot;kerberos&quot;
iptables -A SERVICES -p tcp --dport 749 -j ACCEPT -m comment --comment &quot;kerberos&quot;
/etc/init.d/iptables save</pre></div></div>

<p>We need our time in sync for Kerberos to work properly.  Install NTP on both nodes, start it, and ensure it comes up at boot time:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# yum -y install ntp &amp;&amp; chkconfig ntpd on &amp;&amp; /etc/init.d/ntpd start
[root@client ~]# yum -y install ntp &amp;&amp; chkconfig ntpd on &amp;&amp; /etc/init.d/ntpd start</pre></div></div>

<p>Now we're ready to set up Kerberos.  Start by installing some packages on the KDC:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# yum install krb5-server krb5-workstation</pre></div></div>

<p>We will need to make some edits to <code>/etc/krb5.conf</code> on the KDC to set up our KDC realm.  Ensure that the <code>default_realm</code> is set:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">default_realm = EXAMPLE.COM</pre></div></div>

<p>The <code>[realms]</code> section should look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[realms]
EXAMPLE.COM = {
	kdc = 192.168.250.2:88
	admin_server = 192.168.250.2:749
}</pre></div></div>

<p>The <code>[domain_realm]</code> section should look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[domain_realm]
kdc.example.com = EXAMPLE.COM
client.example.com = EXAMPLE.COM</pre></div></div>

<p>Add <code>validate = true</code> within the <code>pam { }</code> block of the <code>[appdefaults]</code> section:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[appdefaults]
 pam = {
   validate = true</pre></div></div>

<p>Adjust <code>/var/kerberos/krb5kdc/kdc.conf</code> on the KDC:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[realms]
EXAMPLE.COM = {
	master_key_type = des-hmac-sha1
	default_principal_flags = +preauth
}</pre></div></div>

<p>There's one last configuration file to edit on the KDC!  Ensure that <code>/var/kerberos/krb5kdc/kadm5.acl</code> looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">*/admin@EXAMPLE.COM	    *</pre></div></div>

<p>We're now ready to make a KDC database to hold our sensitive Kerberos data.  Create the database and set a good password which you can remember.  This command also stashes your password on the KDC so you don't have to enter it each time you start the KDC:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">kdb5_util create -r EXAMPLE.COM -s</pre></div></div>

<p>On the KDC, create a principal for the admin user as well as user1 (which we'll create shortly).  Also, export the admin details to the kadmind key tab.  You'll get some extra output after each one of these commands but I've snipped it to reduce the length of the post.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# kadmin.local
kadmin.local:  addprinc root/admin
kadmin.local:  addprinc user1
kadmin.local:  ktadd -k /var/kerberos/krb5kdc/kadm5.keytab kadmin/admin
kadmin.local:  ktadd -k /var/kerberos/krb5kdc/kadm5.keytab kadmin/changepw
kadmin.local:  exit</pre></div></div>

<p>Let's start the Kerberos KDC and kadmin daemons:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# /etc/init.d/krb5kdc start; /etc/init.d/kadmin start
[root@kdc ~]# chkconfig krb5kdc on; chkconfig kadmin on</pre></div></div>

<p>Now that the administration work is done, let's create a principal for our KDC server and stick it in it's keytab:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# kadmin.local
kadmin.local:  addprinc -randkey host/kdc.example.com
kadmin.local:  ktadd host/kdc.example.com</pre></div></div>

<p>Transfer your <code>/etc/krb5.conf</code> from the KDC server to the client.  Hop onto the client server, install the Kerberos client package and add some host principals:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@client ~]# yum install krb5-workstation
[root@client ~]# kadmin.local
kadmin.local:  addpinc --randkey host/client.example.com
kadmin.local:  ktadd host/kdc.example.com</pre></div></div>

<p>There aren't any daemons on the client side, so the configuration is pretty much wrapped up there for Kerberos.  However, we now need to tell both servers to use Kerberos for auth and your client servers needs to use NIS to get user data.</p>
<ul>
<li>On the KDC:
<ul>
<li>run <code>authconfig-tui</code></li>
<li>choose <b>Use Kerberos</b> from the second column</li>
<li>press <b>Next</b></li>
<li>don't edit the configuration (authconfig got the data from <code>/etc/krb.conf</code>)</li>
<li>press <b>OK</b></li>
</ul>
</li>
<li>On the client:
<ul>
<li>run <code>authconfig-tui</code></li>
<li>choose <b>Use NIS</b> and <b>Use Kerberos</b></li>
<li>press <b>Next</b></li>
<li>enter your NIS domain (EXAMPLE.COM) and NIS server (kdc.example.com or 192.168.250.2)</li>
<li>press <b>Next</b></li>
<li>don't edit the Kerberos configuration (authconfig got the data from <code>/etc/krb.conf</code>)</li>
<li>press <b>OK</b></li>
</ul>
</li>
</ul>
<p><b>Got NIS problems?</b>  If the NIS connection stalls on the client, ensure that you have the iptables rules present on the KDC that we added near the beginning of this guide.  Also, if you forgot to add <b>both</b> hosts to <b>both</b> servers' <code>/etc/hosts</code>, go do that now.</p>
<p>Let's make our test user on the KDC.  <b>Don't add this user to the client</b> -- we'll get the user information via NIS and authenticate via Kerberos shortly.  We'll also rebuild our NIS maps after adding the user:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# useradd user1
[root@kdc ~]# passwd user1
[root@kdc ~]# make -C /var/yp/</pre></div></div>

<p>On the client, see if you can get the password hash for the user1 account via NIS:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@client ~]# ypcat -d EXAMPLE.COM -h kdc.example.com passwd | grep user1
user1:$1$sUlSTlCv$riK5El3z8N4y.mi5Fe3Q60:500:500::/home/user1:/bin/bash</pre></div></div>

<p>You can see why NIS isn't a good way to authenticate users.  Someone could easily pull the hash for any account and brute force the hash on their own server.  Go back to the KDC and lock out the user account:</p>
<pre>
[root@kdc ~]# usermod -p '!!' user1
</pre>
<p>Go back to the client and try to pull the password hash now:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@client ~]# ypcat -d EXAMPLE.COM -h kdc.example.com passwd | grep user1
user1:!!:500:500::/home/user1:/bin/bash</pre></div></div>

<p>On the plus side, the user's password hash is now gone.  On the negative side, you've just prevented this user from logging in locally or via NIS. Don't worry, the user can log in via Kerberos now.  Let's prepare a home directory on the client for the user:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@client ~]# mkdir /home/user1
[root@client ~]# cp -av /etc/skel/.bash* /home/user1/
[root@client ~]# chown -R user1:user1 /home/user1/</pre></div></div>

<p>Note: In a real-world scenario, you'd probably want to export this user's home directory via NFS so they didn't get a different home directory on every server.</p>
<p>While you're still on the client, try to log into the client via the user.  Use the password that you used when you created the user1 principal on the KDC.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@client ~]# ssh user1@localhost
user1@localhost's password:
[user1@client ~]$ whoami
user1</pre></div></div>

<p>List your Kerberos tickets and you should see one for your user principal:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[user1@client ~]$ klist
Ticket cache: FILE:/tmp/krb5cc_500_fCKPnZ
Default principal: user1@EXAMPLE.COM
&nbsp;
Valid starting     Expires            Service principal
02/05/12 14:18:53  02/06/12 00:18:53  krbtgt/EXAMPLE.COM@EXAMPLE.COM
	renew until 02/05/12 14:18:53</pre></div></div>

<p>Your KDC should have a couple of lines in its <code>/var/log/krb5kdc.log</code> showing the authentication:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Feb 05 14:18:53 kdc.example.com krb5kdc[4694](info): AS_REQ (12 etypes {18 17 16 23 1 3 2 11 10 15 12 13}) 192.168.250.3: ISSUE: authtime 1328473133, etypes {rep=16 tkt=16 ses=16}, user1@EXAMPLE.COM for krbtgt/EXAMPLE.COM@EXAMPLE.COM
Feb 05 14:18:53 kdc.example.com krb5kdc[4694](info): TGS_REQ (7 etypes {18 17 16 23 1 3 2}) 192.168.250.3: ISSUE: authtime 1328473133, etypes {rep=16 tkt=18 ses=18}, user1@EXAMPLE.COM for host/client.example.com@EXAMPLE.COM</pre></div></div>

<p>The first line shows that the client asked for a Authentication Server Request (AS_REQ) and the second line shows that the client then asked for a Ticket Granting Server Request (TGS_REQ).  In layman's terms, the client first asked for a ticket-granting ticket (TGT) so it could authenticate to other services.  When it actually tried to log in via <code>ssh</code> it asked for a ticket (and received it).</p>
<p><b>YOU JUST CONFIGURED KERBEROS!</b></p>
<p>From here, the sky's the limit.  Another popular implementation of Kerberos is encrypted NFSv4.  You can even go crazy and use <a href="http://wiki.centos.org/HowTos/HttpKerberosAuth">Kerberos with apache</a>.</p>
<p>Let me know if you have any questions about this post or if you spot any errors.  With this many steps, there's bound to be a typo or two in this guide.  Keep in mind that there are some obvious spots for network-level and service-level security improvements.  This guide was intended to give you the basics and it doesn't cover all of the security implications involved with a Kerberos implementation.</p>
<p><a href="http://rackerhacker.com/2012/02/05/the-kerberos-haters-guide-to-installing-kerberos/">The Kerberos-hater's guide to installing Kerberos</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/02/05/the-kerberos-haters-guide-to-installing-kerberos/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Get notifications instead of automatic updates in Scientific Linux</title>
		<link>http://rackerhacker.com/2012/02/04/get-notifications-instead-of-automatic-updates-in-scientific-linux/</link>
		<comments>http://rackerhacker.com/2012/02/04/get-notifications-instead-of-automatic-updates-in-scientific-linux/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 19:01:54 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[scientific linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2928</guid>
		<description><![CDATA[Scientific Linux installations have a package called yum-autoupdate by default and the package contains two files: # rpm -ql yum-autoupdate /etc/cron.daily/yum-autoupdate /etc/sysconfig/yum-autoupdate The cron job contains the entire script to run automatic updates once a day and the configuration file controls its behavior. However, you can't get the same functionality as Fedora's yum-updatesd package where [...]<p><a href="http://rackerhacker.com/2012/02/04/get-notifications-instead-of-automatic-updates-in-scientific-linux/">Get notifications instead of automatic updates in Scientific Linux</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Scientific Linux installations have a package called <code>yum-autoupdate</code> by default and the package contains two files:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># rpm -ql yum-autoupdate
/etc/cron.daily/yum-autoupdate
/etc/sysconfig/yum-autoupdate</pre></div></div>

<p>The cron job contains the entire script to run automatic updates once a day and the configuration file controls its behavior.  However, you can't get the same functionality as Fedora's <code>yum-updatesd</code> package where you can receive notifications for updates rather than automatically updating the packages.</p>
<p>To get those notifications in Scientific Linux, just make two small edits to this portion of <code>/etc/cron.daily/yum-autoupdate</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">173</span>           <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;    Starting Yum with command&quot;</span>
<span style="color: #000000;">174</span>           <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;     /usr/bin/yum -c <span style="color: #007800;">$TEMPCONFIGFILE</span> -e 0 -d 1 -y update&quot;</span>         
<span style="color: #000000;">175</span>   <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000;">176</span>   <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>yum <span style="color: #660033;">-c</span> <span style="color: #007800;">$TEMPCONFIGFILE</span> <span style="color: #660033;">-e</span> <span style="color: #000000;">0</span> <span style="color: #660033;">-d</span> <span style="color: #000000;">1</span> <span style="color: #660033;">-y</span> update <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$TEMPFILE</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span>
<span style="color: #000000;">177</span>   <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-s</span> <span style="color: #007800;">$TEMPFILE</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span></pre></div></div>

<p>Adjust the <code>update</code> commands to look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">173</span>           <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;    Starting Yum with command&quot;</span>
<span style="color: #000000;">174</span>           <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;     /usr/bin/yum -c <span style="color: #007800;">$TEMPCONFIGFILE</span> -e 0 -d 1 -y check-update&quot;</span>         
<span style="color: #000000;">175</span>   <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000;">176</span>   <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>yum <span style="color: #660033;">-c</span> <span style="color: #007800;">$TEMPCONFIGFILE</span> <span style="color: #660033;">-e</span> <span style="color: #000000;">0</span> <span style="color: #660033;">-d</span> <span style="color: #000000;">1</span> <span style="color: #660033;">-y</span> check-update <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$TEMPFILE</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span>
<span style="color: #000000;">177</span>   <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-s</span> <span style="color: #007800;">$TEMPFILE</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span></pre></div></div>

<p>Since you won't be auto-updating with this script any longer, you may want to comment out the <code>EXCLUDE=</code> line in <code>/etc/sysconfig/yum-autoupdate</code> so that you'll receive notifications for all packages with updates.  Also, to avoid having your changes updated with a newer <code>yum-autoupdate</code> package later, add the package to your list of excluded packages in <code>/etc/yum.conf</code>.</p>
<p><a href="http://rackerhacker.com/2012/02/04/get-notifications-instead-of-automatic-updates-in-scientific-linux/">Get notifications instead of automatic updates in Scientific Linux</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/02/04/get-notifications-instead-of-automatic-updates-in-scientific-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kerberos for haters</title>
		<link>http://rackerhacker.com/2012/02/02/kerberos-for-haters/</link>
		<comments>http://rackerhacker.com/2012/02/02/kerberos-for-haters/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 04:29:32 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[kerberos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[rhca]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2906</guid>
		<description><![CDATA[I'll be the first one to admit that Kerberos drives me a little insane. It's a requirement for two of the exams in Red Hat's RHCA certification track and I've been forced to learn it. It provides some pretty nice security features for large server environments. You get central single sign ons, encrypted authentication, and [...]<p><a href="http://rackerhacker.com/2012/02/02/kerberos-for-haters/">Kerberos for haters</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I'll be the first one to admit that Kerberos drives me a little insane.  It's a requirement for two of the exams in <a href="http://www.redhat.com/training/certifications/rhca/">Red Hat's RHCA certification track</a> and I've been forced to learn it.  It provides some pretty nice security features for large server environments.  You get central single sign ons, encrypted authentication, and bidirectional validation.  However, getting it configured can be a real pain due to some rather archaic commands and shells.</p>
<p>Here's Kerberos in a nutshell within a two-server environment:  One server is a Kerberos key distribution center (KDC) and the other is a Kerberos client.  The KDC has the list of users and their passwords.  Consider a situation where a user tries to ssh into the Kerberos client:</p>
<ul>
<li>sshd calls to pam to authenticate the user</li>
<li>pam calls to the KDC for a ticket granting ticket (TGT) to see if the user can authenticate</li>
<li>the KDC replies to the client with a TGT encrypted with the user's password</li>
<li>pam (on the client) tries to decrypt the TGT with the password that the user provided via ssh</li>
<li>if pam can decrypt the TGT, it knows the user is providing the right password</li>
</ul>
<p>Now that the client has a a TGT for that user, it can ask for tickets to access other network services.  What if the user who just logged in wants to access another Kerberized service in the environment?</p>
<ul>
<li>client calls the KDC and asks for a ticket to grant access to the other service</li>
<li>KDC replies with two copies of the ticket:
<ul>
<li>one copy is encrypted with the user's current TGT</li>
<li>a second copy is encrypted with the password of the network service the user wants to access</li>
</ul>
</li>
<li>the client can decrypt the ticket which was encrypted with the current TGT since it has the TGT already</li>
<li>client makes an authenticator by taking the decrypted ticket and encrypting it with a timestamp</li>
<li>client passes the authenticator and the second copy of the ticket it received from the KDC</li>
<li>the other network service decrypts the second copy of the ticket and verifies the password</li>
<li>the other network service uses the decrypted ticket to decrypt the authenticator it received from the client</li>
<li>if the timestamp looks good, the other network service allows the user access</li>
</ul>
<p>Okay, that's confusing.  Let's take it one step further.  Enabling pre-authentication requires that clients send a request containing a timestamp encrypted with the user's password prior to asking for a TGT.  Without this requirement, an attacker can ask for a TGT one time and then brute force the TGT offline.  Pre-authentication forces the client to send a timestamped request encrypted with the user's password back to the KDC before they can ask for a KDC.  This means the attacker is forced to try different passwords when encrypting the timestamp in the hopes that they'll get a TGT to work with eventually.  One would hope that you have something configured on the KDC to set off an alarm for multiple failed pre-authentication attempts.</p>
<p>Oh, but we can totally kick it up another notch.  What if an attacker is able to give a bad password to a client but they're also able to impersonate the KDC?  They could reply to the TGT request (as the KDC) with a TGT encrypted with whichever password they choose and get access to the client system.  Enabling mutual authentication stops this attack since it forces the client to ask the KDC for the client's own host principal password (this password is set when the client is configured to talk to the KDC).  The attacker shouldn't have any clue what that password is and the attack will be thwarted.</p>
<p>By this point, you're either saying "Oh man, I don't ever want to do this." or "How do I set up Kerberos?".  Stay tuned if you're in the second group.  I'll have a dead simple (or as close to dead simple as one can get with Kerberos) how-to on the blog shortly.</p>
<p>In the meantime, here are a few links for extra Kerberos bedtime reading:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Kerberos_(protocol)">Kerberos on Wikipedia</a></li>
<li><a href="http://www.kerberos.org/software/whykerberos.pdf">MIT's "Why Kerberos"</a> [PDF]</li>
<li><a href="http://learn-networking.com/network-security/how-kerberos-authentication-works">How Kerberos Authentication Works</a></li>
</ul>
<p><a href="http://rackerhacker.com/2012/02/02/kerberos-for-haters/">Kerberos for haters</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/02/02/kerberos-for-haters/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Getting started with SELinux</title>
		<link>http://rackerhacker.com/2012/01/25/getting-started-with-selinux/</link>
		<comments>http://rackerhacker.com/2012/01/25/getting-started-with-selinux/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 04:28:41 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[seliux]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2838</guid>
		<description><![CDATA[I used to be one of those folks who would install Fedora, CentOS, Scientific Linux, or Red Hat and disable SELinux during the installation. It always seemed like SELinux would get in my way and keep me from getting work done. Later on, I found that one of my servers (which I'd previously secured quite [...]<p><a href="http://rackerhacker.com/2012/01/25/getting-started-with-selinux/">Getting started with SELinux</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I used to be one of those folks who would install Fedora, CentOS, Scientific Linux, or Red Hat and disable SELinux during the installation.  It always seemed like SELinux would get in my way and keep me from getting work done.  </p>
<p>Later on, I found that one of my servers (which I'd previously secured quite thoroughly) had some rogue processes running that were spawned through httpd.  Had I actually been using SELinux in enforcing mode, those processes would have probably never even started.</p>
<p>If you're trying to get started with SELinux but you're not sure how to do it without completely disrupting your server's workflow, these tips should help:</p>
<p><b>Get some good reporting and monitoring</b><br />
Two of the most handy SELinux tools are <a href="https://fedorahosted.org/setroubleshoot/">setroubleshoot and setroubleshoot-server</a>.  If you're running a server without X, you can use <a href="/2011/09/15/receive-e-mail-reports-for-selinux-avc-denials/">my guide for configuring setroubleshoot-server</a>.  You will receive email alerts within seconds of an AVC denial and the emails should contain tips on how to resolve the denial if the original action should be allowed.  If the AVC denial caught something you didn't expect, you'll know about the potential security breach almost immediately.</p>
<p><b>Start out with SELinux in permissive mode</b><br />
If you're overly concerned about SELinux getting in your way, or if you're enabling SELinux on a server that has been running without SELinux since it was installed, start out with SELinux in permissive mode.  To make the change effective immediately, just run:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># setenforce 0
# getenforce
Permissive</pre></div></div>

<p>Edit <code>/etc/sysconfig/selinux</code> to make it persistent across reboots:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=permissive</pre></div></div>

<p><b>Adjust booleans before adding your own custom modules</b><br />
There are a lot of booleans you can toggle to get the functionality you need without adding your own custom SELinux modules with <code>audit2allow</code>.  If you wanted to see all of the applicable booleans for <code>httpd</code>, just use <code>getsebool</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># getsebool -a | grep httpd
httpd_builtin_scripting --&gt; on
httpd_can_check_spam --&gt; off
httpd_can_network_connect --&gt; on
httpd_can_network_connect_cobbler --&gt; off
httpd_can_network_connect_db --&gt; off
httpd_can_network_memcache --&gt; off
httpd_can_network_relay --&gt; on
httpd_can_sendmail --&gt; on
... and so on ...</pre></div></div>

<p>Toggling booleans is easy with <code>togglesebool</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># togglesebool httpd_can_network_memcache
httpd_can_network_memcache: active</pre></div></div>

<p>Now <code>httpd</code> can talk to <code>memcache</code>.  You can also use <code>setsebool</code> if you want to be specific about your setting (this is good for scripts):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># setsebool httpd_can_network_memcache on</pre></div></div>

<p><b>Tracking your history of AVC denials</b><br />
All of your AVC denals are logged by <code>auditd</code> in <code>/var/log/audit/audit.log</code> but it's not the easiest file to read and parse.  That's where <code>aureport</code> comes in:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># aureport --avc | tail -n 5
45. 01/24/2012 04:23:29 postdrop unconfined_u:system_r:httpd_t:s0 4 fifo_file getattr system_u:object_r:postfix_public_t:s0 denied 1061
46. 01/24/2012 04:23:29 postdrop unconfined_u:system_r:httpd_t:s0 2 fifo_file write system_u:object_r:postfix_public_t:s0 denied 1062
47. 01/24/2012 04:23:29 postdrop unconfined_u:system_r:httpd_t:s0 2 fifo_file open system_u:object_r:postfix_public_t:s0 denied 1062
48. 01/24/2012 14:01:58 sendmail unconfined_u:system_r:httpd_t:s0 160 process setrlimit unconfined_u:system_r:httpd_t:s0 denied 1123
49. 01/24/2012 14:01:58 postdrop unconfined_u:system_r:httpd_t:s0 4 dir search system_u:object_r:postfix_public_t:s0 denied 1124</pre></div></div>

<p><b>Summary</b><br />
There's no need to be scared of or be annoyed by SELinux in your server environment.  While it takes some getting used to (and what new software doesn't?), you'll have an extra layer of security and access restrictions which should let you sleep a little better at night.</p>
<p><a href="http://rackerhacker.com/2012/01/25/getting-started-with-selinux/">Getting started with SELinux</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/01/25/getting-started-with-selinux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SELinux and .forward files</title>
		<link>http://rackerhacker.com/2012/01/02/selinux-and-forward-files/</link>
		<comments>http://rackerhacker.com/2012/01/02/selinux-and-forward-files/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 22:44:43 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2680</guid>
		<description><![CDATA[If you want to forward e-mail from root to another user, you can usually place a .forward file in root's home directory and your mail server will take care of the rest: echo &#34;user@example.com&#34; &#62; /root/.forward With SELinux, you'll end up getting an AVC denial each time your mail server tries to read the contents [...]<p><a href="http://rackerhacker.com/2012/01/02/selinux-and-forward-files/">SELinux and .forward files</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>If you want to forward e-mail from root to another user, you can usually place a <code>.forward</code> file in root's home directory and your mail server will take care of the rest:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">echo &quot;user@example.com&quot; &gt; /root/.forward</pre></div></div>

<p>With SELinux, you'll end up getting an AVC denial each time your mail server tries to read the contents of the <code>.forward</code> file:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">type=AVC msg=audit(1325543823.787:7416): avc:  denied  { open } for  pid=9850 
  comm=&quot;local&quot; name=&quot;.forward&quot; dev=md0 ino=17694734 
  scontext=system_u:system_r:postfix_local_t:s0 
  tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=file</pre></div></div>

<p>The reason is that your <code>.forward</code> file doesn't have the right SELinux contexts.  You can set the correct contest quickly with <code>restorecon</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># ls -Z /root/.forward 
-rw-r--r--. root root unconfined_u:object_r:admin_home_t:s0 /root/.forward
# restorecon -v /root/.forward
restorecon reset /root/.forward context unconfined_u:object_r:admin_home_t:s0-&gt;system_u:object_r:mail_forward_t:s0
# ls -Z /root/.forward 
-rw-r--r--. root root system_u:object_r:mail_home_t:s0 /root/.forward</pre></div></div>

<p>Try to send another e-mail to root and you should see the mail server forward the e-mail properly without any additional AVC denials.</p>
<p><a href="http://rackerhacker.com/2012/01/02/selinux-and-forward-files/">SELinux and .forward files</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/01/02/selinux-and-forward-files/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Live upgrade Fedora 15 to Fedora 16 using yum</title>
		<link>http://rackerhacker.com/2011/11/14/live-upgrading-fedora-15-to-fedora-16-using-yum/</link>
		<comments>http://rackerhacker.com/2011/11/14/live-upgrading-fedora-15-to-fedora-16-using-yum/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 04:37:39 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[preupgrade]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[scientific linux]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2623</guid>
		<description><![CDATA[Before we get started, I really ought to drop this here: Upgrading Fedora via yum is not the recommended method. Your first choice for upgrading Fedora should be to use preupgrade. Seriously. This begs the question: When should you use another method to upgrade Fedora? What other methods are there? You have a few other [...]<p><a href="http://rackerhacker.com/2011/11/14/live-upgrading-fedora-15-to-fedora-16-using-yum/">Live upgrade Fedora 15 to Fedora 16 using yum</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Before we get started, I really ought to drop this here:</p>
<blockquote style="color: red; font-weight: bold;"><p>Upgrading Fedora via yum is <u>not</u> the recommended method.  Your first choice for upgrading Fedora should be to use <code>preupgrade</code>.  Seriously.</p></blockquote>
<p><a href="http://rackerhacker.com/wp-content/uploads/2011/11/Logo_fedoralogo.png"><img src="http://rackerhacker.com/wp-content/uploads/2011/11/Logo_fedoralogo-300x91.png" alt="" title="Logo_fedoralogo" width="300" height="91" class="alignright size-medium wp-image-2662" /></a>This begs the question: <em>When should you use another method to upgrade Fedora? What other methods are there?</em></p>
<p>You have a few other methods to get the upgrade done:</p>
<ul>
<li><strong>Toss in a CD or DVD:</strong> You can upgrade via the anaconda installer provided on the CD, DVD or netinstall media.  My experiences with this method for Fedora (as well as CentOS, Scientific Linux, and Red Hat) haven't been too positive, but your results may vary.</li>
<li><strong>Download the newer release's fedora-release RPM, install it with <code>rpm</code>, and <code>yum upgrade</code>:</strong> This is the really old way of doing things.  Don't try this (read the next bullet).</li>
<li><strong>Use <code>yum</code>'s distro-sync functionality:</strong> If you can't go the <code>preupgrade</code> route, I'd recommend giving this a try.  However, leave plenty of time to fix small glitches after it's done (and after your first reboot).</li>
</ul>
<p><strong>Personal anecdote time</strong> <em>(Keep scrolling for the meat and potatoes)</em><br />
I have a dedicated server at <a href="http://joesdatacenter.com/">Joe's Datacenter</a> (love those folks) with IPMI and KVM-over-LAN access.  The <code>preupgrade</code> method won't work for me because my <code>/boot</code> partition is on a software RAID volume.  There's a <a href="https://bugzilla.redhat.com/show_bug.cgi?id=504826">rat's nest of a Bugzilla ticket</a> over on Red Hat's site about this problem.  I'm really only left with a live upgrade using <code>yum</code>.</p>
<p><strong>Live <code>yum</code> upgrade process</strong><br />
Before even beginning the upgrade, I double-checked that I'd applied all of the available updates for my server.  Once that was done, I realized I was one kernel revision behind and I rebooted to ensure I was in the latest Fedora 15 kernel.</p>
<p>A good practice here is to run <code>package-cleanup --orphans</code> (it's in the <code>yum-utils</code> package) to find any packages which don't exist on any Fedora mirrors.  In my case, I had two old kernels and a JungleDisk package.  I removed the two old kernels (probably wasn't necessary) and left JungleDisk alone (it worked fine after the upgrade).  If you have any external repositories, such as Livna or RPMForge, you may want to disable those until the upgrade is done.  Should the initial upgrade checks bomb out, try adding as few repositories back in as possible to see if it clears up the problem.</p>
<p>Once you make it this far, just follow the instructions available in Fedora's documentation: <a href="http://fedoraproject.org/wiki/Upgrading_Fedora_using_yum#Fedora_15_-.3E_Fedora_16">Upgrading Fedora using yum</a>.  I set SELinux to permissive mode during the upgrade just in case it caused problems.</p>
<p>I'd recommend skipping the <code>grub2-install</code> portion since your original grub installation will still be present after the upgrade.  If your server has EFI (not BIOS), <b>don't use</b> <code>grub2</code> yet.  Keep an eye on the previously mentioned documentation page to see if the problems get ironed out between <code>grub2</code> and EFI.</p>
<p><b>Before you reboot,</b> be sure to get a list of your active processes and daemons.  After your reboot, some old SysVinit scripts will be converted into Systemd service scripts.  They might not start automatically and you might need to enable and/or start some services.</p>
<p>New to Systemd? This will be an extremely handy resource: <a href="http://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet">SysVinit to Systemd Cheatsheet</a>.</p>
<p>I haven't seen too many issues after cleaning up some daemons that didn't start properly.  There is a problem between <code>asterisk</code> and SELinux that I haven't nailed down yet but it's not a showstopper.</p>
<p>Good luck during your upgrades.  Keep in mind that Fedora 15 could be EOL'd as early as May or June 20102 when Fedora 17 is released.</p>
<p><a href="http://rackerhacker.com/2011/11/14/live-upgrading-fedora-15-to-fedora-16-using-yum/">Live upgrade Fedora 15 to Fedora 16 using yum</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/11/14/live-upgrading-fedora-15-to-fedora-16-using-yum/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting back to using eth0 in Fedora 15</title>
		<link>http://rackerhacker.com/2011/09/25/getting-back-to-using-eth0-in-fedora-15/</link>
		<comments>http://rackerhacker.com/2011/09/25/getting-back-to-using-eth0-in-fedora-15/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 22:08:20 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2568</guid>
		<description><![CDATA[Fedora 15 was released with some updates to allow for consistent network device names. Once it's installed, you'll end up with network devices that are named something other than eth0, eth1, and so on. For example, all onboard ethernet adapters are labeled as emX (em1, em2...) and all PCI ethernet adapters are labeled as pXpX [...]<p><a href="http://rackerhacker.com/2011/09/25/getting-back-to-using-eth0-in-fedora-15/">Getting back to using eth0 in Fedora 15</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Fedora 15 was released with some updates to allow for <a href="http://fedoraproject.org/wiki/Features/ConsistentNetworkDeviceNaming">consistent network device names</a>.  Once it's installed, you'll end up with network devices that are named something other than eth0, eth1, and so on.</p>
<p>For example, all onboard ethernet adapters are labeled as emX (em1, em2...) and all PCI ethernet adapters are labeled as pXpX (p[slot]p[port], like p7p1 for port 1 on slot 7).  Ethernet devices within Xen virtual machines aren't adjusted.</p>
<p>This may make sense to people who swap out the chassis on servers regularly and they don't want to mess with hard-coding MAC addresses in network configuration files.  Also, it should give users predictable names even if a running system's drives are inserted into a newer hardware revision of the same server.</p>
<p>However, I don't like this on my personal dedicated servers and I prefer to revert back to the old way of doing things.  Getting back to eth0 is pretty simple and it only requires a few configuration files to be edited followed by a reboot.</p>
<p>First, add <code>biosdevname=0</code> to your <code>grub.conf</code> on the kernel line:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">title Fedora (2.6.40.4-5.fc15.x86_64)
	root (hd0,0)
	kernel /boot/vmlinuz-2.6.40.4-5.fc15.x86_64 ro root=/dev/md0 SYSFONT=latarcyrheb-sun16 KEYTABLE=us biosdevname=0 quiet LANG=en_US.UTF-8
	initrd /boot/initramfs-2.6.40.4-5.fc15.x86_64.img</pre></div></div>

<p>Open <code>/etc/udev/rules.d/70-persistent-net.rules</code> in your favorite text editor (create it if it doesn't exist) and add in the following:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># Be sure to put your MAC addresses in the fields below
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;00:11:22:33:44:10&quot;, ATTR{dev_id}==&quot;0x0&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth0&quot;
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;00:11:22:33:44:11&quot;, ATTR{dev_id}==&quot;0x0&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth1&quot;</pre></div></div>

<p>Be sure to rename your <code>ifcfg-*</code> files in <code>/etc/sysconfig/network-scripts/</code> to match the device names you've assigned.  Just for good measure, I add in the MAC address in <code>/etc/sysconfig/network-scripts/ifcfg-ethX</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">...
HWADDR=00:11:22:33:44:10
...</pre></div></div>

<p>Reboot the server and you should be back to eth0 and eth1 after a reboot.</p>
<p><a href="http://rackerhacker.com/2011/09/25/getting-back-to-using-eth0-in-fedora-15/">Getting back to using eth0 in Fedora 15</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/09/25/getting-back-to-using-eth0-in-fedora-15/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Receive e-mail reports for SELinux AVC denials</title>
		<link>http://rackerhacker.com/2011/09/15/receive-e-mail-reports-for-selinux-avc-denials/</link>
		<comments>http://rackerhacker.com/2011/09/15/receive-e-mail-reports-for-selinux-avc-denials/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 04:17:04 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[messagebus]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[systemd]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2537</guid>
		<description><![CDATA[SELinux isn't a technology that's easy to tackle for newcomers. However, there's been a lot of work to smooth out the rough edges while still keeping a tight grip on what applications and users are allowed to do on a Linux system. One of the biggest efforts has been around setroubleshoot. The purpose behind setroubleshoot [...]<p><a href="http://rackerhacker.com/2011/09/15/receive-e-mail-reports-for-selinux-avc-denials/">Receive e-mail reports for SELinux AVC denials</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>SELinux isn't a technology that's easy to tackle for newcomers.  However, there's been a lot of work to smooth out the rough edges while still keeping a tight grip on what applications and users are allowed to do on a Linux system.  One of the biggest efforts has been around <a href="https://fedorahosted.org/setroubleshoot/wiki/SETroubleShoot%20Overview">setroubleshoot</a>.</p>
<p>The purpose behind setroubleshoot is to let users know when access has been denied, help them resolve it if necessary, and to reduce overall frustration while working through tight security restrictions in the default SELinux policies.  The GUI frontend for setroubleshoot is great for users who run Linux desktops or those who run servers with a display attached.  Don't worry, you can configure setroubleshoot on remote servers to send alerts elsewhere when a GUI alert isn't an option.</p>
<p>Install a few packages to get started:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum install setroubleshoot{-server,-plugins,-doc}</pre></div></div>

<p>Open <code>/etc/setroubleshoot/setroubleshoot.conf</code> in your favorite text editor and adjust the <code>[email]</code> section to fit your server:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">recipients_filepath = /var/lib/setroubleshoot/email_alert_recipients
smtp_port = 25
smtp_host = localhost
from_address = selinux@myserver.com
subject = [MyServer] SELinux AVC Alert</pre></div></div>

<p>You could probably see it coming, but you need to put the e-mail addresses for your recipients into <code>/var/lib/setroubleshoot/email_alert_recipients</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">echo &quot;selinux@mycompany.com&quot; &gt;&gt; /var/lib/setroubleshoot/email_alert_recipients</pre></div></div>

<p>You'll notice that setroubleshoot doesn't have an init script and it doesn't exist in systemd in Fedora 15.  It runs through the <a href="http://en.wikipedia.org/wiki/D-Bus">dbus-daemon</a> and a quick bounce of the messagebus via its init script brings in the necessary components to run setroubleshoot:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">service messagebus restart</pre></div></div>

<p>A really easy (and safe) test is to ask sshd to bind to a non-standard port.  Simply define an additional port on in your <code>/etc/ssh/sshd_config</code> like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Port 22
Port 222</pre></div></div>

<p>When you restart sshd, it will bind to port 22 with success, but it won't be allowed to bind to port 222 (since that's blocked by SELinux as a non-standard port for the <code>ssh_port_t</code> port type).  <strong>DON'T WORRY!</strong> Your sshd server will still be listening on port 22.  If you wait a moment, you'll get an e-mail (perhaps two) that not only notify you of the denial, but they make suggestions for how to fix it:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">SELinux is preventing /usr/sbin/sshd from name_bind access on the tcp_socket port 222.
&nbsp;
*****  Plugin bind_ports (99.5 confidence) suggests  *************************
&nbsp;
If you want to allow /usr/sbin/sshd to bind to network port 222
Then you need to modify the port type.
Do
# semanage port -a -t PORT_TYPE -p tcp 222
   where PORT_TYPE is one of the following: ...</pre></div></div>

<p>For this particular example, the quick fix would be to run:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">semanage port -a -t ssh_port_t -p tcp 222</pre></div></div>

<hr />
<em><br />
Much of this post's information was gathered from the detailed documentation on <a href="http://fedoraproject.org/wiki/Docs/Drafts/SELinux/SETroubleShoot/UserFAQ">Fedora's setroubleshoot User's FAQ</a> as well as <a href="http://danwalsh.livejournal.com/20931.html">Dan Walsh's setroubleshoot blog post</a>.<br />
</em></p>
<p><a href="http://rackerhacker.com/2011/09/15/receive-e-mail-reports-for-selinux-avc-denials/">Receive e-mail reports for SELinux AVC denials</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/09/15/receive-e-mail-reports-for-selinux-avc-denials/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Getting apache, PHP, and memcached working with SELinux</title>
		<link>http://rackerhacker.com/2011/09/07/getting-apache-php-and-memcached-working-with-selinux/</link>
		<comments>http://rackerhacker.com/2011/09/07/getting-apache-php-and-memcached-working-with-selinux/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 03:55:00 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2516</guid>
		<description><![CDATA[I'm using SELinux more often now on my Fedora 15 installations and I came up against a peculiar issue today on a new server. My PHP installation is configured to store its sessions in memcached and I brought over some working configurations from another server. However, each time I accessed a page which tried to [...]<p><a href="http://rackerhacker.com/2011/09/07/getting-apache-php-and-memcached-working-with-selinux/">Getting apache, PHP, and memcached working with SELinux</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://rackerhacker.com/wp-content/uploads/2011/09/selinux-penguin-125.png"><img src="http://rackerhacker.com/wp-content/uploads/2011/09/selinux-penguin-125.png" alt="SELinux Penguin" title="SELinux Penguin" width="125" height="113" class="alignright size-full wp-image-2532" /></a>I'm using SELinux more often now on my Fedora 15 installations and I came up against a peculiar issue today on a new server.  My PHP installation is configured to store its sessions in memcached and I brought over some working configurations from another server.  However, each time I accessed a page which tried to initiate a session, the page load would hang for about a minute and I'd find this in my apache error logs:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[Thu Sep 08 03:23:40 2011] [error] [client 11.22.33.44] PHP Warning:  
Unknown: Failed to write session data (memcached). Please verify that 
the current setting of session.save_path is correct (127.0.0.1:11211) 
in Unknown on line 0</pre></div></div>

<p>I ran through my usual list of checks:</p>
<ul>
<li>netstat showed memcached bound to the correct ports/interfaces</li>
<li>memcached was running and I could reach it via telnet</li>
<li>memcached-tool could connect and pull stats from memcached</li>
<li>double-checked my php.ini</li>
<li>tested memcached connectivity via a PHP and ruby script -- they worked</li>
</ul>
<p>Even after all that, I still couldn't figure out what was wrong.  I ran strace on memcached while I ran a curl against the page which creates a session and I found something significant -- memcached wasn't seeing any connections whatsoever at that time.  A quick check of the lo interface with tcpdump showed the same result.  Just before I threw a chair, I remembered one thing:</p>
<p><em>SELinux.</em></p>
<p>A quick check for AVC denials showed the problem:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># aureport --avc | tail -n 1
4021. 09/08/2011 03:23:38 httpd system_u:system_r:httpd_t:s0 42 tcp_socket name_connect system_u:object_r:memcache_port_t:s0 denied 31536</pre></div></div>

<p>I'm far from being a guru on SELinux, so I leaned on audit2allow for help:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># grep memcache /var/log/audit/audit.log | audit2allow
&nbsp;
#============= httpd_t ==============
#!!!! This avc can be allowed using one of the these booleans:
#     httpd_can_network_relay, httpd_can_network_memcache, httpd_can_network_connect
&nbsp;
allow httpd_t memcache_port_t:tcp_socket name_connect;</pre></div></div>

<p>The boolean we're looking for is <code>httpd_can_network_memcache</code>. Flipping the boolean can be done in a snap:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># setsebool -P httpd_can_network_memcache 1
# getsebool httpd_can_network_memcache
httpd_can_network_memcache --&gt; on</pre></div></div>

<p>After adjusting the boolean, apache was able to make connections to memcached without a hitch.  My page which created sessions loaded quickly and I could see data being stored in memcached.  If you want to check the status of all of the apache-related SELinux booleans, just use getsebool:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># getsebool -a | grep httpd | grep off$
allow_httpd_anon_write --&gt; off
allow_httpd_mod_auth_ntlm_winbind --&gt; off
allow_httpd_mod_auth_pam --&gt; off
allow_httpd_sys_script_anon_write --&gt; off
httpd_can_check_spam --&gt; off
httpd_can_network_connect_cobbler --&gt; off
httpd_can_network_connect_db --&gt; off
httpd_can_network_relay --&gt; off
httpd_can_sendmail --&gt; off
httpd_dbus_avahi --&gt; off
httpd_enable_ftp_server --&gt; off
httpd_enable_homedirs --&gt; off
httpd_execmem --&gt; off
httpd_read_user_content --&gt; off
httpd_setrlimit --&gt; off
httpd_ssi_exec --&gt; off
httpd_tmp_exec --&gt; off
httpd_unified --&gt; off
httpd_use_cifs --&gt; off
httpd_use_gpg --&gt; off
httpd_use_nfs --&gt; off</pre></div></div>

<p>If you're interested in SELinux, a good way to get your feet wet is to head over to the CentOS Wiki and review their <a href="http://wiki.centos.org/HowTos/SELinux">SELinux Howtos</a></p>
<p><a href="http://rackerhacker.com/2011/09/07/getting-apache-php-and-memcached-working-with-selinux/">Getting apache, PHP, and memcached working with SELinux</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/09/07/getting-apache-php-and-memcached-working-with-selinux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Xen 4.1 on Fedora 15 with Linux 3.0</title>
		<link>http://rackerhacker.com/2011/08/05/xen-4-1-on-fedora-15-with-linux-3-0/</link>
		<comments>http://rackerhacker.com/2011/08/05/xen-4-1-on-fedora-15-with-linux-3-0/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 04:34:06 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2367</guid>
		<description><![CDATA[If you haven't noticed already, full Xen dom0 support was added in the Linux 3.0 kernel. This means there's no longer a need to drag patches forward from old kernels and work from special branches and git repositories when building a kernel for dom0. Something else you might not have noticed is that the Fedora [...]<p><a href="http://rackerhacker.com/2011/08/05/xen-4-1-on-fedora-15-with-linux-3-0/">Xen 4.1 on Fedora 15 with Linux 3.0</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>If you haven't noticed already, <a href="http://blog.xen.org/index.php/2011/06/02/xen-celebrates-full-dom0-and-domu-support-in-linux-3-0/">full Xen dom0 support</a> was added in the <a href="http://kernelnewbies.org/Linux_3.0">Linux 3.0 kernel</a>.  This means there's no longer a need to drag patches forward from old kernels and work from special branches and git repositories when building a kernel for <a href="http://wiki.xensource.com/xenwiki/Dom0">dom0</a>.</p>
<p>Something else you might not have noticed is that the Fedora kernel team has <a href="https://admin.fedoraproject.org/updates/kernel-2.6.40-4.fc15">quietly slipped Linux 3.0</a> into Fedora 15's update channels in disguise.  Click that link, scroll down, and you'll see <em>"Rebase to 3.0. Version reports as 2.6.40 for compatibility with older userspace."</em>  Although I'm not a fan of calling something what it isn't (2.6.40 doesn't exist on kernel.org), I can understand some of the reasoning behind the choice.</p>
<p>This change makes the Xen installation on Fedora 15 pretty trivial.  To get started, update your kernel to the latest if you're not already on Fedora's 2.6.40 kernels:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y upgrade kernel</pre></div></div>

<p>We need three more packages (quite a few dependencies will roll in with them):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y install xen libvirt python-virtinst</pre></div></div>

<p>The xen package reels in the hypervisor itself along with libraries and command line tools (like xl and xm).  Libvirt gives us easy access to VM management with the <code>virsh</code> command and python-virtinst gives us the handy <code>virt-install</code> command to make OS installations easy.</p>
<p>Once those packages are installed, we need to make some adjustments in your grub configuration.  Open <code>/boot/grub/menu.lst</code> in your text editor of choice and add something like this at the bottom:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">title Fedora + Xen (2.6.40-4.fc15.x86_64)
        root (hd0,1)
	kernel /boot/xen.gz
        module /boot/vmlinuz-2.6.40-4.fc15.x86_64 ro root=/dev/sda1
        module /boot/initramfs-2.6.40-4.fc15.x86_64.img</pre></div></div>

<p>Ensure that the <code>root (hd0,1)</code> is applicable to your system (adjust it if it isn't).  Also, check the kernel version to ensure it matches your installed kernel and adjust the <code>root=</code> portion to match your root volume.  Flip the <code>default</code> line to a value which will boot your new grub entry and ensure the timeout is set to a reasonable number if you need to temporarily switch back to your original grub entry at boot time.  (Hey, we all make mistakes.)</p>
<p>I take one extra precaution and change the <code>UPDATEDEFAULT=yes</code> line to <code>no</code> in <code>/etc/sysconfig/kernel</code>.  This ensures that future kernel updates don't trample the entry you've just made.  Keep in mind that you'll need to manually update your grub configuration when you do kernel upgrades later.</p>
<p>Cross your fingers and reboot.  If your system doesn't reboot properly, reboot it again and choose your old kernel from the grub menu.  Double-check your configuration for fat-fingering and give it another try.  If your system boots and pings but you have no output via a monitor, don't fret.  There's a <a href="http://marc.info/?l=linux-kernel&#038;m=131169794026271&#038;w=2">patch</a> for the problem which <a href="http://marc.info/?l=linux-kernel&#038;m=131169794026271&#038;w=2">should appear soon</a> in Linux 3.0.  The impatient can snag a kernel source RPM, add the patch file, and <a href="http://fedoraproject.org/wiki/Building_a_custom_kernel">build a local kernel</a> (or you can <a href="http://majorhayden.com/RPMS/kernel-3.0.0-1.mhayden.fc16/">download my local build</a> from when I did it).</p>
<p>Log in and verify that you booted into the dom0:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@xenbox ~]# xm dmesg | head -n 5
 __  __            _  _    _   _   ____     __      _ ____  
 \ \/ /___ _ __   | || |  / | / | |___ \   / _| ___/ | ___| 
  \  // _ \ '_ \  | || |_ | | | |__ __) | | |_ / __| |___ \ 
  /  \  __/ | | | |__   _|| |_| |__/ __/ _|  _| (__| |___) |
 /_/\_\___|_| |_|    |_|(_)_(_)_| |_____(_)_|  \___|_|____/</pre></div></div>

<p>Once you're done with that, make sure libvirtd is running:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/etc/init.d/libvirtd start; chkconfig libvirtd on</pre></div></div>

<p>Try installing a VM:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">virt-install \
  --paravirt \
  --name=testvm \
  --ram=512 \
  --vcpus=4 \
  --file /dev/vmstorage/testvm \
  --graphics vnc,port=5905 --noautoconsole \
  --autostart --noreboot \
  --location=http://mirrors.kernel.org/debian/dists/squeeze/main/installer-amd64/</pre></div></div>

<p>You should have a VM installation underway pretty quickly and it will be visible via port 5905 on the local host.  Enjoy the power and freedom of your brand new <a href="http://en.wikipedia.org/wiki/Hypervisor#Classification">type 1 hypervisor</a>.</p>
<p><a href="http://rackerhacker.com/2011/08/05/xen-4-1-on-fedora-15-with-linux-3-0/">Xen 4.1 on Fedora 15 with Linux 3.0</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/08/05/xen-4-1-on-fedora-15-with-linux-3-0/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Keep all old kernels when upgrading via yum</title>
		<link>http://rackerhacker.com/2011/06/16/keep-all-old-kernels-when-upgrading-via-yum/</link>
		<comments>http://rackerhacker.com/2011/06/16/keep-all-old-kernels-when-upgrading-via-yum/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 12:50:46 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2336</guid>
		<description><![CDATA[Some might call me paranoid, but I get nervous when my package manager automatically removes a kernel. I logged into my Fedora 15 VM this morning and found this: ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: kernel x86_64 2.6.35.13-92.fc14 updates 22 M Removing: kernel x86_64 2.6.35.11-83.fc14 @updates 104 M &#160; Transaction Summary ================================================================================ Install [...]<p><a href="http://rackerhacker.com/2011/06/16/keep-all-old-kernels-when-upgrading-via-yum/">Keep all old kernels when upgrading via yum</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Some might call me paranoid, but I get nervous when my package manager automatically removes a kernel.  I logged into my Fedora 15 VM this morning and found this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">================================================================================
 Package        Arch           Version                   Repository        Size
================================================================================
Installing:
 kernel         x86_64         2.6.35.13-92.fc14         updates           22 M
Removing:
 kernel         x86_64         2.6.35.11-83.fc14         @updates         104 M
&nbsp;
Transaction Summary
================================================================================
Install       1 Package(s)
Remove        1 Package(s)</pre></div></div>

<p>Fedora 15's default behavior is to keep three kernels: the latest one and the two previous versions.  However, this behavior may be counter-productive if you compile your own modules, or if you have compatibility issues with subsequent kernel versions.</p>
<p>You can change how yum handles kernel packages with some simple changes to your <code>/etc/yum.conf</code>.  The <code>installonly_limit</code> option controls how many old packages are kept:</p>
<blockquote><p><strong>installonly_limit</strong> Number of packages listed  in  installonlypkgs to  keep  installed at the same time. Setting to 0 disables this feature. Default is '0'.</p></blockquote>
<p>I disabled the functionality altogether by setting <code>installonly_limit</code> to 0:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">#installonly_limit=3
installonly_limit=0</pre></div></div>

<p>It's important to keep in mind that you will need to purge these packages from your system yourself now.  Kernel packages can occupy a fair amount of disk space, so make a note to go back and clean them up when you no longer need them.</p>
<p><a href="http://rackerhacker.com/2011/06/16/keep-all-old-kernels-when-upgrading-via-yum/">Keep all old kernels when upgrading via yum</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/06/16/keep-all-old-kernels-when-upgrading-via-yum/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Measure traffic flows with Mikrotik&#039;s RouterOS and ntop on Fedora 15</title>
		<link>http://rackerhacker.com/2011/06/05/measure-traffic-flows-with-mikrotiks-routeros-and-ntop-on-fedora-15/</link>
		<comments>http://rackerhacker.com/2011/06/05/measure-traffic-flows-with-mikrotiks-routeros-and-ntop-on-fedora-15/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 14:58:26 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mikrotik]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[ntop]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2311</guid>
		<description><![CDATA[It's no secret that I'm a big fan of the RouterBoard network devices paired with Mikrotik's RouterOS. I discovered today that these devices offer Cisco NetFlow-compatible statistics gathering which can be directed to a Linux box running ntop. Mikrotik calls it "traffic flow" and it's much more efficient than setting up a mirrored or spanned [...]<p><a href="http://rackerhacker.com/2011/06/05/measure-traffic-flows-with-mikrotiks-routeros-and-ntop-on-fedora-15/">Measure traffic flows with Mikrotik's RouterOS and ntop on Fedora 15</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>It's no secret that I'm a big fan of the <a href="http://www.routerboard.com/">RouterBoard</a> network devices paired with <a href="http://www.mikrotik.com/software.html">Mikrotik's RouterOS</a>.  I discovered today that these devices offer Cisco NetFlow-compatible statistics gathering which can be directed to a Linux box running <a href="http://www.ntop.org/">ntop</a>.  Mikrotik calls it "traffic flow" and it's much more efficient than setting up a mirrored or spanned port and then using ntop to dump traffic on that interface.</p>
<p>These instructions are for Fedora 15, but they should be pretty similar on most other Linux distributions.  Install ntop first:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y install ntop</pre></div></div>

<p>Adjust <code>/etc/ntop.conf</code> so that ntop listens on something other than localhost:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># limit ntop to listening on a specific interface and port
--http-server 0.0.0.0:3000 --https-server 0.0.0.0:3001</pre></div></div>

<p>I had to comment out the <code>sched_yield()</code> option to get ntop to start:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># Under certain circumstances, the sched_yield() function causes the ntop web 
# server to lock up.  It shouldn't happen, but it does.  This option causes 
# ntop to skip those calls, at a tiny performance penalty.
# --disable-schedyield</pre></div></div>

<p>Set an admin password for ntop:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">ntop --set-admin-password</pre></div></div>

<p>Once you set the password, you may need to press CTRL-C to get back to a prompt in some ntop versions.</p>
<p>Start ntop:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/etc/init.d/ntop start</pre></div></div>

<p>Open a web browser and open http://example.com:3000 to access the ntop interface.  Roll your mouse over the <strong>Plugins</strong> menu, then <strong>NetFlow</strong>, and then click <strong>Activate</strong>.  Roll your mouse over the <strong>Plugins</strong> menu again, then <strong>NetFlow</strong>, and then click <strong>Configure</strong>.  Click <strong>Add NetFlow Device</strong> and fill in the following:</p>
<ul>
<li>Type "Mikrotik" in the <strong>NetFlow Device</strong> section and click <b>Set Interface Name</b>.</li>
<li>Type 2055 in the <strong>Local Collector UDP Port</strong> section and click <b>Set Port</b>.</li>
<li>Type in your router's IP/netmask in the <strong>Virtual NetFlow Interface Network Address</strong> section and click <b>Set Interface Address</b>.</li>
</ul>
<p>Enabling traffic flow on the Mikrotik can be done with just two configuration lines:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/ip traffic-flow
set enabled=yes interfaces=all
/ip traffic-flow target
add address=192.168.10.65:2055 disabled=no version=5</pre></div></div>

<p>Wait about a minute and then try reviewing some of the data in the ntop interface.  Depending on the amount of traffic on your network, you might see data in as little as 10-15 seconds.</p>
<p><a href="http://rackerhacker.com/2011/06/05/measure-traffic-flows-with-mikrotiks-routeros-and-ntop-on-fedora-15/">Measure traffic flows with Mikrotik's RouterOS and ntop on Fedora 15</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/06/05/measure-traffic-flows-with-mikrotiks-routeros-and-ntop-on-fedora-15/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dual-primary DRBD with OCFS2</title>
		<link>http://rackerhacker.com/2011/02/13/dual-primary-drbd-with-ocfs2/</link>
		<comments>http://rackerhacker.com/2011/02/13/dual-primary-drbd-with-ocfs2/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 02:12:58 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[high availability]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ocfs2]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2197</guid>
		<description><![CDATA[As promised in one of my previous posts about dual-primary DRBD and OCFS2, I've compiled a step-by-step guide for Fedora. These instructions should be somewhat close to what you would use on CentOS or Red Hat Enterprise Linux. However, CentOS and Red Hat don't provide some of the packages needed, so you will need to [...]<p><a href="http://rackerhacker.com/2011/02/13/dual-primary-drbd-with-ocfs2/">Dual-primary DRBD with OCFS2</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>As promised in one of my <a href="/2010/12/02/keep-web-servers-in-sync-with-drbd-and-ocfs2/">previous posts</a> about dual-primary DRBD and OCFS2, I've compiled a step-by-step guide for Fedora.  These instructions should be somewhat close to what you would use on CentOS or Red Hat Enterprise Linux.  However, CentOS and Red Hat don't provide some of the packages needed, so you will need to use other software repositories like <a href="http://rpmfusion.org/">RPMFusion</a> or <a href="http://fedoraproject.org/wiki/EPEL">EPEL</a>.</p>
<p>In this guide, I'll be using two Fedora 14 instances in the <a href="http://rackspacecloud.com/">Rackspace Cloud</a> with separate public and private networks.  The instances are called server1 and server2 to make things easier to follow.  </p>
<p><strong>NOTE: All of the instructions below should be done on both servers unless otherwise specified.</strong></p>
<hr />
First, we need to set up DRBD with two primary nodes.  I'll be using loop files for this setup since I don't have access to raw partitions.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y install drbd-utils
dd if=/dev/zero of=/drbd-loop.img bs=1M count=1000</pre></div></div>

<p>Put this <a href="/wp-content/uploads/2011/02/loop-for-drbd.txt">loop file initialization init script</a> in /etc/init.d/loop-for-drbd and finish setting it up:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">chmod a+x /etc/init.d/loop-for-drbd
chkconfig loop-for-drbd on
/etc/init.d/loop-for-drbd start</pre></div></div>

<p>Place this DRBD resource file in <code>/etc/drbd.d/r0.res</code>.  Be sure to adjust the server names and IP addresses for your servers.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">resource r0 {
	meta-disk internal;
	device /dev/drbd0;
	disk /dev/loop7;
&nbsp;
	syncer { rate 1000M; }
        net { 
                allow-two-primaries; 
                after-sb-0pri discard-zero-changes;
                after-sb-1pri discard-secondary;
                after-sb-2pri disconnect;
        }
	startup { become-primary-on both; }
&nbsp;
	on server1 { address 10.181.76.0:7789; }
	on server2 { address 10.181.76.1:7789; }
}</pre></div></div>

<p>The <code>net</code> section is telling DRBD to do the following:</p>
<ul>
<li><em>allow-two-primaries</em> - Generally, DRBD has a primary and a secondary node.  In this case, we will allow both nodes to have the filesystem mounted at the same time.  <strong>Do this only with a clustered filesystem. If you do this with a non-clustered filesystem like ext2/ext3/ext4 or reiserfs, <em>you will have data corruption</em>. Seriously!</strong></li>
<li><em>after-sb-0pri discard-zero-changes</em> - DRBD detected a split-brain scenario, but none of the nodes think they're a primary.  DRBD will take the newest modifications and apply them to the node that didn't have any changes.</li>
<li><em>after-sb-1pri discard-secondary</em> - DRBD detected a split-brain scenario, but one node is the primary and the other is the secondary.  In this case, DRBD will decide that the secondary node is the victim and it will sync data from the primary to the secondary automatically.</li>
<li><em>after-sb-2pri disconnect</em> - DRBD detected a split-brain scenario, but it can't figure out which node has the right data.  It tries to protect the consistency of both nodes by disconnecting the DRBD volume entirely.  You'll have to tell DRBD which node has the valid data in order to reconnect the volume.  <strong>Use extreme caution if you find yourself in this scenario.</strong></li>
</ul>
<p>If you'd like to read about DRBD split-brain behavior in more detail, <a href="http://www.drbd.org/users-guide/s-configure-split-brain-behavior.html">review the documentation</a>.</p>
<p>I generally turn off the usage reporting functionality in DRBD within <code>/etc/drbd.d/global_common.conf</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">global {
	usage-count no;
}</pre></div></div>

<p>Now we can create the volume and start DRBD:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">drbdadm create-md r0
/etc/init.d/drbd start &amp;&amp; chkconfig drbd on</pre></div></div>

<p>You may see some errors thrown about having two primaries but neither are up to date.  That can be fixed by running the following command on the <strong>primary node only</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">drbdsetup /dev/drbd0 primary -o</pre></div></div>

<p>If you run <code>cat /proc/drbd</code> on the secondary node, you should see the DRBD sync running:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">version: 8.3.8 (api:88/proto:86-94)
srcversion: 299AFE04D7AFD98B3CA0AF9
 0: cs:SyncTarget ro:Secondary/Primary ds:Inconsistent/UpToDate C r----
    ns:0 nr:210272 dw:210272 dr:0 al:0 bm:12 lo:1 pe:2682 ua:0 ap:0 ep:1 wo:b oos:813660  
        [===&gt;................] sync'ed: 20.8% (813660/1023932)K queue_delay: 0.0 ms
        finish: 0:01:30 speed: 8,976 (6,368) want: 1024,000 K/sec</pre></div></div>

<p>Before you go any further, wait for the DRBD sync to fully finish. When it completes, it should look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">version: 8.3.8 (api:88/proto:86-94)
srcversion: 299AFE04D7AFD98B3CA0AF9
 0: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r----
    ns:0 nr:1023932 dw:1023932 dr:0 al:0 bm:63 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0</pre></div></div>

<p>Now, <strong>on the secondary node only</strong> make it a primary node as well:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">drbdadm primary r0</pre></div></div>

<p>You should see this on the secondary node if you've done everything properly:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">version: 8.3.8 (api:88/proto:86-94)
srcversion: 299AFE04D7AFD98B3CA0AF9 
 0: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate C r----
    ns:1122 nr:1119 dw:2241 dr:4550 al:2 bm:1 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0</pre></div></div>

<p>We're now ready to move on to configuring OCFS2.  Only one package is needed:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y install ocfs2-tools</pre></div></div>

<p>Ensure that you have your servers and their private IP addresses in <code>/etc/hosts</code> before proceeding.  Create the <code>/etc/ocfs2</code> directory and place the following configuration in <code>/etc/ocfs2/cluster.conf</code> (adjust the server names and IP addresses):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">cluster:
	node_count = 2          
	name = web
&nbsp;
node:
	ip_port = 7777
	ip_address = 10.181.76.0
	number = 1
	name = server1
	cluster = web
&nbsp;
node:
	ip_port = 7777
	ip_address = 10.181.76.1
	number = 2
	name = server2
	cluster = web</pre></div></div>

<p>Now it's time to configure OCFS2.  Run <code>service ocfs2 configure</code> and follow the prompts.  Use the defaults for all of the responses except for two questions:</p>
<ul>
<li>Answer "y" to "Load O2CB driver on boot"</li>
<li>Answer "web" to "Cluster to start on boot"</li>
</ul>
<p>Start OCFS2 and enable it at boot up:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">chkconfig o2cb on &amp;&amp; chkconfig ocfs2 on
/etc/init.d/o2cb start &amp;&amp; /etc/init.d/ocfs2 start</pre></div></div>

<p>Create an OCFS2 partition <strong>on the primary node only</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">mkfs.ocfs2 -L &quot;web&quot; /dev/drbd0</pre></div></div>

<p>Mount the volumes and configure them to automatically mount at boot time.  You might be wondering why I do the mounting within <code>/etc/rc.local</code>.  I chose to go that route since mounting via fstab was often unreliable for me due to the incorrect ordering of events at boot time.  Using rc.local allows the mounts to work properly upon every reboot.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">mkdir /mnt/storage
echo &quot;/dev/drbd0  /mnt/storage  ocfs2  noauto,noatime  0 0&quot; &gt;&gt; /etc/fstab
mount /dev/drbd0
echo &quot;mount /dev/drbd0&quot; &gt;&gt; /etc/rc.local</pre></div></div>

<p>At this point, you should be all done.  If you want to test OCFS2, copy a file into your /mnt/storage mount on one node and check that it appears on the other node.  If you remove it, it should be gone instantly on both nodes.  This is a great opportunity to test reboots of both machines to ensure that everything comes up properly at boot time.</p>
<p><a href="http://rackerhacker.com/2011/02/13/dual-primary-drbd-with-ocfs2/">Dual-primary DRBD with OCFS2</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/02/13/dual-primary-drbd-with-ocfs2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>FUDCon 2011: Day One</title>
		<link>http://rackerhacker.com/2011/01/30/fudcon-2011-day-one/</link>
		<comments>http://rackerhacker.com/2011/01/30/fudcon-2011-day-one/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 07:33:38 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[boxgrinder]]></category>
		<category><![CDATA[cloudfs]]></category>
		<category><![CDATA[deltacloud]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[fudcon]]></category>
		<category><![CDATA[glusterfs]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rackspace]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2181</guid>
		<description><![CDATA[The first day of FUDCon 2011 in Tempe is coming to a close tonight and I'm completely exhausted. As promised, I'll try to summarize the day and cover the talks which I attended. The day started out with Jared Smith's "State of Fedora" address. The audio has already been posted on the wiki, but the [...]<p><a href="http://rackerhacker.com/2011/01/30/fudcon-2011-day-one/">FUDCon 2011: Day One</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>The first day of FUDCon 2011 in Tempe is coming to a close tonight and I'm completely exhausted.  <a href="/2011/01/29/gearing-up-for-fudcon-2011/">As promised</a>, I'll try to summarize the day and cover the talks which I attended.</p>
<p>The day started out with <a href="http://fedoraproject.org/wiki/User:Jsmith">Jared Smith's</a> "State of Fedora" address.  The audio has already been <a href="http://fedoraproject.org/w/uploads/4/44/State_of_fedora_tempe_2011.ogg">posted on the wiki</a>, but the speech was very positive overall.  He talked about some of the struggles that have happened in the past and how they'll probably happen again in some form or another.  It was pretty inspirational and you could obviously tell that people in the room were energized by it.</p>
<p>After the address, all of the talks were pitched in <a href="http://en.wikipedia.org/wiki/BarCamp">BarCamp format</a>.  It was a very efficient and entertaining way to create a schedule for the conference.  Everyone had 15-20 seconds to present their talk and then they had to rush outside to post their topic on the wall.  We all had the opportunity to go outside and vote for the talks that sounded interesting.  Once the votes were tallied, the schedule was set and the conference was fully underway.</p>
<p>The first talk for me was about <a href="http://twitter.com/marekgoldmann">Marek Goldmann's</a> <a href="http://www.jboss.org/boxgrinder.html">BoxGrinder</a>. <em>(Note: If you Google for BoxGrinder, make sure that you enter it as a single word. You'll get some wild unrelated results if you use two words.)</em>  In short, BoxGrinder gives you the ability to have a <a href="http://fedoraproject.org/wiki/Anaconda/Kickstart">kickstart</a>-ish method for automatically building images for virtual machine environments.  It's completely <a href="http://community.jboss.org/wiki/BoxGrinderBuildPlugins">plugin-based</a>, so you can have different platform and delivery plugins depending on where your VM needs to be deployed.  For example, you could deploy a VM with BoxGrinder that is in a format for VMWare (platform) and is delivered to the target server via SFTP (delivery).  The public cloud plugins are only compatible with Amazon's products, but I'm eager to change that during one of the upcoming hackfests.</p>
<p>The <a href="http://www.osrg.net/sheepdog/">Sheepdog</a> talk started up right after lunch and although it was interesting, I think it left most people with quite a few questions when it was over.  However, I think people are generally apprehensive when anyone tries to do anything innovative with storage.  Losing data due to a bug is a big concern and many of the questions went deeper into data safety than performance and functionality.</p>
<p>Next up was <a href="http://fedoraproject.org/wiki/Python_in_Fedora_13">Dave Malcolm's</a> talk about the different implementations of python.  This was definitely an eye-opening talk for my coworker and I.  Dave covered CPython, Jython, PyPy and various other implementations and compared their advantages and disadvantages.  I'm still pretty new to Python (I'm clutching on to ruby, PHP and perl still), but this talk really had me thinking about which implementations are best for a particular environment or task.  It was quite a bit of fun to learn about some of the deep underpinnings of Python and how they differ depending on the specific implementation.</p>
<p><a href="http://pl.atyp.us/">Jeff Darcy's</a> talk about <a href="http://fedoraproject.org/wiki/Features/CloudFS">CloudFS</a> was very intriguing.  I've been a fan of <a href="http://www.gluster.org/">GlusterFS</a> recently, but I eventually moved away due to a lack of enterprise features and degrading performance.  Jeff is working to add in encryption and authentication without rewriting the filesystem itself.  There are quite a few tricky problems involved in the encryption portion due to partial writes and general security during the handshake process.  CloudFS could potentially be a network filesystem which could be shared by multiple tenants with their own individual namespaces and segregated UID's.  This could be a big win for providers as they could offer up large amounts of storage in an organized fashion without too many management headaches.</p>
<p>We wrapped up the day of talks with <a href="http://clalance.blogspot.com/">Chris Lalancette's</a> presentation about <a href="http://incubator.apache.org/deltacloud/">Deltacloud</a>.  In short, it's a bag of daemons that allow you to manage multiple public or private clouds.  Everything from image management to provisioning are included in the project.  Questions were raised about whether another application was needed since vendor-specific libraries are abundant and libcloud offers many of the same features in a simpler package.</p>
<p>Tonight's social event was FUDPub at ASU's Memoral Union building.  The food and drinks were excellent (thanks to <a href="http://rackspace.com/">Rackspace</a>!) and it was a great opportunity to relax and talk with other Fedora users and developers.  We had the opportunity to meet people from around the world while playing round after round of bowling and billiards.  The discussions were extremely valuable, but as I said before, it was quite tiring.</p>
<p>I've compiled the FUDCon photos I've taken into a <a href="http://www.flickr.com/photos/texas1emt/sets/72157625935659726/">Flickr photo set</a>.</p>
<p>That's the end of today's summary.  I'll try to keep this going tomorrow as well.  Thanks for reading!</p>
<p><a href="http://rackerhacker.com/2011/01/30/fudcon-2011-day-one/">FUDCon 2011: Day One</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/01/30/fudcon-2011-day-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://fedoraproject.org/w/uploads/4/44/State_of_fedora_tempe_2011.ogg" length="8032960" type="audio/ogg" />
		</item>
		<item>
		<title>Gearing up for FUDCon 2011</title>
		<link>http://rackerhacker.com/2011/01/29/gearing-up-for-fudcon-2011/</link>
		<comments>http://rackerhacker.com/2011/01/29/gearing-up-for-fudcon-2011/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 15:01:20 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[fudcon]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2174</guid>
		<description><![CDATA[FUDCon 2011 in Tempe hasn't even fully started yet, but it's been well worth the trip already. We put quite a few names with faces (or IRC nicks with faces) and discussed our initial forays into Linux when we were young. From what I was told last night, this is the first conference organized by [...]<p><a href="http://rackerhacker.com/2011/01/29/gearing-up-for-fudcon-2011/">Gearing up for FUDCon 2011</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://fedoraproject.org/wiki/FUDCon:Tempe_2011">FUDCon 2011</a> in Tempe hasn't even fully started yet, but it's been well worth the trip already.  We put quite a few names with faces (or IRC nicks with faces) and discussed our initial forays into Linux when we were young.</p>
<p>From what I was told last night, this is the first conference organized by folks not already working for Red Hat (even though some of them were hired on after planning was underway) and presentations are done in <a href="http://barcamp.org/">BarCamp format</a>.  This morning kicks off with the BarCamp pitches themselves and they are supposed to last only 20 seconds each.  I'm new to this format of conferences but I'm eager to see how it works.</p>
<p>Quite a few people on Twitter have asked me if I could toss some summaries of some of the talks onto the blog.  I will certainly try my best to do so!</p>
<p>Here's a sampling of the photos I've taken so far:</p>
<ul>
<li><a href="http://rkrh.kr/1296241117.jpg">iPad being used as a laptop</a></li>
<li><a href="http://rkrh.kr/1296265179.jpg">List of sponsors (hey, it's Rackspace!)</a></li>
<li><a href="http://thesocialnerd.com/best-job-title-ever-written">Ian Weller has a great job title</a></li>
<li><a href="http://thesocialnerd.com/everybody-needs-a-little-loaf-love">Strange "Loaf Love" truck in the hotel parking lot</a></li>
<li><a href="http://thesocialnerd.com/qr-barcodes-at-fudcon-are-a-great-idea">My conference badge along with a handy QR barcode</a></li>
<li><a href="http://thesocialnerd.com/sunrise-over-tempe-arizona">Sunrise over Tempe</a></li>
</ul>
<p><a href="http://rackerhacker.com/2011/01/29/gearing-up-for-fudcon-2011/">Gearing up for FUDCon 2011</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/01/29/gearing-up-for-fudcon-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Locate RPM packages which contain a certain file</title>
		<link>http://rackerhacker.com/2010/12/08/locate-rpm-packages-which-contain-a-certain-file/</link>
		<comments>http://rackerhacker.com/2010/12/08/locate-rpm-packages-which-contain-a-certain-file/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 02:30:00 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2040</guid>
		<description><![CDATA[It's not easy remembering which RPM packages contain certain files. If I asked you which files you'd find in packages like postfix-2.7.1-1.fc14 and bash-4.1.7-3.fc14, you would be able to name some obvious executables. However, would you be able to do the same if I mentioned a package like util-linux-ng-2.18-4.6.fc14? If the RPM is already installed, [...]<p><a href="http://rackerhacker.com/2010/12/08/locate-rpm-packages-which-contain-a-certain-file/">Locate RPM packages which contain a certain file</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>It's not easy remembering which RPM packages contain certain files.  If I asked you which files you'd find in packages like <code>postfix-2.7.1-1.fc14</code> and <code>bash-4.1.7-3.fc14</code>, you would be able to name some obvious executables.  However, would you be able to do the same if I mentioned a package like <code>util-linux-ng-2.18-4.6.fc14</code>?  If the RPM is already installed, you can quickly use <code>rpm -ql</code> to list the files within it.</p>
<p>However, what if the RPM isn't installed already?  How do you figure out which one to install?</p>
<p>Fedora has well over 20,000 packages in the standard repositories without adding additional repositories like RPM Fusion.  Narrowing that list down to find the package you want can be daunting, but you can use yum to help.</p>
<p>Consider this: you're following a guide online and the author says you need to run <code>deallocvt</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># deallocvt
-bash: deallocvt: command not found</pre></div></div>

<p>Perhaps it's in a package with <code>deallocvt</code> in the name:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># yum search deallocvt
Warning: No matches found for: deallocvt
No Matches found</pre></div></div>

<p>This is where yum's <code>whatprovides</code> (<code>provides</code> works in recent yum versions) command works really well:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># yum whatprovides */deallocvt
kbd-1.15-11.fc14.x86_64 : Tools for configuring the console
Repo        : fedora
Matched from:
Filename    : /usr/bin/deallocvt</pre></div></div>

<p>From there, you can install the <code>kbd</code> RPM package via yum and you'll be on your way.</p>
<p><em>Author's note: Regular readers will probably think this is pretty basic, but I often find people who don't know this functionality exists in yum.</em></p>
<p><strong>UPDATE:</strong> I forgot to include another handy command in this article (thanks to Jason Gill for reminding me).  If you have file on your system already, but you need to know which RPM package it came from, you can do this very quickly:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># rpm -qf /usr/bin/free
procps-3.2.8-14.fc14.x86_64</pre></div></div>

<p><a href="http://rackerhacker.com/2010/12/08/locate-rpm-packages-which-contain-a-certain-file/">Locate RPM packages which contain a certain file</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2010/12/08/locate-rpm-packages-which-contain-a-certain-file/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Tap into your Linux system with SystemTap</title>
		<link>http://rackerhacker.com/2010/12/07/tap-into-your-linux-system-with-systemtap/</link>
		<comments>http://rackerhacker.com/2010/12/07/tap-into-your-linux-system-with-systemtap/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 02:27:02 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[advanced]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[systemtap]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2005</guid>
		<description><![CDATA[One of the most interesting topics I've seen so far during my RHCA training at Rackspace this week is SystemTap. In short, SystemTap allows you to dig out a bunch of details about your running system relatively easily. It takes scripts, converts them to C, builds a kernel module, and then runs the code within [...]<p><a href="http://rackerhacker.com/2010/12/07/tap-into-your-linux-system-with-systemtap/">Tap into your Linux system with SystemTap</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>One of the most interesting topics I've seen so far during my <a href="https://www.redhat.com/courses/rh442_red_hat_enterprise_system_monitoring_and_performance_tuning/">RHCA</a> training at <a href="http://rackspace.com/">Rackspace</a> this week is <a href="http://sourceware.org/systemtap/">SystemTap</a>.  In short, SystemTap allows you to dig out a bunch of details about your running system relatively easily.  It takes scripts, converts them to C, builds a kernel module, and then runs the code within your script.</p>
<p><strong><span style="color: #D42020;">HOLD IT:</span> The steps below are <em>definitely</em> not meant for those who are new to Linux.  Utilizing SystemTap on a production system is a bad idea -- it can chew up significant resources while it runs and it can also cause a running system to kernel panic if you're not careful with the packages you install.</strong></p>
<p>These instructions will work well with Fedora, CentOS and Red Hat Enterprise Linux.  Luckily, the SystemTap folks put together some instructions for <a href="http://sourceware.org/systemtap/wiki/SystemtapOnDebian">Debian</a> and <a href="http://sourceware.org/systemtap/wiki/SystemtapOnUbuntu">Ubuntu</a> as well.</p>
<p>Before you can start working with SystemTap on your RPM-based distribution, you'll need to get some prerequisites together:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum install gcc systemtap systemtap-runtime systemtap-testsuite kernel-devel
yum --enablerepo=*-debuginfo install kernel-debuginfo kernel-debuginfo-common</pre></div></div>

<p><strong><span style="color: #D42020;">WHOA THERE:</span> Ensure that the kernel-devel and kernel-debuginfo* packages that you install via yum match up with your running kernel.  If there's a newer kernel available from your yum repo, yum will pull that one.  If it's been a while since you updated, you'll either need to upgrade your current kernel to the latest and reboot or you'll need to hunt down the corresponding kernel-devel and kernel-debuginfo* packages from a repository.  <em>Installing the wrong package version can lead to kernel panics.</em>  Also, bear in mind that the debuginfo packages are quite large: almost 200MB in Red Hat/CentOS and almost 300MB in Fedora.</strong></p>
<p>You can't write the script in just any language.  SystemTap uses an odd syntax to get things going:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">#! /usr/bin/env stap
probe begin { println(&quot;hello world&quot;) exit () }</pre></div></div>

<p>Just run the script with <code>stap</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># stap -v helloworld.stp 
Pass 1: parsed user script and 73 library script(s) using 94380virt/21988res/2628shr kb, in 140usr/30sys/167real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s) using 94776virt/22516res/2692shr kb, in 10usr/0sys/5real ms.
Pass 3: using cached /root/.systemtap/cache/bc/stap_bc368822da380b943d4e845ee15ed047_773.c
Pass 4: using cached /root/.systemtap/cache/bc/stap_bc368822da380b943d4e845ee15ed047_773.ko
Pass 5: starting run.
hello world
Pass 5: run completed in 0usr/20sys/285real ms.</pre></div></div>

<p>The <code>systemtap-testsuite</code> package gives you a <strong>tubload</strong> of extremely handy SystemTap scripts.  For example:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># cd /usr/share/systemtap/testsuite/systemtap.examples/io/
# stap iotime.stp
15138470 6351 (httpd) access /usr/share/cacti/index.php read: 0 write: 0
15142243 6351 (httpd) access /usr/share/cacti/include/auth.php read: 0 write: 0
15143780 6351 (httpd) access /usr/share/cacti/include/global.php read: 0 write: 0
15144099 6351 (httpd) access /etc/cacti/db.php read: 0 write: 0
15187641 6351 (httpd) access /usr/share/cacti/lib/adodb/adodb.inc.php read: 106486 write: 0
15187664 6351 (httpd) iotime /usr/share/cacti/lib/adodb/adodb.inc.php time: 218
15194965 6351 (httpd) access /usr/share/cacti/lib/adodb/adodb-time.inc.php read: 0 write: 0
15195692 6351 (httpd) access /usr/share/cacti/lib/adodb/adodb-iterator.inc.php read: 0 write: 0
   ... output continues ...</pre></div></div>

<p>The <code>iotime.stp</code> script dumps out the reads and writes occurring on the system in real time.  After starting the script above, I accessed my cacti instance on the server and immediately started seeing some reads as apache began picking up PHP files to parse.</p>
<p>Consider a situation in which you need to decrease interrupts on a Linux machine.  This is vital for laptops and systems that need to remain in low power states.  Some might suggest powertop<a href="http://www.lesswatts.org/projects/powertop/"> for that, but why not give SystemTap a try?</a></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># cd /usr/share/systemtap/testsuite/systemtap.examples/interrupt/
# stap interrupts-by-dev.stp 
        ohci_hcd:usb3 :      1
        ohci_hcd:usb4 :      1
            hda_intel :      1
                 eth0 :      2
                 eth0 :      2
                 eth0 :      2
                 eth0 :      2
                 eth0 :      2
                 eth0 :      2</pre></div></div>

<p>On this particular system, it's pretty obvious that the ethernet interface is causing a lot of interrupts.</p>
<p>If you want more examples, keep hunting around in the systemtap-testsuite package (remember <code>rpm -ql systemtap-testsuite</code>) or review the <a href="http://sourceware.org/systemtap/examples/">giant list of examples</a> on SystemTap's site.</p>
<p><em>Thanks again to Phil Hopkins at Rackspace for giving us a detailed explanation of system profiling during training.</em></p>
<p><a href="http://rackerhacker.com/2010/12/07/tap-into-your-linux-system-with-systemtap/">Tap into your Linux system with SystemTap</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2010/12/07/tap-into-your-linux-system-with-systemtap/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Upgrading Fedora 13 to Fedora 14 on Slicehost and Rackspace Cloud Servers</title>
		<link>http://rackerhacker.com/2010/11/03/upgrading-fedora-13-to-fedora-14-on-slicehost-and-rackspace-cloud-servers/</link>
		<comments>http://rackerhacker.com/2010/11/03/upgrading-fedora-13-to-fedora-14-on-slicehost-and-rackspace-cloud-servers/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 20:02:45 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[cloud servers]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[slicehost]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1840</guid>
		<description><![CDATA[On most systems, using Fedora's preupgrade package is the most reliable way to update to the next Fedora release. However, this isn't the case with Slicehost and Rackspace Cloud Servers. Here are the steps for an upgrade from Fedora 13 to Fedora 14 via yum: yum -y upgrade wget http://mirror.rackspace.com/fedora/releases/14/Fedora/x86_64/os/Packages/fedora-release-14-1.noarch.rpm rpm -Uvh fedora-release-14-1.noarch.rpm yum -y [...]<p><a href="http://rackerhacker.com/2010/11/03/upgrading-fedora-13-to-fedora-14-on-slicehost-and-rackspace-cloud-servers/">Upgrading Fedora 13 to Fedora 14 on Slicehost and Rackspace Cloud Servers</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>On most systems, using Fedora's <a href="http://fedoraproject.org/wiki/PreUpgrade">preupgrade</a> package is the most reliable way to update to the next Fedora release.  However, this isn't the case with Slicehost and Rackspace Cloud Servers.</p>
<p>Here are the steps for an upgrade from Fedora 13 to Fedora 14 via yum:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y upgrade
wget http://mirror.rackspace.com/fedora/releases/14/Fedora/x86_64/os/Packages/fedora-release-14-1.noarch.rpm
rpm -Uvh fedora-release-14-1.noarch.rpm
yum -y install yum
yum -y upgrade</pre></div></div>

<p>If you happen to be upgrading a 32-bit instance on Slicehost, simply replace <code>x86_64</code> with <code>i386</code> in the url shown above.</p>
<p><a href="http://rackerhacker.com/2010/11/03/upgrading-fedora-13-to-fedora-14-on-slicehost-and-rackspace-cloud-servers/">Upgrading Fedora 13 to Fedora 14 on Slicehost and Rackspace Cloud Servers</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2010/11/03/upgrading-fedora-13-to-fedora-14-on-slicehost-and-rackspace-cloud-servers/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Installing Xen 4 on Fedora 13</title>
		<link>http://rackerhacker.com/2010/09/10/installing-xen-4-on-fedora-13/</link>
		<comments>http://rackerhacker.com/2010/09/10/installing-xen-4-on-fedora-13/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 13:56:49 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1799</guid>
		<description><![CDATA[Installing Xen can be a bit of a challenge for a beginner and it's made especially difficult by distribution vendors who aren't eager to include it in their current releases. I certainly don't blame the distribution vendors for omitting it; the code to support Xen's privileged domain isn't currently in upstream kernels. However, Pasi Kärkkäinen [...]<p><a href="http://rackerhacker.com/2010/09/10/installing-xen-4-on-fedora-13/">Installing Xen 4 on Fedora 13</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Installing Xen can be a bit of a challenge for a beginner and it's made especially difficult by distribution vendors who aren't eager to include it in their current releases.  I certainly don't blame the distribution vendors for omitting it; the code to support Xen's privileged domain isn't currently in upstream kernels.</p>
<p>However, <a href="http://www.xen.org/community/spotlight/pasi.html">Pasi Kärkkäinen</a> has written a <a href="http://wiki.xensource.com/xenwiki/Fedora13Xen4Tutorial">detailed walkthrough</a> about how to get Xen 4 running on Fedora 13.  Although there are quite a few steps involved, it's worked well for me so far.</p>
<p><a href="http://rackerhacker.com/2010/09/10/installing-xen-4-on-fedora-13/">Installing Xen 4 on Fedora 13</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2010/09/10/installing-xen-4-on-fedora-13/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A simple guide to redundant cloud hosting</title>
		<link>http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/</link>
		<comments>http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 00:41:16 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cloud servers]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[high availability]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[load balancing]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[slicehost]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1771</guid>
		<description><![CDATA[Today, on my 28th birthday, I'm finally delivering on a promise to my readers which I made about two months ago. I've written a guide on how to host a web application redundantly in a cloud environment. While it's still a bit of a rough draft, it should be a good starting point for those [...]<p><a href="http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/">A simple guide to redundant cloud hosting</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Today, on my 28th birthday, I'm finally delivering on a promise to my readers which I made about two months ago.  I've <a href="/redundant-cloud-hosting-configuration-guide/">written a guide</a> on how to host a web application redundantly in a cloud environment.  While it's still a bit of a rough draft, it should be a good starting point for those who haven't worked in virtualized environments before.  Also, it may show some of the more experienced systems administrators a new way to do things.</p>
<p>The guide: <a href="/redundant-cloud-hosting-configuration-guide/">Redundant Cloud Hosting Guide</a></p>
<p>As always, if you find anything in the guide that needs improvement, I'm all ears. <img src='http://rackerhacker.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/">A simple guide to redundant cloud hosting</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adjusting tty&#039;s in Fedora 13 with upstart</title>
		<link>http://rackerhacker.com/2010/03/26/adjusting-ttys-in-fedora-13-with-upstart/</link>
		<comments>http://rackerhacker.com/2010/03/26/adjusting-ttys-in-fedora-13-with-upstart/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 14:09:13 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[tty]]></category>
		<category><![CDATA[upstart]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1354</guid>
		<description><![CDATA[Fedora 13 has quite a few changes related to upstart, and one of the biggest ones is how terminals are configured.  Most distributions tuck the tty configuration away in /etc/inittab, /etc/event.d/ or /etc/init/.  If you want to adjust the number of tty's in Fedora 13, you'll need to look in /etc/sysconfig/init: # color =&#62; new [...]<p><a href="http://rackerhacker.com/2010/03/26/adjusting-ttys-in-fedora-13-with-upstart/">Adjusting tty's in Fedora 13 with upstart</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Fedora 13 has quite a few changes related to <a href="http://en.wikipedia.org/wiki/Upstart">upstart</a>, and one of the biggest ones is how terminals are configured.  Most distributions tuck the tty configuration away in <code>/etc/inittab</code>, <code>/etc/event.d/</code> or <code>/etc/init/</code>.  If you want to adjust the number of tty's in Fedora 13, you'll need to look in <code>/etc/sysconfig/init</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># color =&gt; new RH6.0 bootup</span>
<span style="color: #666666; font-style: italic;"># verbose =&gt; old-style bootup</span>
<span style="color: #666666; font-style: italic;"># anything else =&gt; new style bootup without ANSI colors or positioning</span>
<span style="color: #007800;">BOOTUP</span>=color
<span style="color: #666666; font-style: italic;"># column to start &quot;[  OK  ]&quot; label in </span>
<span style="color: #007800;">RES_COL</span>=<span style="color: #000000;">60</span>
<span style="color: #666666; font-style: italic;"># terminal sequence to move to that column. You could change this</span>
<span style="color: #666666; font-style: italic;"># to something like &quot;tput hpa ${RES_COL}&quot; if your terminal supports it</span>
<span style="color: #007800;">MOVE_TO_COL</span>=<span style="color: #ff0000;">&quot;echo -en \\033[<span style="color: #007800;">${RES_COL}</span>G&quot;</span>
<span style="color: #666666; font-style: italic;"># terminal sequence to set color to a 'success' color (currently: green)</span>
<span style="color: #007800;">SETCOLOR_SUCCESS</span>=<span style="color: #ff0000;">&quot;echo -en \\033[0;32m&quot;</span>
<span style="color: #666666; font-style: italic;"># terminal sequence to set color to a 'failure' color (currently: red)</span>
<span style="color: #007800;">SETCOLOR_FAILURE</span>=<span style="color: #ff0000;">&quot;echo -en \\033[0;31m&quot;</span>
<span style="color: #666666; font-style: italic;"># terminal sequence to set color to a 'warning' color (currently: yellow)</span>
<span style="color: #007800;">SETCOLOR_WARNING</span>=<span style="color: #ff0000;">&quot;echo -en \\033[0;33m&quot;</span>
<span style="color: #666666; font-style: italic;"># terminal sequence to reset to the default color.</span>
<span style="color: #007800;">SETCOLOR_NORMAL</span>=<span style="color: #ff0000;">&quot;echo -en \\033[0;39m&quot;</span>
<span style="color: #666666; font-style: italic;"># default kernel loglevel on boot (syslog will reset this)</span>
<span style="color: #007800;">LOGLEVEL</span>=<span style="color: #000000;">3</span>
<span style="color: #666666; font-style: italic;"># Set to anything other than 'no' to allow hotkey interactive startup...</span>
<span style="color: #007800;">PROMPT</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span>
<span style="color: #666666; font-style: italic;"># Set to 'yes' to allow probing for devices with swap signatures</span>
<span style="color: #007800;">AUTOSWAP</span>=no
<span style="color: #666666; font-style: italic;"># What ttys should gettys be started on?</span>
<span style="color: #007800;">ACTIVE_CONSOLES</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>tty<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span>-<span style="color: #000000;">6</span><span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>The very last line controls the number of tty's that are kept alive on your system.  If you need more tty's, simply increase the 6 to a higher number.  If you only want one terminal (which is usually what I want in Xen), just make this adjustment:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># What ttys should gettys be started on?</span>
<span style="color: #007800;">ACTIVE_CONSOLES</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>tty1</pre></div></div>

<p>A normal <code>telinit q</code> doesn't seem to adjust the terminals on the fly as it did before upstart was involved.  I'm not sure if this is a bug or an intended feature.  Either way, a reboot solves the problem and you should see the changes afterwards.</p>
<p><a href="http://rackerhacker.com/2010/03/26/adjusting-ttys-in-fedora-13-with-upstart/">Adjusting tty's in Fedora 13 with upstart</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2010/03/26/adjusting-ttys-in-fedora-13-with-upstart/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Sticky shift key with synergy in Fedora 12</title>
		<link>http://rackerhacker.com/2010/03/03/sticky-shift-key-with-synergy-in-fedora-12/</link>
		<comments>http://rackerhacker.com/2010/03/03/sticky-shift-key-with-synergy-in-fedora-12/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 02:44:12 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[gdm]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[synergy]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1274</guid>
		<description><![CDATA[My synergy setup at work is relatively simple. I have a MacBook Pro running Snow Leopard that acts as a synergy server and a desktop running Fedora 12 as a synergy client. On the Mac, I use SynergyKM to manage the synergy server. The Fedora box uses my gdm strategy for starting synergy at the [...]<p><a href="http://rackerhacker.com/2010/03/03/sticky-shift-key-with-synergy-in-fedora-12/">Sticky shift key with synergy in Fedora 12</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>My synergy setup at work is relatively simple.  I have a MacBook Pro running Snow Leopard that acts as a synergy server and a desktop running Fedora 12 as a synergy client.  On the Mac, I use SynergyKM to manage the synergy server.  The Fedora box uses <a href="http://rackerhacker.com/2008/07/30/automatically-starting-synergy-in-gdm-in-ubuntufedora/">my gdm strategy</a> for starting synergy at the login screen and in GNOME.</p>
<p>I kept having an issue where the shift key would become stuck regardless of the settings I set for the client or server.  The <code> halfDuplexCapsLock</code> <a href="http://synergy2.sourceforge.net/configuration.html">configuration option</a> had no effect.  After installing <code>xkeycaps</code>, I found that both shift keys were getting stuck if I brought the mouse back and forth between Mac and Fedora twice.</p>
<p>I decided to run a test.  I started the client with the debug argument and moved the mouse to my Fedora box.  At that point, I pressed the letter 'a' and saw:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">DEBUG1: CXWindowsKeyState.cpp,195:   032 (00000000) up
DEBUG1: CXWindowsKeyState.cpp,195:   03e (00000000) up
DEBUG1: CXWindowsKeyState.cpp,195:   026 (00000000) down
DEBUG1: CXWindowsKeyState.cpp,195:   032 (00000000) down
DEBUG1: CXWindowsKeyState.cpp,195:   03e (00000000) down
DEBUG1: CXWindowsKeyState.cpp,195:   026 (00000000) up</pre></div></div>

<p>I brought the mouse back to the Mac and then back to Fedora.  I pressed 'a' again and saw:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">DEBUG1: CXWindowsKeyState.cpp,195:   026 (00000000) down
DEBUG1: CXWindowsKeyState.cpp,195:   026 (00000000) up
DEBUG1: CXWindowsKeyState.cpp,195:   026 (00000000) down
DEBUG1: CXWindowsKeyState.cpp,195:   026 (00000000) up</pre></div></div>

<p>After dumping the keyboard layout with <code>xmodmap</code> I found the keys that corresponded with the key numbers:</p>
<ul>
<li>032 - Left shift</li>
<li>03e - Right shift</li>
<li>026 - a</li>
</ul>
<p>If I tapped the left shift, I could clear the key press, but I couldn't clear the right shift key (it was stuck down according to Fedora's X server).  When I hooked up a physical keyboard and mouse, I was able to use them normally without any keybinding problems.</p>
<p><span style="font-weight: bold; color: #008000;">The root cause:</span> When synergy started in <code>/etc/gdm/PreSession/Default</code> after the gdm login, the keyboard layout wasn't set up properly.  The X server was setting up the keyboard layout later in the startup process and this confusion caused the shift keys to get stuck.  Fedora 12 uses evdev to probe for keyboards during X's startup and eventually settles on a default layout if none are explicitly defined.</p>
<p><span style="font-weight: bold; color: #008000;">The fix:</span> I added the synergy startup to the GNOME startup items and it works flawlessly.</p>
<p><a href="http://rackerhacker.com/2010/03/03/sticky-shift-key-with-synergy-in-fedora-12/">Sticky shift key with synergy in Fedora 12</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2010/03/03/sticky-shift-key-with-synergy-in-fedora-12/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Upgrading Fedora 11 to 12 using yum</title>
		<link>http://rackerhacker.com/2009/12/07/upgrading-fedora-11-to-12-using-yum/</link>
		<comments>http://rackerhacker.com/2009/12/07/upgrading-fedora-11-to-12-using-yum/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 02:28:06 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1055</guid>
		<description><![CDATA[As with the Fedora 10 to 11 upgrade, you can upgrade Fedora 11 to Fedora 12 using yum. I find this to be the easiest and most reliable way to upgrade a Fedora installation whether you use it as a server or desktop. To reduce the total data downloaded, I'd recommend installing the yum-presto package [...]<p><a href="http://rackerhacker.com/2009/12/07/upgrading-fedora-11-to-12-using-yum/">Upgrading Fedora 11 to 12 using yum</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>As with the <a href="/2009/06/11/upgrading-from-fedora-10-cambridge-to-fedora-11-leonidas/">Fedora 10 to 11 upgrade</a>, you can upgrade Fedora 11 to Fedora 12 using yum.  I find this to be the easiest and most reliable way to upgrade a Fedora installation whether you use it as a server or desktop.</p>
<p>To reduce the total data downloaded, I'd recommend installing the <code>yum-presto</code> package first.  It downloads delta RPM's and builds them on the fly, which allows you to upgrade packages without having to download the entire RPM's.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum install yum-presto</pre></div></div>

<p>Now, upgrade your current system to the latest packages and clean up yum's metadata:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum upgrade
yum clean all</pre></div></div>

<p>Get the latest <code>fedora-release</code> package and install it (replace <b>x86_64</b> with <b>x86</b> if you're using a 32-bit system):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">wget ftp://download.fedora.redhat.com/pub/fedora/linux/releases/12/Fedora/x86_64/os/Packages/fedora-release-*.noarch.rpm
rpm -Uvh fedora-release-*.rpm</pre></div></div>

<p>Now, upgrade your system to Fedora 12:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum upgrade</pre></div></div>

<blockquote><p>For detailed documentation on the entire process, refer to <a href="http://fedoraproject.org/wiki/YumUpgradeFaq">Fedora using yum</a> on the FedoraProject Wiki.</p></blockquote>
<p><a href="http://rackerhacker.com/2009/12/07/upgrading-fedora-11-to-12-using-yum/">Upgrading Fedora 11 to 12 using yum</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/12/07/upgrading-fedora-11-to-12-using-yum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fedora 11 httpd: alloc_listener: failed to get a socket for (null)</title>
		<link>http://rackerhacker.com/2009/08/14/fedora-11-httpd-alloc_listener-failed-to-get-a-socket-for-null/</link>
		<comments>http://rackerhacker.com/2009/08/14/fedora-11-httpd-alloc_listener-failed-to-get-a-socket-for-null/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 17:14:02 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[emergency]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=981</guid>
		<description><![CDATA[If you use Fedora 11 in a virtualized environment, you may have seen this error recently if you've updated to apr-1.3.8-1: [root@f11 ~]# /etc/init.d/httpd start Starting httpd: [Fri Aug 14 17:05:24 2009] [crit] (22)Invalid argument: alloc_listener: failed to get a socket for (null) Syntax error on line 134 of /etc/httpd/conf/httpd.conf: Listen setup failed [FAILED] The [...]<p><a href="http://rackerhacker.com/2009/08/14/fedora-11-httpd-alloc_listener-failed-to-get-a-socket-for-null/">Fedora 11 httpd: alloc_listener: failed to get a socket for (null)</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>If you use Fedora 11 in a virtualized environment, you may have seen this error recently if you've updated to apr-1.3.8-1:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@f11 ~]# /etc/init.d/httpd start
Starting httpd: [Fri Aug 14 17:05:24 2009] [crit] (22)Invalid argument: alloc_listener: failed to get a socket for (null)
Syntax error on line 134 of /etc/httpd/conf/httpd.conf:
Listen setup failed
                                                           [FAILED]</pre></div></div>

<p>The issue is related to three kernel calls that are used in apr-1.3.8-1: accept4(), dup3() and epoll_create1().  Without these calls, apache is unable to start.  </p>
<p><strong><u>Update on August 17, 2009:</u> the Fedora team has <a href="https://bugzilla.redhat.com/show_bug.cgi?id=516331#c12">pushed apr-1.3.8-2 into the stable repositories</a> for Fedora 11, which eliminates the need for the temporary fix shown below.</strong></p>
<p><strong>Deprecated solution:</strong> There is a <a href="https://bugzilla.redhat.com/show_bug.cgi?id=516331">bug open</a> with the Fedora team, and there is a <a href="https://bugzilla.redhat.com/show_bug.cgi?id=516331#c10">temporary fix</a> available:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum --enablerepo=updates-testing update apr</pre></div></div>

<p><a href="http://rackerhacker.com/2009/08/14/fedora-11-httpd-alloc_listener-failed-to-get-a-socket-for-null/">Fedora 11 httpd: alloc_listener: failed to get a socket for (null)</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/08/14/fedora-11-httpd-alloc_listener-failed-to-get-a-socket-for-null/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Upgrading from Fedora 10 (Cambridge) to Fedora 11 (Leonidas)</title>
		<link>http://rackerhacker.com/2009/06/11/upgrading-from-fedora-10-cambridge-to-fedora-11-leonidas/</link>
		<comments>http://rackerhacker.com/2009/06/11/upgrading-from-fedora-10-cambridge-to-fedora-11-leonidas/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 17:48:39 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=894</guid>
		<description><![CDATA[There are two main ways to upgrade Fedora 10 (Cambridge) to Fedora 11 (Leonidas): &#187; What the Fedora developers suggest: yum -y upgrade yum -y install preupgrade yum clean all preupgrade-cli &#34;Fedora 11 (Leonidas)&#34; Of course, if you're doing this on a Fedora desktop, you can use preupgrade (rather than preupgrade-cli) to upgrade with a [...]<p><a href="http://rackerhacker.com/2009/06/11/upgrading-from-fedora-10-cambridge-to-fedora-11-leonidas/">Upgrading from Fedora 10 (Cambridge) to Fedora 11 (Leonidas)</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>There are two main ways to upgrade Fedora 10 (Cambridge) to Fedora 11 (Leonidas):</p>
<p><strong>&raquo; What the Fedora developers suggest:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y upgrade
yum -y install preupgrade
yum clean all
preupgrade-cli &quot;Fedora 11 (Leonidas)&quot;</pre></div></div>

<p>Of course, if you're doing this on a Fedora desktop, you can use <code>preupgrade</code> (rather than <em>preupgrade-cli</em>) to upgrade with a GUI.</p>
<p><strong>&raquo; The method I prefer (and it works properly on <a href="http://slicehost.com/">Slicehost</a>):</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y upgrade
yum clean all
wget http://download.fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/x86_64/os/Packages/fedora-release-11-1.noarch.rpm
rpm -Uvh fedora-release-11-1.noarch.rpm</pre></div></div>

<p>At this point, you would normally just start upgrading packages, but the Fedora developers threw us a curveball.  Since yum in Fedora 10 doesn't support metalinks, your upgrades will fail with something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># yum -y upgrade
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. /
removing mirrorlist with no valid mirrors: //var/cache/yum/updates/mirrorlist.txt
Error: Cannot retrieve repository metadata (repomd.xml) for repository: updates. Please verify its path and try again</pre></div></div>

<p>It's easily fixed, however.  Open up <code>/etc/yum.repos.d/fedora.repo</code> and <code>/etc/yum.repos.d/fedora-updates.repo</code> in your favorite text editor and change the <code>mirrorlist</code> URL's like so:</p>
<p><strong>Fedora Repository</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&amp;arch=$basearch
mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&amp;arch=$basearch</pre></div></div>

<p><strong>Fedora Updates Repository</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&amp;arch=$basearch
mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&amp;arch=$basearch</pre></div></div>

<p>Once you make those changes, finish out the upgrade:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y upgrade</pre></div></div>

<p>This process will take a little while to complete, but there shouldn't be any interaction required.  Once it's done, change the <code>mirrorlist</code> lines back to the original values so you can benefit from the speedups provided by the metalink format.</p>
<p><a href="http://rackerhacker.com/2009/06/11/upgrading-from-fedora-10-cambridge-to-fedora-11-leonidas/">Upgrading from Fedora 10 (Cambridge) to Fedora 11 (Leonidas)</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/06/11/upgrading-from-fedora-10-cambridge-to-fedora-11-leonidas/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

