<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:og="http://ogp.me/ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:schema="http://schema.org/" xmlns:sioc="http://rdfs.org/sioc/ns#" xmlns:sioct="http://rdfs.org/sioc/types#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" version="2.0" xml:base="https://www.linuxjournal.com/tag/gentoo">
  <channel>
    <title>Gentoo</title>
    <link>https://www.linuxjournal.com/tag/gentoo</link>
    <description/>
    <language>en</language>
    
    <item>
  <title>Centralized Logging with a Web Interface</title>
  <link>https://www.linuxjournal.com/content/centralized-logging-web-interface</link>
  <description>  &lt;div data-history-node-id="1013997" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/Gentoo-Ubuntu-Combo.png" width="420" height="420" alt="Gentoo Ubuntu Combo Logo" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/gene-liverman" lang="" about="https://www.linuxjournal.com/users/gene-liverman" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Gene Liverman&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;Wouldn’t it be nice if you had a web interface to the logs on your central log server?  Well, dream no more because this one is a reality thanks to &lt;a href="http://loganalyzer.adiscon.com"&gt;LogAnalyzer (aka phplogcon)&lt;/a&gt;.  Let's take a look at how to setup both it and its suggested syslog variant, &lt;a href="http://www.rsyslog.com"&gt;rsyslog&lt;/a&gt;, on a central log server.  We will approach this from the perspectives of both &lt;a href="http://www.gentoo.org"&gt;Gentoo&lt;/a&gt; where rsyslog is not the default (nor is anything else) and &lt;a href="http://www.ubuntu.com/server"&gt;Ubuntu 10.04 LTS&lt;/a&gt; which is already using rsyslog as the defacto logger.  It is also worth mentioning that, according to the rsyslog site, &lt;a href="http://fedoraproject.org"&gt;Fedora&lt;/a&gt; also now defaults to rsyslog.&lt;/p&gt;
&lt;h3&gt;The Prep:&lt;/h3&gt;
&lt;p&gt;Before we dive into setting up any of this we need to do a little prep work.  If you are going to be looking at these logs in a web browser then it might be good if the time stamps you are seeing reflect the appropriate timezone.  For this I shall borrow from the &lt;a href="http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&amp;chap=7"&gt;Gentoo Handbook&lt;/a&gt; as it is fitting for both distros:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
7.a. Timezone&lt;br /&gt;
You first need to select your timezone so that your system knows where it is located. Look for your timezone in /usr/share/zoneinfo, then copy it to /etc/localtime. Please avoid the /usr/share/zoneinfo/Etc/GMT* timezones as their names do not indicate the expected zones. For instance, GMT-8 is in fact GMT+8.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Suppose you are in the eastern timezone:&lt;/p&gt;
&lt;pre&gt;~# cp /usr/share/zoneinfo/EST5EDT /etc/localtime&lt;/pre&gt;&lt;h3&gt;Time:&lt;/h3&gt;
&lt;p&gt;If you are going to be compiling all of your logs in one place then it also becomes rather important that everyone involved know the correct time.  To achieve this you can use an NTP client.&lt;/p&gt;
&lt;h3&gt;Ubuntu 10.04 LTS&lt;/h3&gt;
&lt;p&gt;Using your favorite text editor, create the file /etc/cron.daily/ntpdate and insert the following:&lt;/p&gt;
&lt;pre&gt;ntpdate ntp.ubuntu.com&lt;/pre&gt;&lt;p&gt;
Save the file then&lt;/p&gt;
&lt;pre&gt;~# chmod 755 /etc/cron.daily/ntpdate&lt;/pre&gt;&lt;p&gt;
Now let's run it to get our time corrected:&lt;/p&gt;
&lt;pre&gt;~# /etc/cron.daily/ntpdate&lt;/pre&gt;&lt;p&gt;
Lastly, verify...&lt;/p&gt;
&lt;pre&gt;~# date
&lt;i&gt;You should see your current time here.&lt;/i&gt;
&lt;/pre&gt;&lt;h3&gt;Gentoo&lt;/h3&gt;
&lt;p&gt;In Gentoo this is taken care of by net-misc/ntp.&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/centralized-logging-web-interface" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Mon, 23 Aug 2010 05:05:00 +0000</pubDate>
    <dc:creator>Gene Liverman</dc:creator>
    <guid isPermaLink="false">1013997 at https://www.linuxjournal.com</guid>
    </item>

  </channel>
</rss>
