<?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>Albertech.net &#187; Linux</title>
	<atom:link href="http://albertech.net/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://albertech.net</link>
	<description>Tips, Tricks, and Reviews in Linux, Apache, MySQL, PHP</description>
	<lastBuildDate>Wed, 28 Jul 2010 16:09:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Amanda Backup: Client installation on Debian</title>
		<link>http://albertech.net/2010/01/amanda-backup-client-installation-on-debian/</link>
		<comments>http://albertech.net/2010/01/amanda-backup-client-installation-on-debian/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 20:28:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[amanda]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[install]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=356</guid>
		<description><![CDATA[If you install the amanda-client package on Debian, some things need to be configured before you can actually use the service. By default, the server will not be able to connect to the client. The common error is: "selfcheck request failed: timeout waiting for ACK". Read the post for the solution.]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2010%252F01%252Famanda-backup-client-installation-on-debian%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Amanda%20Backup%3A%20Client%20installation%20on%20Debian%22%20%7D);"></div>
<p>If you install the amanda-client package on Debian, some things need to be configured before you can actually use the service.</p>
<p><strong>1) Install amanda-client by using aptitude or apt-get install.</strong></p>
<p><strong>2) Determine which disk partition to backup by typing in &#8220;df&#8221;.</strong></p>
<p>Filesystem 1K-blocks Used  Available Use % Mounted on<br />
/dev/hda1 10000      1000         9000      10% /</p>
<p>In this example, you will back up &#8220;hda1&#8243;. Add this entry to the Amanda server configuration in<span style="color: #888888;"></p>
<p>/etc/amanda/disklist</span><br />
myservername     hda1     user-tar</p>
<p><strong>3) Edit Amanda hosts file</strong><br />
<span style="color: #888888;">/var/backups/.amandahosts</span></p>
<p>[your Amanda server IP]  backup</p>
<p>Example:<br />
myhost.com backup</p>
<p><strong>4) Update hosts.allow</strong></p>
<p>amandad: [your Amanda server IP]</p>
<p><strong>5) Add exclude.gtar to exclude any directories you don&#8217;t need to download.<br />
</strong><span style="color: #888888;">/etc/amanda/exclude.gtar</span></p>
<p>For example, to remove temp files from backup:<br />
./tmp</p>
<p><strong>6) Open up any firewalls to allow backups to go through.</strong></p>
<p><a href="http://wiki.zmanda.com/index.php/How_To:Set_Up_iptables_for_Amanda" target="_blank">http://wiki.zmanda.com/index.php/How_To:Set_Up_iptables_for_Amanda</a></p>
<p><strong>7) Restart inet.d</strong></p>
<p>/etc/init.d/openbsd-inetd restart</p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2010/01/amanda-backup-client-installation-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SFTP/ScpOnly: Fix for WinSCP Error</title>
		<link>http://albertech.net/2009/11/sftp-scponly-fix-for-winscp-error/</link>
		<comments>http://albertech.net/2009/11/sftp-scponly-fix-for-winscp-error/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 22:26:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ScpOnly]]></category>
		<category><![CDATA[SFTP]]></category>
		<category><![CDATA[WinSCP]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=321</guid>
		<description><![CDATA[Here's the fix for the common error with ScpOnly when using the Jail SFTP option. The error message for WinSCP clients is "WinSCP: this is end-of-file:0 failed with invalid output" when trying to connect to a SFTP server. View the post to see the fix for WinSCP.]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2009%252F11%252Fsftp-scponly-fix-for-winscp-error%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22SFTP%2FScpOnly%3A%20Fix%20for%20WinSCP%20Error%22%20%7D);"></div>
<p>Here&#8217;s the fix for the common error with ScpOnly when using the Jail SFTP option. The error message for WinSCP clients is &#8220;WinSCP: this is end-of-file:0 failed with invalid output&#8221; when trying to connect to a SFTP server. </p>
<p> In Debian, go to the src folder for scponly:<br />
<strong>cd  /usr/share/doc/scponly/</strong></p>
<p>There should be a file in there called &#8220;groups.c&#8221; </p>
<p><code>main()<br />
{<br />
printf("root users\n");<br />
return 0;<br />
}<br />
</code></p>
<p>As you can see, this is just a &#8220;dummy&#8221; file to output a sample command and 0 to WinSCP program. Harmless. Compile the file.</p>
<p><strong>gcc -o groups groups.c</strong></p>
<p>Copy the groups file to /home/[SFTP USER]/usr/bin</p>
<p><strong>cp groups /home/[SFTP USER]/usr/bin</strong></p>
<p>This should fix the error message. You will need to copy the groups file for all SFTP users and also update the .sh file to copy the new groups file when creating new users. I tested this in WinSCP Version 4.2.4 and it resolved the warning message problem.</p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2009/11/sftp-scponly-fix-for-winscp-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian: Installing Mailman with Exim4</title>
		<link>http://albertech.net/2009/09/debian-installing-mailman-with-exim4/</link>
		<comments>http://albertech.net/2009/09/debian-installing-mailman-with-exim4/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 21:03:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=283</guid>
		<description><![CDATA[I recently installed Mailman with Exim4, which was a challenge considering all the manual configuration you have to do. I found a few guides on the install, but they didn't seem to be "complete" enough to get the system working. Turns out, the biggest challenge was Exim4. The configuration files are confusing, especially since there are two sets of configuration files. ]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2009%252F09%252Fdebian-installing-mailman-with-exim4%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Debian%3A%20Installing%20Mailman%20with%20Exim4%22%20%7D);"></div>
<p>I recently installed Mailman with Exim4, which was a challenge considering all the manual configuration you have to do. I found a few guides on the install, but they didn&#8217;t seem to be &#8220;complete&#8221; enough to get the system working. Turns out, the biggest challenge was Exim4. The configuration files are confusing, especially since there are two sets of configuration files.</p>
<p><strong>I used the following guide from</strong> <a href="http://www.debian-administration.org/article/Mailman_and_Exim4" target="_blank"><strong>http://www.debian-administration.org/article/Mailman_and_Exim4</strong></a> as a baseline. I&#8217;ve added my own notes to make the install go through smoother. This is probably the best guide I&#8217;ve found so far on this topic. Debian allows for easy installation of the software packages, however the configuration is all manual work. <img src='http://albertech.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<blockquote><p><strong>Installing and Configuring Mailman</strong></p>
<p>To install mailman, simply run the following command:</p>
<p><code>apt-get install mailman</code></p>
<p>During the install, you will be prompted to choose which languages you want mailman to support.</p>
<p>After the install is complete, follow the instructions given during the install and setup the Mailman-specific mailing list.</p>
<p><code>newlist mailman</code></p>
<p>There are just a few changes that must be made to the basic configuration. Open /etc/mailman/mm_cfg.py and edit the following items:</p>
<p><code># Default domain for email addresses of newly created mailing lists<br />
DEFAULT_EMAIL_HOST = 'list.example.org'</code></p>
<p># Default host for the web interface of newly created mailing lists<br />
DEFAULT_URL_HOST   = &#8217;list.example.org&#8217;</p>
<p># Uncomment this. In this setup, the alias file won&#8217;t need to be changed.<br />
MTA=None   # Misnomer, suppresses alias output on newlist</p>
<p>Restart mailman so that the configuration changes take effect:</p>
<p><code>/etc/init.d/mailman restart</code></p>
<p>Now would be a good time to set up any other mailing lists you will need using the same &#8220;newlist&#8221; command. If your list will be using anything other than the DEFAULT_URL_HOST we set up earlier as its web interface hostname, make sure to pass that to newlist with the -u flag.</p></blockquote>
<p><strong>Exim Configuration</strong></p>
<p>Previously, you had to update the /etc/alias for each list you add on Mailman. This is no longer necessary with Exim. I strongly suggest using the split config since its much easier to locate the right section in the configuration file to modify.  By default, its setup as a single file so you will need to update the setting by running &#8220;<strong>dpkg-reconfigure exim4-config</strong>&#8220;. On the next to last screen, set the configuration on multiple files vs. a single file.</p>
<blockquote><p><strong>Create the files listed below.</strong></p>
<p>/etc/exim4/conf.d/main/04_mailman_options:<br />
<code># Mailman macro definitions</code></p>
<p># Home dir for the Mailman installation<br />
MM_HOME=/var/lib/mailman</p>
<p># User and group for Mailman<br />
MM_UID=list<br />
MM_GID=list</p>
<p>#<br />
# Domains that your lists are in - colon separated list<br />
# you may wish to add these into local_domains as well<br />
domainlist mm_domains=list.example.org</p>
<p># The path of the Mailman mail wrapper script<br />
MM_WRAP=MM_HOME/mail/mailman<br />
#<br />
# The path of the list config file (used as a required file when<br />
# verifying list addresses)<br />
MM_LISTCHK=MM_HOME/lists/${lc::$local_part}/config.pck</p>
<p>/etc/exim4/conf.d/router/450_mailman_aliases:<br />
<code>mailman_router:<br />
  driver = accept<br />
  domains = +mm_domains<br />
  require_files = MM_LISTCHK<br />
  local_part_suffix_optional<br />
  local_part_suffix = -admin : \<br />
    -bounces   : -bounces+*  : \<br />
    -confirm   : -confirm+*  : \<br />
    -join      : -leave      : \<br />
    -owner     : -request    : \<br />
    -subscribe : -unsubscribe<br />
  transport = mailman_transport<br />
</code></p>
<p>/etc/exim4/conf.d/transport/40_mailman_pipe:<br />
<code>mailman_transport:<br />
  driver = pipe<br />
  command = MM_WRAP \<br />
    '${if def:local_part_suffix \<br />
    {${sg{$local_part_suffix}{-(\\w+)(\\+.*)?}{\$1}}} \<br />
    {post}}' \<br />
    $local_part<br />
  current_directory = MM_HOME<br />
  home_directory = MM_HOME<br />
  user = MM_UID<br />
  group = MM_GID<br />
</code></p>
<p>After you finish creating the various configuration files, run the following commands to build the updated configuration file and restart exim:<br />
<code>update-exim4.conf<br />
/etc/init.d/exim4 restart</code></p>
<p><strong>Apache Configuration</strong></p>
<p>mailman uses CGI to create a web interface for its mailing lists. We need to configure Apache in order to get this piece working. First create a file to store some new aliases for the web server.</p>
<p>/etc/apache2/conf.d/mailman:<br />
<code>Alias /pipermail /var/lib/mailman/archives/public<br />
Alias /images/mailman /usr/share/images/mailman<br />
&lt;directory /var/lib/mailman/archives/public&gt;<br />
    DirectoryIndex index.html<br />
&lt;/directory&gt;</code></p>
<p>Then create (or edit) a VirtualHost entry to allow the scripts to run.</p>
<p>/etc/apache2/sites-available/list.example.org:<br />
<code>&lt;virtualhost *:80&gt;<br />
        ServerName list.example.org<br />
        ServerAdmin webmaster@list.example.org<br />
        DocumentRoot /var/www/<br />
        &lt;directory /var/www/&gt;<br />
                Options Indexes FollowSymLinks MultiViews<br />
                AllowOverride None<br />
                Order allow,deny<br />
                allow from all<br />
                # This directive allows us to have apache2's default start page<br />
                # in /apache2-default/, but still have / go to the right place<br />
                RedirectMatch ^/$ /cgi-bin/mailman/listinfo<br />
        &lt;/directory&gt;</code><br />
If this is a new file, remember to symlink it to the sites-enabled directory.</p>
<p>        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
        &lt;directory &#8221;/usr/lib/cgi-bin&#8221;&gt;<br />
                AllowOverride None<br />
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
                Order allow,deny<br />
                Allow from all<br />
        &lt;/directory&gt;<br />
&lt;/virtualhost&gt;</p>
<p>Finally, restart Apache so that the changes take effect.<br />
<code>/etc/init.d/apache2 restart</code></p></blockquote>
<h2>Mailman troubleshooting:</h2>
<p><strong>If your lists are not showing up on the website</strong>, you will need to change<br />
<strong>/var/lib/mailman/Mailman/Defaults.py</strong></p>
<p>In the section &#8220;<strong>VIRTUAL_HOST_OVERVIEW</strong>&#8220;, set it to &#8220;<strong>No</strong>&#8220;.<br />
Restart Mailman <code>/etc/init.d/mailman restart</code></p>
<p><strong>Locking down the Create Lists &#8220;feature&#8221;</strong><br />
e.g. <em>If you have the proper authority, you can also create a new mailing list</em><br />
By default, Mailman leaves the Create Lists feature wide open so anyone can create new lists. For most places, this is a bad thing.  To lock it down, go to your Apache2 configuration to block access to the folder.  Go to /etc/apache2/site-enabled/000-default (if you only have 1 web host on the server) and find the section before</p>
<p><code>ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/</code></p>
<p>Add the following above the ScriptAlias line:</p>
<p><code>&lt;Location /cgi-bin/mailman/create&gt;<br />
Allow from [YOUR IP]<br />
Deny from all<br />
&lt;/Location&gt;</code></p>
<p>Restart Apache2 and the creation of lists should now be limited to your computer only.</p>
<h2>Exim4 troubleshooting:</h2>
<p><strong>ERROR: Low level smtp error: (111,&#8217;Connection refused&#8217;)</strong></p>
<p>This basically means a few things.</p>
<p>First, is your hostname a FQDN? Fully qualified domain name. Basically, it needs to be &#8220;mysite.com&#8221; as opposed to just &#8220;mysite&#8221;.  Go to /etc/hosts file. Is 127.0.0.1 setup as localhost and 127.0.1.1 setup as mydomain.com?</p>
<p>Second, your firewall could be interferring. If your iptables rules are too strict, then you won&#8217;t be able to connect to your own smtp port.  To test, run &#8220;telnet localhost 25&#8243;<br />
If you get a connection refused or it hangs, then this means a few things.</p>
<p>Third, Exim4 is not configured properly. Run &#8220;<strong>dpkg-reconfigure exim4-config</strong>&#8221;<br />
Make sure your sendmail is setup to be an &#8220;internet site&#8221; so that other computers can send email to it. Set relay domains to blank. And make sure the configration is setup using the multiple configuration files.</p>
<p><span id="main" style="VISIBILITY: visible"><span id="search" style="VISIBILITY: visible"><strong>ERROR: 550 <em>relay not permitted<br />
</em></strong>This has to do with Mailman unable to send email to the clients due to the relay setting in Exim not being configured properly. If you get this far, Exim is able to take the e-mail posts and route it to the Mailman. In Exim, make sure localhost has permission to post messages. Run &#8220;<strong>dpkg-reconfigure exim4-config</strong>&#8220;  In the relay network option, set them to: &#8220;127.0.1.1;127.0.0.1&#8243;. This will allow your computer to send email out. By default, Mailman sends everything through localhost, so it needs to match up with Exim. To verify whether you can connect, make sure you can &#8220;telnet localhost 25&#8243;.<br />
</span></span></p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2009/09/debian-installing-mailman-with-exim4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>awstats: Import old log files</title>
		<link>http://albertech.net/2009/09/awstats-import-old-log-files/</link>
		<comments>http://albertech.net/2009/09/awstats-import-old-log-files/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 16:26:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[awstats]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[old logs]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=256</guid>
		<description><![CDATA[One thing I've encountered with Awstats is adding in old apache log files. This is useful if you are migrating data from servers. By default, Awstats will ignore ALL past dates in the log that occur before the most recent log entry date. In order to avoid Awstats from finding the "recent log entry date", you will need move all Awstats cached files into a separate folder. ]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2009%252F09%252Fawstats-import-old-log-files%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22awstats%3A%20Import%20old%20log%20files%22%20%7D);"></div>
<p>One thing I&#8217;ve encountered with Awstats is adding in old apache log files. This is useful if you are migrating data from servers. By default, Awstats will ignore ALL past dates in the log that occur before the most recent log entry date. In order to avoid Awstats from finding the &#8220;recent log entry date&#8221;, you will need move all Awstats cached files into a separate folder. I&#8217;ve verified that this works, so if you have any questions feel free to comment.</p>
<p align="left"><strong>1) Locate your awstats data directory.</strong> Most commonly found in /var/lib/awstats</p>
<p align="left">2) <strong>Create a new folder inside the directory</strong>. <strong>Move all awstats* files to the new folder.</strong></p>
<p align="left">3) <strong>Run  awstats update process on all log files in chronological order</strong>. AWStats will not complain about the &#8220;too old record&#8221; because there is no history files in DirData directory that contains compiled data more recent than record.</p>
<p align="left"><strong>Edit the awstats.conf inside /etc/awstats</strong><br />
Locate the Apache logfile you need. It must be the oldest one you want to import. Awstats will chronologically add in the files, so make sure you add them in the right order. Edit the line starting with <strong>LogFile=&#8221;[log file location]</strong>&#8221;</p>
<p>Run the Awstats command (through the web browser or through shell via the perl command line)</p>
<p>4) <strong>Move the history files back.</strong> Once you process through all the logfiles, move the Awstats history files inside the /var/lib/awstats/newfolder back into /var/lib/awstats</p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2009/09/awstats-import-old-log-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress MU: Limit access to certain blogs</title>
		<link>http://albertech.net/2009/07/wordpress-mu-limit-access-to-certain-blogs/</link>
		<comments>http://albertech.net/2009/07/wordpress-mu-limit-access-to-certain-blogs/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 20:22:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[limit access]]></category>
		<category><![CDATA[wordpress mu]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=203</guid>
		<description><![CDATA[I recently implemented a way to limit access by IP range on specific blogs on WordPress MU. As you know, WordPress MU uses Apache Rewrite engine to rewrite URLs. For instance, you have a blog on WordPress MU called "intranet". Apache Rewrite takes the "intranet" string in the URL and automatically rewrites it as a value in the PHP script. A side effect to Apache Rewrite is that "Directory" .htaccess parameters don't work. So, if you wanted only your company IPs to access an internal blog, you will need to use Apache Rewrite parameters instead. For the solution, read on...]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2009%252F07%252Fwordpress-mu-limit-access-to-certain-blogs%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22WordPress%20MU%3A%20Limit%20access%20to%20certain%20blogs%22%20%7D);"></div>
<p>I recently implemented a way to limit access by IP range on specific blogs on WordPress MU. As you know, WordPress MU uses Apache Rewrite engine to rewrite URLs. For instance, you have a blog on WordPress MU called &#8220;intranet&#8221;. Apache Rewrite takes the &#8220;intranet&#8221; string in the URL and automatically rewrites it as a value in the PHP script. A side effect to Apache Rewrite is that &#8220;Directory&#8221; .htaccess parameters don&#8217;t work. So, if you wanted only your company IPs to access an internal blog, you will need to use Apache Rewrite parameters instead.</p>
<p>Here&#8217;s how to limit access to an IP or subnet on a particular blog on your WordPress MU install:</p>
<p><strong>DISCLAIMER:</strong> <span style="text-decoration: underline;">Modifying .htaccess files can break your WordPress MU install. </span>ALWAYS backup your .htaccess file. Simply, copy .htaccess file and rename it to .htaccess-backup. (cp .htaccess .htaccess-backup)</p>
<p><strong>Step 1:</strong></p>
<p>Add a section <strong>after</strong> the &#8220;RewriteEngine On<br />
RewriteBase /&#8230;&#8221; section</p>
<p><code>RewriteCond %{REMOTE_ADDR} !^1\.2\.3\.4<br />
RewriteCond %{REMOTE_ADDR} !^1\.2\.3\.5<br />
RewriteCond %{REQUEST_URI} ^/BLOG1<br />
RewriteRule .* - [F]<br />
</code></p>
<p><strong>DO NOT SAVE YET. You will need edit the IP address info and blog info first:</strong></p>
<p><strong>Step 2: Replace the 1.2.3.4 number with your company IPs</strong> (its easier if you have an entire subnet or you can use internal IPs)</p>
<p><strong>For a class C,</strong> the part after {REMOTE ADDR} would be<br />
!^1\.2\3\.</p>
<p><strong>Step 3: Replace BLOG1</strong> with the blog you want to limit access to those IPs. So http://www.mysite.com/myfirstblog would be &#8220;^/blogs/</p>
<p><strong>Optional: </strong>If you have WordPressMU installed in a folder (e.g. not your root folder), you will need to append the directory in front of the blog name.</p>
<p>For instance, if you have http://mysite.com/blog (as your WordPress MU root folder) the ^/ BLOG1 would be</p>
<p>^/blog/BLOG1</p>
<p><strong>Optional: Multiple blogs with same access restrictions</strong><br />
By default, the Apache Rewrite treats every line as an AND statement. If you have multiple blogs, you will need to have an [OR] at the end of the line.</p>
<p><code>RewriteCond %{REQUEST_URI} ^/BLOG1 [OR]<br />
RewriteCond %{REQUEST_URI} ^/BLOG2</code></p>
<p><strong>Errors?</strong></p>
<ul>
<li>Make sure you have ^/ marks in front of the blog names</li>
<li>IP addresses must have a backslash before each dot. Regular expression for dot is concatenate by default, so it needs to be escaped</li>
<li>Make sure you don&#8217;t forget the !^ sign before the IP, otherwise you will be forbidden.</li>
</ul>
<p>If all else fails, if can&#8217;t fix the  error, just copy back the .htaccess-backup to the .htaccess file.</p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2009/07/wordpress-mu-limit-access-to-certain-blogs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian: Fix for Mailman server that won&#8217;t start</title>
		<link>http://albertech.net/2009/07/debian-fix-for-mailman-server-that-wont-start/</link>
		<comments>http://albertech.net/2009/07/debian-fix-for-mailman-server-that-wont-start/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 19:49:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[mailman]]></category>
		<category><![CDATA[qrunner]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=200</guid>
		<description><![CDATA[Recently, there was a Mailman upgrade that seems to break Mailman if you don't have a list called "mailman" on your server. Symptoms of this error include:

/var/log/mailman/error
<code>mailmanctl(2801): PID unreadable in: /var/run/mailman/mailman.pid
mailmanctl(2801): [Errno 2] No such file or directory: '/var/run/mailman/mailman.pid'
mailmanctl(2801): Is qrunner even running?
</code>

If you try to restart mailman
<code>/etc/rc2.d/S20mailman restart</code>
and get the same error, then you need to check whether you have a "mailman" list on your server.

To install mailman list, follow this resource:
<a href="http://www.askdavetaylor.com/why_is_mailman_complaining_site_list_is_missing_mailman.html">http://www.askdavetaylor.com/why_is_mailman_complaining_site_list_is_missing_mailman.html</a>

After installing the mailman list, you can try restarting the mailman qrunner service to see if it works.
<code>/etc/rc2.d/S20mailman start</code>]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2009%252F07%252Fdebian-fix-for-mailman-server-that-wont-start%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Debian%3A%20Fix%20for%20Mailman%20server%20that%20won%27t%20start%22%20%7D);"></div>
<p>Recently, there was a Mailman upgrade that seems to break Mailman if you don&#8217;t have a list called &#8220;mailman&#8221; on your server. Symptoms of this error include:</p>
<p>/var/log/mailman/error<br />
<code>mailmanctl(2801): PID unreadable in: /var/run/mailman/mailman.pid<br />
mailmanctl(2801): [Errno 2] No such file or directory: '/var/run/mailman/mailman.pid'<br />
mailmanctl(2801): Is qrunner even running?<br />
</code></p>
<p>If you try to restart mailman<br />
<code>/etc/rc2.d/S20mailman restart</code><br />
and get the same error, then you need to check whether you have a &#8220;mailman&#8221; list on your server.</p>
<p>To install mailman list, follow this resource:<br />
<a href="http://www.askdavetaylor.com/why_is_mailman_complaining_site_list_is_missing_mailman.html">http://www.askdavetaylor.com/why_is_mailman_complaining_site_list_is_missing_mailman.html</a></p>
<p>After installing the mailman list, you can try restarting the mailman qrunner service to see if it works.<br />
<code>/etc/rc2.d/S20mailman start</code></p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2009/07/debian-fix-for-mailman-server-that-wont-start/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian: fixing GPG error on apt-get update</title>
		<link>http://albertech.net/2009/06/debian-fixing-gpg-error-on-apt-get-update/</link>
		<comments>http://albertech.net/2009/06/debian-fixing-gpg-error-on-apt-get-update/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 22:14:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[gpg error]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=179</guid>
		<description><![CDATA[<strong>If you get a GPG error when doing an apt-get update</strong>, here's the quickest way to fix it.The error message looks similar to:
<blockquote>W: GPG error: http://security.debian.org etch/updates Release:
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXX: There is no public key available for the following key IDs: W: You may want to run apt-get update to correct these problems</blockquote>
By default, it says "You may want to run apt-get update to correct these problems". The problem is, apt-get update doesn't fix the keys automagically. To fix, you will need to update the debian keyring by ... ]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2009%252F06%252Fdebian-fixing-gpg-error-on-apt-get-update%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Debian%3A%20fixing%20GPG%20error%20on%20apt-get%20update%22%20%7D);"></div>
<p><strong>If you get a GPG error when doing an apt-get update</strong>, here&#8217;s the quickest way to fix it.The error message looks similar to:</p>
<blockquote><p>W: GPG error: http://security.debian.org etch/updates Release:<br />
The following signatures couldn&#8217;t be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXX: There is no public key available for the following key IDs: W: You may want to run apt-get update to correct these problems</p></blockquote>
<p>By default, it says &#8220;You may want to run apt-get update to correct these problems&#8221;. The problem is, apt-get update doesn&#8217;t fix the keys automagically. To fix, you will need to update the debian keyring by typing:</p>
<blockquote><p><strong>apt-get install debian-archive-keyring</strong></p></blockquote>
<p>After installing the keyring, you will get a list of keys that were updated, added, or deleted. This should resolve the problem. It worked for me on apt-get update for an etch install that broke.</p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2009/06/debian-fixing-gpg-error-on-apt-get-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian on VMWARE: Installing VMWare Tools</title>
		<link>http://albertech.net/2009/05/debian-on-vmware-installing-vmware-tools/</link>
		<comments>http://albertech.net/2009/05/debian-on-vmware-installing-vmware-tools/#comments</comments>
		<pubDate>Fri, 15 May 2009 21:54:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[VMWARE]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[install vmware tools]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=164</guid>
		<description><![CDATA[<strong>Why install VMWARE Tools?
</strong>Improved display support with SVGA driver
Cut and paste from host onto the VMWare guest
Automation of guest operating system commands
Sync time
Shrinking disk space
Startup and shutdown scripts

<strong>In order to install VMWARE tools on Debian, you will need to make sure you have the package "linux-headers-[kernel version]" installed.</strong>

If not, you will get a prompt during the configuration asking for the path of the C header files.

To find the version of your kernel, type in:
<strong>uname -a</strong>

It should say something like Linux infomine 2.6.26-2-amd64 (with your current CPU architecture at the end)

****
NOTE: Do this at your own risk. If you put the ... ]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2009%252F05%252Fdebian-on-vmware-installing-vmware-tools%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Debian%20on%20VMWARE%3A%20Installing%20VMWare%20Tools%22%20%7D);"></div>
<p><strong>Why install VMWARE Tools?<br />
</strong>Improved display support with SVGA driver<br />
Cut and paste from host onto the VMWare guest<br />
Automation of guest operating system commands<br />
Sync time<br />
Shrinking disk space<br />
Startup and shutdown scripts</p>
<p><strong>In order to install VMWARE tools on Debian, you will need to make sure you have the package &#8220;linux-headers-[kernel version]&#8221; installed.</strong></p>
<p>If not, you will get a prompt during the configuration asking for the path of the C header files.</p>
<p>To find the version of your kernel, type in:<br />
<strong>uname -a</strong></p>
<p>It should say something like Linux infomine 2.6.26-2-amd64 (with your current CPU architecture at the end)</p>
<p>****<br />
NOTE: Do this at your own risk. If you put the wrong version of the kernel header files, things will break.<br />
****</p>
<p>After identifying what kernel you are using, then add the linux header files<br />
<strong>apt-get install linux-headers-[kernel version]</strong><br />
For instance,  apt-get install linux-headers-2.6.26-2-amd64</p>
<p><strong>Then follow the Vmware documentation on installing VMWARE Tools:<br />
</strong><a href="http://www.vmware.com/support/gsx3/doc/tools_install_lin_gsx.html"><strong>http://www.vmware.com/support/gsx3/doc/tools_install_lin_gsx.html</strong></a></p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2009/05/debian-on-vmware-installing-vmware-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian on VMWARE: Troubleshoot Network</title>
		<link>http://albertech.net/2009/05/debian-on-vmware-troubleshoot-network/</link>
		<comments>http://albertech.net/2009/05/debian-on-vmware-troubleshoot-network/#comments</comments>
		<pubDate>Tue, 12 May 2009 00:50:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[VMWARE]]></category>
		<category><![CDATA[clone network]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=162</guid>
		<description><![CDATA[Ever change the Network MAC address setting in VMWARE and you can't get the network to work?

Here's a quick how-to on changing the MAC address on a Linux VM. This is useful if you want to clone an existing machine and want to have both machines running with network at the same time. I am using VMWARE Server 2.0. (free version)
]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2009%252F05%252Fdebian-on-vmware-troubleshoot-network%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Debian%20on%20VMWARE%3A%20Troubleshoot%20Network%22%20%7D);"></div>
<p>Ever change the Network MAC address setting in VMWARE and you can&#8217;t get the network to work?</p>
<p>Here&#8217;s a quick how-to on changing the MAC address on a Linux VM. This is useful if you want to clone an existing machine and want to have both machines running with network at the same time. I am using VMWARE Server 2.0. (free version)</p>
<p>1) Power down the VM that you want to change the MAC address on. (e.g. cloned computer)<br />
2) On the VMWARE console, select your (cloned) VM machine on the left side. In the Summary tab, click on &#8220;Edit&#8221; in the Network adapter section. The MAC address needs to be set the &#8220;Manual&#8221;. In the textbox, set the MAC address. It will need to start with 00:50:56 and end with XX:XX:XX to a value between 00:00:00 and FF:FF:FF. For instance, you can use 00:50:56:FF:FF:FF as a MAC address.  Click on OK.</p>
<p>3) If you are using Static IP address. Follow this step: On your VM console, click on the Summary Tab for the VM you changed the settings on. On the Network Adapter 1, click on &#8220;Edit&#8221;. Uncheck the box that says &#8220;Connect at power on&#8221;  Click on OK.</p>
<p>Turn on Debian box. Login as root. If you are using static IP, you will first need to change the IP to a new one. Edit the &#8220;/etc/network/interfaces&#8221; file. On the &#8220;address&#8221; line of your network adapter (eth0, &#8230; eth5)  change the IP.  Shutdown computer. Go to VMWARE console, edit Network Adapter 1, check the network box that says &#8220;Connect at power on&#8221;.</p>
<p>4) Power on the VM. Login as root.</p>
<p>5) Go to /etc/udev/rules.d/</p>
<p>6) There should be a file called &#8220;70-persistent-net.rules&#8221;. Backup the file. Edit this file. Find the line that matches the MAC address that you entered in step 3.  If you can&#8217;t find it (that maybe the problem), edit the last network device on the list. In the &#8220;ATTRS{address}==&#8221; section, enter the MAC address that you added. Note what NAME it is.  It should be something like &#8220;eth0&#8243; or &#8220;eth&#8230;.&#8221;  Save the file.</p>
<p>7) Now edit /etc/network/interfaces file. Your will need to make sure the &#8220;eth&#8221; matches the NAME of the hardware device in step 8. For instance, if the name is eth0 &#8212; make sure the name of the interfaces is eth0 and the allow-hotplug line is eth0 as well.</p>
<p> <img src='http://albertech.net/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> Run the command &#8220;ifup [NAME]&#8221; for instance ifup eth0. You should get a status message whether the network works.  If you get a conflict error, you are either using a MAC address that is on another VM or a static IP address of another computer. If its a conflict of IP, change the IP in step 3. To troubleshoot network device not working, stop the VM machine &#8212; look in the Network adapter field. Write down the MAC address. Go back to step 6.</p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2009/05/debian-on-vmware-troubleshoot-network/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian: Broken grub after Lenny upgrade</title>
		<link>http://albertech.net/2009/05/debian-broken-grub-after-lenny-upgrade/</link>
		<comments>http://albertech.net/2009/05/debian-broken-grub-after-lenny-upgrade/#comments</comments>
		<pubDate>Fri, 01 May 2009 10:49:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[lenny upgrade]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=156</guid>
		<description><![CDATA[I've done multiple Debain upgrades from Etch to Lenny and have noticed there are some issues with grub breaking. The upgrade somehow puts the wrong hard drive information in the default grub file. Here's some recommendations on how to perform the Lenny upgrade]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2009%252F05%252Fdebian-broken-grub-after-lenny-upgrade%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Debian%3A%20Broken%20grub%20after%20Lenny%20upgrade%22%20%7D);"></div>
<p>I&#8217;ve done multiple Debian upgrades from Etch to Lenny and have noticed there are some issues with grub breaking. The upgrade somehow puts the wrong hard drive information in the default grub file.</p>
<p>Here&#8217;s some recommendations on how to perform the Lenny upgrade:</p>
<p><strong>The safest way (before upgrading) is to look at the grub file:</strong><br />
nano /boot/grub/menu.lst</p>
<p>Look at the &#8220;default:&#8221; section and note which partition it uses to boot up. For instance look at the areas in red below:<br />
<code>root <strong><span style="color: #ff0000;">(hd1,1)<br />
</span></strong>kernel /boot/vmlinuz-2.6.18-5-686 root=<span style="color: #ff0000;"><strong>/dev/sda2</strong></span> ro<br />
</code><br />
In my situation, those two partitions were incorrect after performing the upgrade.  This leads to ALL the items in the grub menu breaking, which can be scary at first. You can however mount the hard drive on a working copy of Debian to get the correct partition or use the emergency CD to get into a working shell.</p>
<p><strong>Here&#8217;s a guide on how to upgrade from Etch</strong><br />
<a href="http://www.debianadmin.com/howto-upgrade-from-debian-etch-40-to-lenny-50.html">http://www.debianadmin.com/howto-upgrade-from-debian-etch-40-to-lenny-50.html</a></p>
<p><strong>If your grub is broken after the upgrade and you didn&#8217;t look at the partition info:</strong><br />
There is still hope! When grub loads up, press the &#8220;e&#8221; key to edit the grub menu file.</p>
<p><strong>If grub doesn&#8217;t even load Linux properly, you will need to edit this:</strong><br />
1) Select the line with root(XXX,XXX). Press the &#8220;e&#8221; key to edit the line<br />
2) This will be a guessing game, but most likely changing the hd1 to hd0 can fit it. E.g. (hd0,1)<br />
3) After making the change, press &#8220;b&#8221; to boot<br />
4) If it works, go into /boot/grub/menu.lst to edit the file and make the change in the default section.</p>
<p><strong>If grub loads Linux, but it hangs on loading root partition, you will need to edit this line:</strong><br />
<span style="font-family: Courier New;">kernel /boot/vmlinuz-2.6.18-5-686 root=<span style="color: #ff0000;"><strong>/dev/sda2</strong></span> ro</span><br />
1) Press the &#8220;e&#8221; key to edit this line<br />
2) Change the /dev/XXX to the correct partition. Again, this might be another guessing game<br />
but you can try changing the root= to /dev/sda1 or /dev/sda2<br />
3) After making the change, press the &#8220;b&#8221; key to boot<br />
4)  If it works, go into /boot/grub/menu.lst to edit the file and make the change in the default section.</p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2009/05/debian-broken-grub-after-lenny-upgrade/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Amanda Backups: Exclude.gtar</title>
		<link>http://albertech.net/2009/04/amanda-backups-excludegtar/</link>
		<comments>http://albertech.net/2009/04/amanda-backups-excludegtar/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 22:39:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[exclude.gtar]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=152</guid>
		<description><![CDATA[The Amanda backup system is a great resource for backing up your Linux system. One of the things I noticed with the latest version is that the exclusion list has been breaking. For instance, Amanda backups are now backing up the /tmp folder, which causes it complain with the PHP session lock files. All was needed to fix was adding a leading dot in front of each folder.]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2009%252F04%252Famanda-backups-excludegtar%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Amanda%20Backups%3A%20Exclude.gtar%22%20%7D);"></div>
