<?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, 27 Jun 2010 20:50:03 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0</generator> <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 [...]]]></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><pre><code>emerge -av awstats
</code></pre><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>Configuration</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. cp /etc/awstats/awstats.model.conf /etc/awstats/awstats.<fqdn>.conf</fqdn></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><pre><code>CustomLog /var/www/localhost/log/apache/production.log combined

Alias /awstats/classes "/usr/share/webapps/awstats/6.9-r1/htdocs/classes/"
Alias /awstats/css "/usr/share/webapps/awstats/6.9-r1/htdocs/css/"
Alias /awstats/icons "/usr/share/webapps/awstats/6.9-r1/htdocs/icon/"
ScriptAlias /awstats/ "/usr/share/webapps/awstats/6.9-r1/hostroot/cgi-bin/"
ScriptAlias /awstats "/usr/share/webapps/awstats/6.9-r1/hostroot/cgi-bin/awstats.pl"
ScriptAlias /awstats.pl "/usr/share/webapps/awstats/6.9-r1/hostroot/cgi-bin/awstats.pl"

&lt;Directory "/usr/share/webapps/awstats/6.9-r1/htdocs"&gt;
   Options None
   AllowOverride None
   &lt;IfModule mod_access.c&gt;
       Order allow,deny
       Allow from all
   &lt;/IfModule&gt;
&lt;/Directory&gt;

&lt;Directory "/usr/share/webapps/awstats/6.9-r1/hostroot/cgi-bin"&gt;
    Options ExecCGI
    AllowOverride None
    &lt;IfModule mod_access.c&gt;
        Order allow,deny
        Allow from all
    &lt;/IfModule&gt;
&lt;/Directory&gt;

&lt;Directory "/usr/share/webapps/awstats/6.9-r1/hostroot"&gt;
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
&lt;/Directory&gt;

&lt;Directory "/usr/share/webapps/awstats/6.9-r1/htdocs/icon"&gt;
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
&lt;/Directory&gt;
</code></pre><p>And verify the logging output in /etc/apache2/modules.d/00_mod_log_config.conf:</p><pre><code>&lt;IfModule log_config_module&gt;
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    LogFormat "%h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %&gt;s %b" common

    LogFormat "%{Referer}i -&gt; %U" referer
    LogFormat "%{User-Agent}i" agent
    LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b %T" script
    LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\" VLOG=%{VLOG}e" vhost

    &lt;IfModule logio_module&gt;
        # You need to enable mod_logio.c to use %I and %O
        LogFormat "%h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
        LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" vhostio
    &lt;/IfModule&gt;

    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a &lt;VirtualHost&gt;
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-&lt;VirtualHost&gt; access logfiles, transactions will be
    # logged therein and *not* in this file.
    CustomLog /var/log/apache2/access_log common

    # If you would like to have agent and referer logfiles,
    # uncomment the following directives.
    #CustomLog /var/log/apache2/referer_log referer
    #CustomLog /var/log/apache2/agent_logs agent

    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #CustomLog /var/log/apache2/access_log combined
&lt;/IfModule&gt;
</code></pre><p>And Lastly, you need to add a cron entry to update the statistics on a regular basis: # AWStats */15 * * * * perl /usr/share/webapps/awstats/6.9-r1/hostroot/cgi-bin/awstats.pl -config=www.alunduil.com -update > /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>3</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 [...]]]></description> <content:encoded><![CDATA[<h1>My Overlay</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>Making My Overlay Available</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>Adding My Overlay List to Your Layman</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: <code>http://www.alunduil.com/svn/portage/trunk/portage/alunduil-overlay.xml</code>.</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: [http://www.gentoo.org/doc/en/gcc-optimization.xml](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 [...]]]></description> <content:encoded><![CDATA[<h1>Starting Off</h1><p>Make sure you&#8217;ve at least looked at the following document: [http://www.gentoo.org/doc/en/gcc-optimization.xml](Gentoo Optimization Guide).</p><h1>Checking Flags</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><h2>Checking Processor</h2><pre><code>grep flags /proc/cpuinfo | grep uniq
</code></pre><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><pre><code>alunduil@elijah ~ $ grep flags /proc/cpuinfo | uniq
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr 
pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall 
nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow rep_good 
extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic 
cr8_legacy 3dnowprefetch
</code></pre><h2>Checking Default Flags</h2><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><pre><code>gcc -Q -c -v -march=native --help=target | grep disabled
</code></pre><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>Putting it Together</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><pre><code>CFLAGS="-march=native -O2 -pipe -msse3 -m3dnow"
</code></pre>]]></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 [...]]]></description> <content:encoded><![CDATA[<h1>Inroduction</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><h2>Checking for Multiple Occurrences of an Atom Within a File</h2><pre><code>for atom in $(gawk '{print $1}' /etc/portage/package.use); do [ "$(grep ${atom} /etc/portage/package.use | wc -l)" -gt "1" ] &amp;&amp; echo "${atom}"; done
</code></pre><h2>Checking for N Uses of a Use Flag in /etc/portage/package.use</h2><p>I use this to move frequently used use flags to /etc/make.conf if it seems appropriate.</p><pre><code>for flag in $(gawk '{print $2}' /etc/portage/package.use); do [ "$(grep "${flag}" /etc/portage/package.use | wc -l)" -gt "2" ] &amp;&amp; echo "${flag}"; done
</code></pre><h2>Checking for Removed Atoms Within a File</h2><pre><code>for atom in $(gawk '{print $1}' /etc/portage/package.use); do [ "$(portageq match / ${atom} | wc -l)" -lt "1" ] &amp;&amp; echo "${atom}"; done
</code></pre>]]></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/

Minified using apc
Page Caching using memcached (user agent is rejected)
Database Caching 9/12 queries in 0.034 seconds using memcached

Served from: www.alunduil.com @ 2010-07-30 20:48:17 -->