<?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>Alunduil&#039;s Hosting &#187; gentoo</title>
	<atom:link href="http://www.alunduil.com/tag/gentoo/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alunduil.com</link>
	<description>Gentoo Hackery and Other Fun ...</description>
	<lastBuildDate>Sun, 01 May 2011 22:00:34 +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>Optimizing Gentoo CFLAGS (Part II)</title>
		<link>http://www.alunduil.com/2011/02/20/optimizing-gentoo-cflags-part-ii/</link>
		<comments>http://www.alunduil.com/2011/02/20/optimizing-gentoo-cflags-part-ii/#comments</comments>
		<pubDate>Sun, 20 Feb 2011 23:00:46 +0000</pubDate>
		<dc:creator>Alex Brandt</dc:creator>
				<category><![CDATA[Linux Guides]]></category>
		<category><![CDATA[cflags]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://www.alunduil.com/?p=205</guid>
		<description><![CDATA[Introduction As I mentioned las﻿t time, you want to be comfortable with the existing documentation on CFLAGS before going crazy trying to play with. It also helps to have a good understanding of what you&#8217;re doing to the code when you modify these &#8220;sacred&#8221; parameters. Alright, now that the CYA is out of the way <a href='http://www.alunduil.com/2011/02/20/optimizing-gentoo-cflags-part-ii/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<h1>Introduction</h1>
<p>As I mentioned <a href="http://www.alunduil.com/2009/12/18/optimizing-gentoo-cflags/">las﻿t time</a>, you want to be comfortable with the existing documentation on CFLAGS before going crazy trying to play with.  It also helps to have a good understanding of what you&#8217;re doing to the code when you modify these &#8220;sacred&#8221; parameters.</p>
<p>Alright, now that the CYA is out of the way let&#8217;s take this one step further.  Last time we talked about figuring out which instruction sets your processor understood and how to figure out what `-m` flags would get those instruction sets into the binaries on your system.  This time we&#8217;ll be talking about making sure those same flags are in your use flags (just to be sure they&#8217;re picked up by the system).</p>
<h1>Finding Flag Names</h1>
<p>So how do we find the flags that do what we want?  Well, as always BASH is our friend and can be used to find this answer in a mostly automated fashion:</p>
<pre>. /etc/make.conf &amp;&amp; gcc -Q -c -v ${CFLAGS} --help=target | grep enabled</pre>
<p>This displays the currently enabled flags based on your CFLAGS parameter and allows us to find which flags have use flags with the following one liner:</p>
<pre>gawk '/-m.*/ { print $1 }' | cut -d 'm' --complement -f 1 | xargs -I{} equery h "{}"</pre>
<h1>Conclusion</h1>
<p>Using a little scripting we can extract the necessary information to quickly determine if there are any use flags we should be adding for particular compiler flags that our system might support.  With this last level of optimization beyond the previous time&#8217;s we should be ready to move on to -O3 (for the daring) and watch our machine&#8217;s nose bleed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alunduil.com/2011/02/20/optimizing-gentoo-cflags-part-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mailing Portage Output</title>
		<link>http://www.alunduil.com/2011/01/18/mailing-portage-output/</link>
		<comments>http://www.alunduil.com/2011/01/18/mailing-portage-output/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 23:49:06 +0000</pubDate>
		<dc:creator>Alex Brandt</dc:creator>
				<category><![CDATA[Linux Guides]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[emerge]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[portage]]></category>
		<category><![CDATA[puppet]]></category>

		<guid isPermaLink="false">http://www.alunduil.com/?p=282</guid>
		<description><![CDATA[Introduction Portage is an amazingly simple and complex piece of technology.  The simplicity in each piece&#8217;s ability to do a specific function comes together in a complex package management system that rivals all other forms of package management (at least in my opinion).  Automating updates is something that admins everywhere do out of necessity.  Heck, <a href='http://www.alunduil.com/2011/01/18/mailing-portage-output/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<h1>Introduction</h1>
<p>Portage is an amazingly simple and complex piece of technology.  The simplicity in each piece&#8217;s ability to do a specific function comes together in a complex package management system that rivals all other forms of package management (at least in my opinion).  Automating updates is something that admins everywhere do out of necessity.  Heck, automating everything is an admin&#8217;s life.  Automating portage&#8217;s updates is a bit more harrowing than other package management systems but it isn&#8217;t impossible.</p>
<h1>Problem</h1>
<p>As admins we attempt to simplify the work we actually do by writing scripts and programs to do most of our job for us.  It&#8217;s often been said that systems admins are the only people whose job description is to remove their job responsibilities.</p>
<p>Portage doesn&#8217;t have any default automation for doing nightly or even weekly portage updates but that doesn&#8217;t stop the creative from coming up with their own solution.  A simple but elegant solution is to create a small cron script that runs every day.  The problem comes when you want to read the wonderful output of portage (sometimes these messages can guide you when problems are about to occur) to avert disasters.  If the updates are performed from cron, the output will be preserved in an e-mail to the appropriate user but then we have to sift through all of the output at once.  This also doesn&#8217;t solve the issue if the updates are performed by another utility such as puppet.  These annoying little changes to the problem require a slightly more elegant solution.</p>
<h1>Solution</h1>
<p>The solution is to take advantage of portage&#8217;s logging specifications.  From the make.conf man file:</p>
<ul>
<li>﻿﻿PORTAGE_ELOG_CLASSES</li>
<li>PORTAGE_ELOG_SYSTEM</li>
<li>PORTAGE_ELOG_COMMAND</li>
<li>PORTAGE_ELOG_MAILURI</li>
<li>PORTAGE_ELOG_MAILFROM</li>
<li>PORTAGE_ELOG_MAILSUBJECT</li>
</ul>
<p>Using a combination of these directives in the make.conf file allows us to log the reports from portage to a large number of locations.  If we wanted to simply add mailing output (not the full build output just the messages) we would add the following directives to make.conf:</p>
<pre>PORTAGE_ELOG_SYSTEM="save mail"
PORTAGE_ELOG_MAILFROM="portage@alunduil.com"</pre>
<p>This simply adds the mailing log utility to portage and specifies that the e-mails come from the address portage@alunduil.com.  Of course, much more complex configurations can be crafted to suit any admins&#8217; needs.</p>
<h1>Conclusion</h1>
<p>Letting your servers notify you of possible actions is one way of automating maintenance tasks; making maintenance eventually disappear from your task list. By starting with the tasks that are repeated the most frequently, you can quickly free up time for higher level automation and organization which leads to a cleaner and sturdier infrastructure.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alunduil.com/2011/01/18/mailing-portage-output/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pclean, a new /etc/portage/package.* cleaner</title>
		<link>http://www.alunduil.com/2010/11/07/pclean-a-new-etcportagepackage-cleaner/</link>
		<comments>http://www.alunduil.com/2010/11/07/pclean-a-new-etcportagepackage-cleaner/#comments</comments>
		<pubDate>Sun, 07 Nov 2010 15:53:34 +0000</pubDate>
		<dc:creator>Alex Brandt</dc:creator>
				<category><![CDATA[Linux Guides]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[layman]]></category>
		<category><![CDATA[overlay]]></category>
		<category><![CDATA[pclean]]></category>
		<category><![CDATA[portage]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.alunduil.com/?p=245</guid>
		<description><![CDATA[I&#8217;ve often gotten frustrated with my /etc/portage/package.* files when they become massive and full of crud that I don&#8217;t even have installed any longer. Because of this I have crafted a simple little utility to clean out packages that are no longer installed and use flags that are no longer valid from these files. This <a href='http://www.alunduil.com/2010/11/07/pclean-a-new-etcportagepackage-cleaner/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve often gotten frustrated with my /etc/portage/package.* files when they become massive and full of crud that I don&#8217;t even have installed any longer.  Because of this I have crafted a simple little utility to clean out packages that are no longer installed and use flags that are no longer valid from these files.  This should help trim the cruft from the Gentoo configuration.</p>
<p>The utility, <a href="http://www.alunduil.com/programs/pclean/">pclean</a>, does all of this and only has one major problem (so far) before I shall call it good enough for a 1.0 release.  If you would like to try this little utility; it&#8217;s available in <a href="http://www.alunduil.com/alunduil-overlay/">my overlay</a> and if you notice any odd behavior please report it to <a href="https://bugzilla.alunduil.com/buglist.cgi?cmdtype=runnamed&amp;namedcmd=Pclean">my bugzilla</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alunduil.com/2010/11/07/pclean-a-new-etcportagepackage-cleaner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hamachi on Gentoo</title>
		<link>http://www.alunduil.com/2010/09/27/hamachi-on-gentoo/</link>
		<comments>http://www.alunduil.com/2010/09/27/hamachi-on-gentoo/#comments</comments>
		<pubDate>Mon, 27 Sep 2010 21:11:12 +0000</pubDate>
		<dc:creator>Alex Brandt</dc:creator>
				<category><![CDATA[Linux Guides]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[hamachi]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://www.alunduil.com/?p=217</guid>
		<description><![CDATA[Introduction Hamachi is a lightweight personal VPN connector that is a breeze to setup but there can be some pain if you don&#8217;t know what to expect. As always Gentoo provides us with an ebuild that simplifies the installation process but getting up and running is still a little confusing. Installation and Setup User Specific <a href='http://www.alunduil.com/2010/09/27/hamachi-on-gentoo/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<h1>Introduction</h1>
<p><a href="https://secure.logmein.com/products/hamachi2/">Hamachi</a> is a lightweight personal VPN connector that is a breeze to setup but there can be some pain if you don&#8217;t know what to expect.  As always Gentoo provides us with an ebuild that simplifies the installation process but getting up and running is still a little confusing.</p>
<h1>Installation and Setup</h1>
<h2>User Specific Configurations</h2>
<p>The obvious first step is `emerge -av hamachi` (this only available to ~arch right now so add to `package.keywords` as necessary).  The following are the typical instructions to install hamachi on Gentoo from portage:</p>
<ol>
<li>Add to `packages.keywords` if necessary</li>
<li>`emerge -av hamachi`</li>
<li>`rc-update add tuncfg default`</li>
</ol>
<p>After these steps have been taken you can run hamachi as any user on the system for ad-hoc VPN creation.</p>
<h2>Server Wide Configuration</h2>
<p>If you prefer to do a system wide on boot VPN with hamachi this is also possible but requires a slightly different setup:</p>
<ol>
<li>Add to `packages.keywords` if necessary</li>
<li>`emerge -av hamachi`</li>
<li>rc-update add hamachi default</li>
</ol>
<p>Now all configuration should be placed inside `/etc/hamachi` for this setup so the system will automatically start routing traffic correctly.</p>
<h1>Kernel Configuration</h1>
<p>For hamachi to work correctly you do need the tun parameter in your kernel or loaded as a module.  This parameter is located in Device Drivers-&gt;Network device support-&gt;Universal TUN/TAP device driver support.</p>
<h1>Using Hamachi</h1>
<p>Now that hamachi is on the system we need to start using it.  The server-wide installation doesn&#8217;t require this (but I&#8217;m sure you can use this method to create a configuration usable by the server-wide instance) but the user specific usage does.</p>
<p>Starting hamachi is as simple as the following:</p>
<ol>
<li>`hamachi-init`</li>
<li>`hamachi start`</li>
<li>`hamachi login`</li>
<li>`hamachi create  [ ]`</li>
<li>`hamachi join  [ ]`</li>
<li>`hamachi go-online `</li>
</ol>
<p>That&#8217;s it.  You&#8217;re now connected to a private network named .  You can view who else is connected to your network with `hamachi list` and `hamachi get-nicks`.</p>
<h1>Conclusion</h1>
<p>Setting up a VPN can be daunting (see the OpenVPN configuration documentation) or it can be a breeze with hamachi.  Need a quick VPN for LAN gaming or a VPN for performing maintenance over the internet on a device behind a firewall?  Hamachi may be the quick solution you&#8217;re looking for.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alunduil.com/2010/09/27/hamachi-on-gentoo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gentoo Hardened [Mostly] Ready for Servers</title>
		<link>http://www.alunduil.com/2010/09/19/gentoo-hardened-mostly-ready-for-servers/</link>
		<comments>http://www.alunduil.com/2010/09/19/gentoo-hardened-mostly-ready-for-servers/#comments</comments>
		<pubDate>Sun, 19 Sep 2010 20:38:44 +0000</pubDate>
		<dc:creator>Alex Brandt</dc:creator>
				<category><![CDATA[Linux Guides]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[hardened]]></category>
		<category><![CDATA[pax]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.alunduil.com/?p=207</guid>
		<description><![CDATA[Introduction I&#8217;ve been using the minimal &#8220;server&#8221; profile on my Gentoo servers for a few years now (Ever since I first found out that hardened didn&#8217;t support the glibc version that the stage tarballs used).  This profile has been excellent for the minimal needs of a headless server but it constantly reminded me that I <a href='http://www.alunduil.com/2010/09/19/gentoo-hardened-mostly-ready-for-servers/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<h1><strong>Introduction</strong></h1>
<p>I&#8217;ve been using the minimal &#8220;server&#8221; profile on my Gentoo servers for a few years now (Ever since I first found out that hardened didn&#8217;t support the glibc version that the stage tarballs used).  This profile has been excellent for the minimal needs of a headless server but it constantly reminded me that I should be using hardened; so, I finally decided to take the plunge and moved all my Gentoo servers to the hardened profile.  The migration was mostly painless (with the errors being my own fault as usual).</p>
<h1>Migration Process</h1>
<p>The process for migrating to hardened is actually well documented and very simple (I&#8217;m simply summarizing the <a href="http://www.gentoo.org/proj/en/hardened/pax-quickstart.xml">Official Documentation</a>).</p>
<ol>
<li>Switch to a hardened profile</li>
<li>Install `hardened-sources` following the directives for PAX in the Documentation</li>
<li>Reboot the machine</li>
<li>Rebuild tool chain (gcc, glibc, binutils)</li>
<li>Rebuild world</li>
<li>Reboot the machine</li>
</ol>
<p>That&#8217;s all there is to it.  Once the reboot finalizes all processes should be working without an issue.  Although, because you have now increased security you can expect some more strange bugs to work their way into your software: <a href="https://wwws.clamav.net/bugzilla/show_bug.cgi?id=2092">https://wwws.clamav.net/bugzilla/show_bug.cgi?id=2092</a>.</p>
<h1>Conclusion</h1>
<p>Although strange things may be afoot I would still recommend making the plunge from a server profile to a true hardened profile.  The stability far outweighs the issues that are to be encountered but be wary if something begins misbehaving in an unidentifiable manner.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alunduil.com/2010/09/19/gentoo-hardened-mostly-ready-for-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Holland on Gentoo</title>
		<link>http://www.alunduil.com/2010/08/01/holland-on-gentoo/</link>
		<comments>http://www.alunduil.com/2010/08/01/holland-on-gentoo/#comments</comments>
		<pubDate>Sun, 01 Aug 2010 18:32:37 +0000</pubDate>
		<dc:creator>Alex Brandt</dc:creator>
				<category><![CDATA[Linux Guides]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[holland]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[portage]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://www.alunduil.com/?p=167</guid>
		<description><![CDATA[Introduction There is a new king of backups in town, holland. This little framework written in Python allows one to easily backup anything that might need to be converted to a more flat file style before being backed up. Right now there is support for mysql, sqlite, and postgresql but with a little finesse it <a href='http://www.alunduil.com/2010/08/01/holland-on-gentoo/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<h1>Introduction</h1>
<p>There is a new king of backups in town, <a href="http://hollandbackup.org/">holland</a>.  This little framework written in Python allows one to easily backup anything that might need to be converted to a more flat file style before being backed up.  Right now there is support for mysql, sqlite, and postgresql but with a little finesse it could potentially support directories as well as databases.  This would make not only mysql backups a breeze but LDAP as well.</p>
<h1>Progress Update</h1>
<p>I have added a preliminary set of ebuilds to my overlay (which could use some code review if anyone is interested) that allows holland to easily be installed on Gentoo systems.  So easy in fact that all it takes is `emerge holland`.</p>
<p>It accepts a set of use flags to bring in the &#8220;providers&#8221; you want to be able to backup for and makes sure that those packages are installed on the system.</p>
<h2>Examples</h2>
<p>The holland ebuilds have three providers right now:</p>
<ul>
<li>mysql</li>
<li>postgresql</li>
<li>sqlite</li>
</ul>
<p>You can install any of these three you want in any combination; it doesn&#8217;t care.  It will default to installing the mysql but can easily be told not to by placing -mysql in the use flags for holland. <a href="http://blog.flameeyes.eu/">Diego Pettenò — Flameeyes</a> mentioned to me that in EAPI 4 we&#8217;ll get the cool option of being able to specify one of a set of use flags must be set without forcing the choice but until then we have this slick solution.</p>
<p>There is also lvm support for snapshotting off the database directory before grabbing the database and a myriad of other features I haven&#8217;t had a chance to explore yet.</p>
<p>To perform a rudimentary backup after installing holland simply run `holland bk`.  This will read the configurations in `/etc/holland` and backup the databases it finds.</p>
<h1>Conclusion</h1>
<p>The new kid on the block, holland, will make backups of complex databases and directories a breeze.  Simply change that cronjob from using mysqldump to calling holland and you&#8217;re finished.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alunduil.com/2010/08/01/holland-on-gentoo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running awstats on Gentoo</title>
		<link>http://www.alunduil.com/2010/03/02/running-awstats-on-gentoo/</link>
		<comments>http://www.alunduil.com/2010/03/02/running-awstats-on-gentoo/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 16:31:40 +0000</pubDate>
		<dc:creator>Alex Brandt</dc:creator>
				<category><![CDATA[Linux Guides]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[awstats]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.alunduil.com/?p=102</guid>
		<description><![CDATA[Requirements I&#8217;m assuming for this quick guide that you already have a website installed and consequently apache. emerge -av awstats A quick breakdown on the use flags from gentookit&#8217;s equery: apache2 : Add Apache2 support geoip : Add geoip support for country and city lookup based on IPs vhosts : Adds support for installing web-based <a href='http://www.alunduil.com/2010/03/02/running-awstats-on-gentoo/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<h1>Requirements</h1>
<p>I&#8217;m assuming for this quick guide that you already have a website installed and consequently apache.</p>
<p>emerge -av awstats</p>
<p>A quick breakdown on the use flags from gentookit&#8217;s equery:</p>
<ul>
<li>apache2 : Add Apache2 support</li>
<li>geoip   : Add geoip support for country and city lookup based on IPs</li>
<li>vhosts  : Adds support for installing web-based applications into a virtual-hosting environment</li>
</ul>
<h1><strong>Configuration</strong></h1>
<p>Lots of configuration needs to occur for awstats to work correctly:</p>
<p>First, we need to setup a configuration file for the web site so we can update the statistics.<br />
cp /etc/awstats/awstats.model.conf /etc/awstats/awstats..conf</p>
<p>Where fqdn is the fully qualified domain name of your website you&#8217;ll be monitoriing.  After you&#8217;ve copied the default configuration customize it for your particular website.</p>
<p>Second, you need to enable awstats in your apache vhost configuration:</p>
<p>CustomLog /var/www/localhost/log/apache/production.log combined</p>
<p>Alias /awstats/classes &#8220;/usr/share/webapps/awstats/6.9-r1/htdocs/classes/&#8221;<br />
Alias /awstats/css &#8220;/usr/share/webapps/awstats/6.9-r1/htdocs/css/&#8221;<br />
Alias /awstats/icons &#8220;/usr/share/webapps/awstats/6.9-r1/htdocs/icon/&#8221;<br />
ScriptAlias /awstats/ &#8220;/usr/share/webapps/awstats/6.9-r1/hostroot/cgi-bin/&#8221;<br />
ScriptAlias /awstats &#8220;/usr/share/webapps/awstats/6.9-r1/hostroot/cgi-bin/awstats.pl&#8221;<br />
ScriptAlias /awstats.pl &#8220;/usr/share/webapps/awstats/6.9-r1/hostroot/cgi-bin/awstats.pl&#8221;<br />
Options None<br />
AllowOverride None</p>
<p>Order allow,deny<br />
Allow from all</p>
<p>Options ExecCGI<br />
AllowOverride None</p>
<p>Order allow,deny<br />
Allow from all</p>
<p>Options None<br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
Options None<br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all</p>
<p>And verify the logging output in /etc/apache2/modules.d/00_mod_log_config.conf:<br />
# The following directives define some format nicknames for use with<br />
# a CustomLog directive (see below).<br />
LogFormat &#8220;%h %l %u %t \&#8221;%r\&#8221; %&gt;s %b \&#8221;%{Referer}i\&#8221; \&#8221;%{User-Agent}i\&#8221;" combined<br />
LogFormat &#8220;%h %l %u %t \&#8221;%r\&#8221; %&gt;s %b&#8221; common</p>
<p>LogFormat &#8220;%{Referer}i -&gt; %U&#8221; referer<br />
LogFormat &#8220;%{User-Agent}i&#8221; agent<br />
LogFormat &#8220;%v %h %l %u %t \&#8221;%r\&#8221; %&gt;s %b %T&#8221; script<br />
LogFormat &#8220;%v %h %l %u %t \&#8221;%r\&#8221; %&gt;s %b \&#8221;%{Referer}i\&#8221; \&#8221;%{User-Agent}i\&#8221; VLOG=%{VLOG}e&#8221; vhost<br />
# You need to enable mod_logio.c to use %I and %O<br />
LogFormat &#8220;%h %l %u %t \&#8221;%r\&#8221; %&gt;s %b \&#8221;%{Referer}i\&#8221; \&#8221;%{User-Agent}i\&#8221; %I %O&#8221; combinedio<br />
LogFormat &#8220;%v %h %l %u %t \&#8221;%r\&#8221; %&gt;s %b \&#8221;%{Referer}i\&#8221; \&#8221;%{User-Agent}i\&#8221; %I %O&#8221; vhostio</p>
<p># The location and format of the access logfile (Common Logfile Format).<br />
# If you do not define any access logfiles within a<br />
# container, they will be logged here.  Contrariwise, if you *do*<br />
# define per- access logfiles, transactions will be<br />
# logged therein and *not* in this file.<br />
CustomLog /var/log/apache2/access_log common</p>
<p># If you would like to have agent and referer logfiles,<br />
# uncomment the following directives.<br />
#CustomLog /var/log/apache2/referer_log referer<br />
#CustomLog /var/log/apache2/agent_logs agent</p>
<p># If you prefer a logfile with access, agent, and referer information<br />
# (Combined Logfile Format) you can use the following directive.<br />
#CustomLog /var/log/apache2/access_log combined</p>
<p>And Lastly, you need to add a cron entry to update the statistics on a regular basis:<br />
# AWStats<br />
*/15 * * * * perl /usr/share/webapps/awstats/6.9-r1/hostroot/cgi-bin/awstats.pl -config=www.alunduil.com -update &gt; /dev/null</p>
<p>Everything should be running smoothly but give your installation some time to begin collecting statistics.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alunduil.com/2010/03/02/running-awstats-on-gentoo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Layman Overlay</title>
		<link>http://www.alunduil.com/2010/01/11/my-overlay-and-layman-a-love-story/</link>
		<comments>http://www.alunduil.com/2010/01/11/my-overlay-and-layman-a-love-story/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 17:22:37 +0000</pubDate>
		<dc:creator>Alex Brandt</dc:creator>
				<category><![CDATA[Linux Guides]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[layman]]></category>
		<category><![CDATA[overlay]]></category>
		<category><![CDATA[portage]]></category>

		<guid isPermaLink="false">http://www.alunduil.com/?p=13</guid>
		<description><![CDATA[My Overlay My overlay has been available via subversion for quite some time now, but not in any easy to use format (integration with layman).  Getting this overlay to work with yours must have been a pain if you wanted to try something I had been working on. Making My Overlay Available The first thing <a href='http://www.alunduil.com/2010/01/11/my-overlay-and-layman-a-love-story/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<h1><strong>My Overlay</strong></h1>
<p>My overlay has been available via subversion for quite some time now, but not in any easy to use format (integration with layman).  Getting this overlay to work with yours must have been a pain if you wanted to try something I had been working on.</p>
<h1><strong>Making My Overlay Available</strong></h1>
<p>The first thing I had to do to make my overlay talk with layman, let alone get along with layman, was add an xml definition of the overlay somewhere.  I chose the easy to manipulate path of http://www.alunduil.com/svn/portage/trunk/portage/alunduil-overlay.xml.</p>
<h1><strong>Adding My Overlay List to Your Layman</strong></h1>
<p>To add my overlay(s) to your layman list, simply add the following path to your overlays variable in /etc/layman/layman.cfg: `http://www.alunduil.com/svn/portage/trunk/portage/alunduil-overlay.xml`.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alunduil.com/2010/01/11/my-overlay-and-layman-a-love-story/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optimizing Gentoo CFLAGS</title>
		<link>http://www.alunduil.com/2009/12/18/optimizing-gentoo-cflags/</link>
		<comments>http://www.alunduil.com/2009/12/18/optimizing-gentoo-cflags/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 06:39:52 +0000</pubDate>
		<dc:creator>Alex Brandt</dc:creator>
				<category><![CDATA[Linux Guides]]></category>
		<category><![CDATA[cflags]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[instructions]]></category>
		<category><![CDATA[isa]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://www.alunduil.com/?p=63</guid>
		<description><![CDATA[Starting Off Make sure you&#8217;ve at least looked at the following document: Gentoo Optimization Guide. Checking Flags The only real change we want to make to our system are simple things we know will not break it. Thus, we only look at making sure that we have the correct flags for enabling all of the <a href='http://www.alunduil.com/2009/12/18/optimizing-gentoo-cflags/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<h1><strong>Starting Off</strong></h1>
<p>Make sure you&#8217;ve at least looked at the following document: <a href="http://www.gentoo.org/doc/en/gcc-optimization.xml">Gentoo Optimization Guide</a>.</p>
<h1><strong>Checking Flags</strong></h1>
<p>The only real change we want to make to our system are simple things we know will not break it.  Thus, we only look at making sure that we have the correct flags for enabling all of the instruction sets that our processor has available.</p>
<h1><strong>Checking Processor</strong></h1>
<p>grep flags /proc/cpuinfo | grep uniq</p>
<p>This pulls out all of the features of the processor as detected by the kernel.  Example output is shown (line breaks added for readability):</p>
<p>alunduil@elijah ~ $ grep flags /proc/cpuinfo | uniq<br />
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr<br />
pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall<br />
nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow rep_good<br />
extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic<br />
cr8_legacy 3dnowprefetch</p>
<h1><strong>Checking Default Flags</strong></h1>
<p>gcc does a great job of determining what flags should be set by using the new -march=native flag (which you should have set by this point).  Using the following command we can double check that all of the instructions we want enabled are enabled:</p>
<p>gcc -Q -c -v -march=native &#8211;help=target | grep disabled</p>
<p>If anything appears in the resulting list, it&#8217;s not enabled and should be enabled by adding the appropriate -m flag.  For my cpu this results in: -msse3 -m3dnow.</p>
<h1><strong>Putting it Together</strong></h1>
<p>By adding the original guide with a check for instructions, we allow gcc to utilize the instructions that were specifically created for uses we may have (multimedia, extended math, etc).</p>
<p>The resulting CFLAG variable that I placed in my make.conf from the above discussion:</p>
<p>CFLAGS=&#8221;-march=native -O2 -pipe -msse3 -m3dnow&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alunduil.com/2009/12/18/optimizing-gentoo-cflags/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cleaning /etc/portage/package.*</title>
		<link>http://www.alunduil.com/2009/07/23/cleaning-etcportagepackage/</link>
		<comments>http://www.alunduil.com/2009/07/23/cleaning-etcportagepackage/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 06:38:19 +0000</pubDate>
		<dc:creator>Alex Brandt</dc:creator>
				<category><![CDATA[Linux Guides]]></category>
		<category><![CDATA[cleanup]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[packages]]></category>
		<category><![CDATA[portage]]></category>

		<guid isPermaLink="false">http://www.alunduil.com/?p=61</guid>
		<description><![CDATA[Inroduction After a while the files in /etc/portage become cluttered with the common, &#8220;Let&#8217;s try this . . . whoops that didn&#8217;t work . . . let&#8217;s try this.&#8221; No matter how hard you try to keep this clean, you have probably forgotten something along the way. Installing a testing package then removing it because <a href='http://www.alunduil.com/2009/07/23/cleaning-etcportagepackage/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<h1><strong>Inroduction</strong></h1>
<p>After a while the files in /etc/portage become cluttered with the common, &#8220;Let&#8217;s try this . . . whoops that didn&#8217;t work . . . let&#8217;s try this.&#8221;  No matter how hard you try to keep this clean, you have probably forgotten something along the way.  Installing a testing package then removing it because you found a better one later, etc.  Well, what&#8217;s an easy way to clean these files up and make sure that we minimize their sizes and keep our Gentoo system crisp (or as crisp as we can by just managing these files)?  I&#8217;ve written some bash one-liners that assist with this and could easily be adapted into a script that automates a lot of the cleaning for you.</p>
<p>In all of these scripts change the /etc/portage/package.use to the file you are interested in cleaning.</p>
<h1><strong>Checking for Multiple Occurrences of an Atom Within a File</strong></h1>
<p>for atom in $(gawk &#8216;{print $1}&#8217; /etc/portage/package.use); do [ "$(grep ${atom} /etc/portage/package.use | wc -l)" -gt "1" ] &amp;&amp; echo &#8220;${atom}&#8221;; done</p>
<h1><strong>Checking for N Uses of a Use Flag in /etc/portage/package.use</strong></h1>
<p>I use this to move frequently used use flags to /etc/make.conf if it seems appropriate.</p>
<p>for flag in $(gawk &#8216;{print $2}&#8217; /etc/portage/package.use); do [ "$(grep "${flag}" /etc/portage/package.use | wc -l)" -gt "2" ] &amp;&amp; echo &#8220;${flag}&#8221;; done</p>
<h1><strong>Checking for Removed Atoms Within a File</strong></h1>
<p>for atom in $(gawk &#8216;{print $1}&#8217; /etc/portage/package.use); do [ "$(portageq match / ${atom} | wc -l)" -lt "1" ] &amp;&amp; echo &#8220;${atom}&#8221;; done</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alunduil.com/2009/07/23/cleaning-etcportagepackage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached (User agent is rejected)
Database Caching 2/36 queries in 0.031 seconds using memcached
Object Caching 695/778 objects using memcached

Served from: www.alunduil.com @ 2012-02-07 23:43:10 -->