<p>The Amanda backup system is a great resource for backing up your Linux system. One of the things I noticed with the latest version is that the exclusion list has been breaking. For instance, Amanda backups are now backing up the /tmp folder, which causes it complain with the PHP session lock files. All was needed to fix was adding a leading dot in front of each folder.<br />
<strong><br />
Here&#8217;s is a copy of my working amanda.gtar file:</strong><br />
<code>./tmp<br />
./dev<br />
./sys<br />
./config<br />
./proc<br />
./mnt<br />
./cdrom<br />
./lost+found<br />
./opt<br />
</code></p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2009/04/amanda-backups-excludegtar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KDE: How to fix &#8220;No greeter widget plugin loaded&#8221; error</title>
		<link>http://albertech.net/2009/04/kde-how-to-fix-no-greeter-widget-plugin-loaded-error/</link>
		<comments>http://albertech.net/2009/04/kde-how-to-fix-no-greeter-widget-plugin-loaded-error/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 21:38:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[greeter widget]]></category>
		<category><![CDATA[kde]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=142</guid>
		<description><![CDATA[I was helping one of the staff today with their Debian setup. KDE somehow broke after they did an apt-get update. Turns out there must have been like 40-50 packages that must have been in the update and thus one of them broke during the upgrade.

Upon startup, there was a unique error message that came up with KDE during the startup phase -- "No greeter widget plugin loaded. Check the configuration." with an OK box. Clicking the OK box would lead to KDE exiting to shell. Reinstalling kdm had no effect. The fix? Read the article to see...]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2009%252F04%252Fkde-how-to-fix-no-greeter-widget-plugin-loaded-error%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22KDE%3A%20How%20to%20fix%20%5C%22No%20greeter%20widget%20plugin%20loaded%5C%22%20error%22%20%7D);"></div>
<p>I was helping one of the staff today with their Debian setup. KDE somehow broke after they did an apt-get update. Turns out there must have been like 40-50 packages that must have been in the update and thus one of them broke during the upgrade.</p>
<p>Upon startup, there was a unique error message that came up with KDE during the startup phase &#8212; &#8220;No greeter widget plugin loaded. Check the configuration.&#8221; with an OK box. Clicking the OK box would lead to KDE exiting to shell. Reinstalling kdm had no effect. The fix?</p>
<p><code>apt-get install kdebase-workspace</code></p>
<p>Seems like the dependency of kde install/update is missing the kdebase-workspace package.</p>
<p>To check to see if this works, restart KDE by going to<br />
<code>/etc/init.d/kdm stop<br />
/etc/init.d/kdm start</code></p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2009/04/kde-how-to-fix-no-greeter-widget-plugin-loaded-error/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Analyzing large web log files</title>
		<link>http://albertech.net/2009/02/parse-large-logfile/</link>
		<comments>http://albertech.net/2009/02/parse-large-logfile/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 05:11:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[log files]]></category>
		<category><![CDATA[regular expressions]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=91</guid>
		<description><![CDATA[<strong>The fastest way to trim down large web log files is through UNIX/Linux shell</strong>. Large files exceeding 1 GB (millions of lines of logs) are not easily editable using a GUI interface, so the fastest way is to parse them is via command line. You can trim them down according to a time range, remove internal requests from within the company, and remove bots/crawlers data from the log files.

For instance, I have a 4GB log file with about two years worth of info (2007-2009) in there. What if I just wanted the logs from 2008? First, run the "head -10" command ... ]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2009%252F02%252Fparse-large-logfile%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Analyzing%20large%20web%20log%20files%22%20%7D);"></div>
<p><strong>The fastest way to trim down large web log files is through UNIX/Linux shell</strong>. Large files exceeding 1 GB (millions of lines of logs) are not easily editable using a GUI interface, so the fastest way is to parse them is via command line. You can trim them down according to a time range, remove internal requests from within the company, and remove bots/crawlers data from the log files.</p>
<p>For instance, I have a 4GB log file with about two years worth of info (2007-2009) in there. What if I just wanted the logs from 2008? First, run the &#8220;head -10&#8243; command on the log file to see what the general format of the log is.</p>
<p>Preferably, it is in the YYYY-MM-DD hour:min:second format. If you are building a custom log file from scratch, make sure you have the dash delimiter between the dates to make it easier to work with after. For me, the log file that I was given was in the YYYYMMDDHHMMSS (e.g. timestamp format) Luckily, with regular expressions, you can still parse the file accordingly.<br />
<code><br />
20070101000013 4ms 0ms 8ms<br />
20070101000019 4ms 0ms 8ms<br />
</code><br />
Make sure you have enough disk space before proceeding, at least enough to handle twice the size of the logfile. Run a &#8220;df&#8221; to check available space and &#8220;ls -lah&#8221; to see the size of the files in your log directory.<br />
So, if you only want the logs from 2008 (using the example above) you can run the following command.</p>
<p><code>cat [INPUTLOGFILE] | grep '^2008' &gt; [OUTPUTLOGFILE]</code></p>
<p>This will look through each line, run a regular expression match with 2008 at the beginning of the line. If the logfile does not start with the date, you can still run a match if the date appears anywhere in the line (if in the YYYY-DD-MM format)</p>
<p><code>cat [INPUTLOGFILE] | grep '2008-' &gt; [OUTPUTLOGFILE]</code></p>
<p>What if you want to omit googlebots and crawlers directly from the log file? Most log analysis programs have a filter that looks in the user agent string to check if the source is from a crawler. But, not all crawlers use the user agent string. Some set the user agent string to a common browser. If you have dns lookups on, you can try filtering logs that match the domain googlebot.com . The &#8220;grep -v &#8221; command is handy since it excludes all lines that match that particular value.</p>
<p><code>cat [INPUTLOGFILE] | grep -v 'googlebot.com' &gt; [OUTPUTLOGFILE]</code></p>
<p>Another use is to filter out all local requests coming from your department/building/company. This would be good to see where your external users are coming from. If you have DNS turned on:<br />
<code><br />
cat [INPUTLOGFILE] | grep -v 'mycompany.com' &gt; [OUTPUTLOGFILE]</code></p>
<p>If you don&#8217;t have DNS turned on, you can filter by IP range<br />
<code><br />
cat [INPUTLOGFILE] | grep -v '123.456.789.' &gt; [OUTPUTLOGFILE]</code></p>
<p>Check the number of lines in the logfile (before and after comparison) with:<br />
<code>wc -l [LOGFILE]</code></p>
<p><strong>For more information, checkout these resources:</strong><br />
<a href="http://www.robelle.com/smugbook/regexpr.html">http://www.robelle.com/smugbook/regexpr.html</a></p>
<p><strong>What if you don&#8217;t have access to UNIX/Linux?</strong> There&#8217;s Cygwin for Windows, although I don&#8217;t recommend running it with huge log files. I&#8217;ll eventually try it at some point to see if it&#8217;ll work <img src='http://albertech.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
<a href="http://www.cygwin.com/">http://www.cygwin.com/</a></p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2009/02/parse-large-logfile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Awstats setup in Debian</title>
		<link>http://albertech.net/2009/01/awstats-debiansetup/</link>
		<comments>http://albertech.net/2009/01/awstats-debiansetup/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 03:05:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[awstats]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[geoIP]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=65</guid>
		<description><![CDATA[<strong>Installing awstats in Debian with GeoIP caching
</strong>

<strong>First, use apt-get to get the software:</strong>

apt-get install awstats

<strong>Configure awstats:</strong>
Instead of using the awstats configure tool (written in Perl), manually add in the awstats Apache configuration. Using the <a href="http://www.debuntu.org/2006/04/21/33-how-to-setting-up-awstats-with-apache-2-on-debianubuntu">tutorial from debuntu</a>, make a file inside your apache config folder called awstats.conf with the following lines.

<code>Alias /awstatsclasses "/usr/share/awstats/lib/"
Alias /awstats-icon/ "/usr/share/awstats/icon/"
Alias /awstatscss "/usr/share/doc/awstats/examples/css"
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch</code>

<strong>Inside the Apache2.conf file (or virtual host conf file inside the sites-available folder) add this to the end of the file:</strong>

<code>Include /etc/apache2/awstats.conf</code>

<strong>Next, copy the /usr/lib/cgi-bin/awstats.pl file to the apache cgi-bin folder.</strong> If you have virtual hosts enabled, copy it to ... ]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2009%252F01%252Fawstats-debiansetup%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Awstats%20setup%20in%20Debian%22%20%7D);"></div>
<p><strong>Installing awstats in Debian with GeoIP caching<br />
</strong></p>
<p><strong>First, use apt-get to get the software:</strong></p>
<p>apt-get install awstats</p>
<p><strong>Configure awstats:</strong><br />
Instead of using the awstats configure tool (written in Perl), manually add in the awstats Apache configuration. Using the <a href="http://www.debuntu.org/2006/04/21/33-how-to-setting-up-awstats-with-apache-2-on-debianubuntu">tutorial from debuntu</a>, make a file inside your apache config folder called awstats.conf with the following lines.</p>
<p><code>Alias /awstatsclasses "/usr/share/awstats/lib/"<br />
Alias /awstats-icon/ "/usr/share/awstats/icon/"<br />
Alias /awstatscss "/usr/share/doc/awstats/examples/css"<br />
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch</code></p>
<p><strong>Inside the Apache2.conf file (or virtual host conf file inside the sites-available folder) add this to the end of the file:</strong></p>
<p><code>Include /etc/apache2/awstats.conf</code></p>
<p><strong>Next, copy the /usr/lib/cgi-bin/awstats.pl file to the apache cgi-bin folder.</strong> If you have virtual hosts enabled, copy it to the cgi-bin located in the designated virtual hosts folder.</p>
<p><strong>Configure the awstats.conf sample file located in /etc/awstats/awstats.conf</strong><br />
1) Set the LogFile to the server&#8217;s logfile directory (usually /var/log/apache2/access.log)<br />
2) Set LogFormat to 1.<br />
3) Set DNSLookup=0 (No DNS Lookup is necessary when you use GeoIP DB, instructions are below)<br />
4) Uncomment this line (remove the # from the beginning)<br />
LoadPlugin=&#8221;geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat&#8221;</p>
<p><strong>Install GeoIP to speed up the hostname lookups. </strong>This will significanly improve the performance since DNS lookups will generally take a long time. Using <a href="http://www.ducea.com/2006/06/14/install-geoip-perl-module-on-debian/">this tutorial</a>, install the GeoIP library:</p>
<p>wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.5.tar.gz</p>
<p>Download and extract the file.  Inside the GeoIP 1.4.5 folder, run:</p>
<p><code>./configure<br />
make<br />
make check<br />
make install<br />
</code></p>
<p>Next, download the latest GeoIP perl module -and- latest GeoLite country database.<br />
<a href="http://www.maxmind.com/download/geoip/api/perl/">http://www.maxmind.com/download/geoip/api/perl/</a> I usually run wget to download the file from shell. wget http://geolite.maxmind.com/download/geoip/api/perl/Geo-IP-1.36.tar.gz</p>
<p>Extract the tar file and inside the Geo-IP folder, run:</p>
<p><code>perl Makefile.PL<br />
make<br />
make test<br />
make install</code></p>
<p><strong>GeoIP should now be installed. You can now generate the reports:</strong><br />
/usr/lib/cgi-bin/awstats.pl -config=[NAME OF YOUR INSTALL] -update<br />
For instance, if you called the install &#8220;sample&#8221;, you should have a file called /etc/awstats/awstats.sample.conf    The command for sample would be:<br />
/usr/lib/cgi-bin/awstats.pl -config=sample -update<br />
<strong><br />
To run awstats:<br />
http://[SERVER]/cgi-bin/awstats.pl?config=[NAME OF YOUR INSTALL]</strong></p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2009/01/awstats-debiansetup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text in SSH window stuck at fixed width</title>
		<link>http://albertech.net/2008/11/text-in-ssh-window-stuck-at-fixed-width/</link>
		<comments>http://albertech.net/2008/11/text-in-ssh-window-stuck-at-fixed-width/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 21:16:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=29</guid>
		<description><![CDATA[If you ssh into your server and the text is stuck at 80 characters per line, you will need to check the sshd setting in /etc/ssh/sshd_config (Debian)

Make sure the X11 setting is set to yes. This will allow you to expand your terminal window to beyond 80 characters per line.  Otherwise, it will be limited to the display settings in console.
<code>
X11Forwarding yes</code>]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2008%252F11%252Ftext-in-ssh-window-stuck-at-fixed-width%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Text%20in%20SSH%20window%20stuck%20at%20fixed%20width%22%20%7D);"></div>
<p>If you ssh into your server and the text is stuck at 80 characters per line, you will need to check the sshd setting in /etc/ssh/sshd_config (Debian)</p>
<p>Make sure the X11 setting is set to yes. This will allow you to expand your terminal window to beyond 80 characters per line.  Otherwise, it will be limited to the display settings in console.<br />
<code><br />
X11Forwarding yes</code></p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2008/11/text-in-ssh-window-stuck-at-fixed-width/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
