<?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>Ian Dunn &#187; Linux / Unix</title>
	<atom:link href="http://iandunn.name/category/linux-unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://iandunn.name</link>
	<description>Seattle-based web developer blogging about tips and solutions</description>
	<lastBuildDate>Sat, 04 Feb 2012 00:22:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Updating Packages in an OpenVZ VPS</title>
		<link>http://iandunn.name/updating-packages-in-a-openvz-vps/</link>
		<comments>http://iandunn.name/updating-packages-in-a-openvz-vps/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 01:10:37 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux / Unix]]></category>
		<category><![CDATA[OpenVZ / Virtuozzo / Plesk]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://iandunn.name/?p=883</guid>
		<description><![CDATA[Sam Mingolelli has posted some <a title="Keeping CentOS 5 OpenVZ images up to Date with Yum" href="http://www.lamolabs.org/blog/1114/keeping-centos-5-openvz-images-up-to-date-with-yum/">useful solutions</a> to common problems when running yum update inside an OpenVZ VE.]]></description>
			<content:encoded><![CDATA[<p>Sam Mingolelli has posted some <a title="Keeping CentOS 5 OpenVZ images up to Date with Yum" href="http://www.lamolabs.org/blog/1114/keeping-centos-5-openvz-images-up-to-date-with-yum/">useful solutions</a> to common problems when running <em>yum update</em> inside an OpenVZ VE.</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/updating-packages-in-a-openvz-vps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Directory Permissions for WordPress under Plesk/Linux</title>
		<link>http://iandunn.name/directory-permissions-for-wordpress-under-plesk-linux/</link>
		<comments>http://iandunn.name/directory-permissions-for-wordpress-under-plesk-linux/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 19:36:41 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux / Unix]]></category>
		<category><![CDATA[OpenVZ / Virtuozzo / Plesk]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Directory]]></category>
		<category><![CDATA[Safe Mode]]></category>

		<guid isPermaLink="false">http://iandunn.name/?p=669</guid>
		<description><![CDATA[Jason Diehl describes the right way to <a href="http://www.wordpress-master.com/upload-permissions-wordpress-plesk.html">setup directory permissions on a Linux box running Plesk so that WordPress can automatically create the directories</a> it uses to store uploads. Basically, you need to make sure that PHP&#8217;s safe mode is turned off and that wp-content is owned by apache, in the apache group, and chmod&#8217;d to 777.]]></description>
			<content:encoded><![CDATA[<p>Jason Diehl describes the right way to <a href="http://www.wordpress-master.com/upload-permissions-wordpress-plesk.html">setup directory permissions on a Linux box running Plesk so that WordPress can automatically create the directories</a> it uses to store uploads. Basically, you need to make sure that PHP&#8217;s safe mode is turned off and that wp-content is owned by apache, in the apache group, and chmod&#8217;d to 777.</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/directory-permissions-for-wordpress-under-plesk-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Additional Software on Endian Firewall</title>
		<link>http://iandunn.name/installing-additional-software-on-endian-firewall/</link>
		<comments>http://iandunn.name/installing-additional-software-on-endian-firewall/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 03:28:41 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux / Unix]]></category>
		<category><![CDATA[Endian Firewall]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=402</guid>
		<description><![CDATA[Endian doesn&#8217;t ship with gcc, apt or yum, so it can be kind of confusing at first if you&#8217;re trying to figure out how to install some extra packages. It comes with <a href="http://labix.org/smart/">Smart Package Manager</a> , which you can use to install CentOS binary RPMs from  <a href="http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/">http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/</a> (CentOS 4) or  <a href="http://mirror.centos.org/centos/5/os/i386/CentOS">http://mirror.centos.org/centos/5/os/i386/CentOS</a> / (CentOS 5). Try the version 4 first. You... [<a href="http://iandunn.name/installing-additional-software-on-endian-firewall/">more</a>]]]></description>
			<content:encoded><![CDATA[<p>Endian doesn&#8217;t ship with gcc, apt or yum, so it can be kind of confusing at first if you&#8217;re trying to figure out how to install some extra packages. It comes with <a href="http://labix.org/smart/">Smart Package Manager</a>, which you can use to install CentOS binary RPMs from <a href="http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/">http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/</a> (CentOS 4) or <a href="http://mirror.centos.org/centos/5/os/i386/CentOS">http://mirror.centos.org/centos/5/os/i386/CentOS</a>/ (CentOS 5). Try the version 4 first. You may get lots of errors if you try to install RPMs build for other distributions.</p>
<p>If anything you try to install says that it&#8217;ll remove packages (like glibc-common), <strong>don&#8217;t do it.</strong> You could remove a lot of core packages and end up having to reinstall Endian from scratch. Not that I would know anything about that&#8230;</p>
<p>First run <em>smart config &#8211;set rpm-check-signatures=False</em> to avoid errors about invalid keys. Then you can do<br />
<em>smart install http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/nano-1.2.4-1.i386.rpm</em><br />
<em>smart install http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/slocate-2.7-13.el4.8.i386.rpm</em><br />
<em>etc</em></p>
<p>You can still get stuck in <a href="http://en.wikipedia.org/wiki/Dependency_hell">dependency hell</a>, though. Smart might be able to auto download dependencies if you add a channel, but I don&#8217;t have the time/motivation to look into that right now.</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/installing-additional-software-on-endian-firewall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backing Up Files and MySQL Databases on Linux Servers</title>
		<link>http://iandunn.name/backing-up-files-and-mysql-databases-on-linux-servers/</link>
		<comments>http://iandunn.name/backing-up-files-and-mysql-databases-on-linux-servers/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 03:56:33 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux / Unix]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Backup]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=396</guid>
		<description><![CDATA[You&#8217;d think I&#8217;d have this memorized by now, but I always mess up the syntax and have to spend a few minutes digging through man pages or wading through search results to find it. tar -czf [output-file.tar.gz] [input-directory]/ mysqldump -u [username] -p [database name] &#62; [filename]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;d think I&#8217;d have this memorized by now, but I always mess up the syntax and have to spend a few minutes digging through man pages or wading through search results to find it.</p>
<p>tar -czf [output-file.tar.gz] [input-directory]/<br />
mysqldump -u [username] -p [database name] &gt; [filename]</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/backing-up-files-and-mysql-databases-on-linux-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating OpenDNS With a Dynamic IP From an Endian Firewall</title>
		<link>http://iandunn.name/updating-a-dynamic-ip-from-an-endian-firewall-to-opendns/</link>
		<comments>http://iandunn.name/updating-a-dynamic-ip-from-an-endian-firewall-to-opendns/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 15:58:45 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux / Unix]]></category>
		<category><![CDATA[ddclient]]></category>
		<category><![CDATA[Endian Firewall]]></category>
		<category><![CDATA[OpenDNS]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=312</guid>
		<description><![CDATA[The Endian router/firewall appliance comes with a Dynamic DNS client that supports the major DDNS providers, but it doesn&#8217;t support updating OpenDNS, which is necessary for any custom settings on your OpenDNS account to be applied to the traffic you pass through their servers. It&#8217;s possible to configure this yourself, though. There&#8217;s a helpful post... [<a href="http://iandunn.name/updating-a-dynamic-ip-from-an-endian-firewall-to-opendns/">more</a>]]]></description>
			<content:encoded><![CDATA[<p>The Endian router/firewall appliance comes with a Dynamic DNS client that supports the major DDNS providers, but it doesn&#8217;t support updating OpenDNS, which is necessary for any custom settings on your OpenDNS account to be applied to the traffic you pass through their servers.</p>
<p>It&#8217;s possible to configure this yourself, though. There&#8217;s a helpful post at the OpenDNS forums that describes <a href=" http://forums.opendns.com/comments.php?DiscussionID=1911&amp;page=1#Item_0">how to configure ddclient on an Endian</a> to automatically update an OpenDNS account whenever your dynamic IP address changes.</p>
<p>Here are a few additional notes that may help:</p>
<ul>
<li>You don&#8217;t need to query an external website for your IP address, since the Endian box already knows it. Set ddclient.conf with &#8220;use=if, if=eth0&#8243; (or whichever NIC is your red zone).</li>
<li>It won&#8217;t work if you set &#8220;ssl=no&#8221;, so you have to leave it set to yes and install the two Perl SSL modules listed in the post.</li>
<li>Endian doesn&#8217;t have an SMTP server installed, so ddclient can&#8217;t send you status e-mails. Comment out the &#8220;mail&#8221; and &#8220;mail-failure&#8221; lines to avoid errors.</li>
<li>Make sure you don&#8217;t have any spaces in the OpenDNS network label or ddclient conf file.</li>
</ul>
<p>To test if it&#8217;s working, you&#8217;ll need to get a new dynamic IP.</p>
<ul>
<li>Turn off your cable or dsl modem.</li>
<li>Spoof the MAC address on the Endian.
<ul>
<li>On your PC, open a command prompt and type &#8220;ipconfig /all&#8221;. Copy the value of the Physical Address line. It will look something like 00-4D-B7-D3-5F-03.</li>
<li>Go to the Network Configuration wizard on the Endian.</li>
<li>In step 4, enter your PC&#8217;s MAC into the &#8220;Spoof MAC address with&#8221; field. Change the dashes to colons so that it looks like 00:4D:B7:D3:5F:03.</li>
</ul>
</li>
<li>Shut down the Endian.</li>
<li>Turn the modem back on. Wait 15 seconds.</li>
<li>Turn the Endian back on.</li>
</ul>
<p>Once you&#8217;ve verified it&#8217;s working, you can remove the spoof setting by repeating the steps.</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/updating-a-dynamic-ip-from-an-endian-firewall-to-opendns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Error Logs with Virtuozzo</title>
		<link>http://iandunn.name/php-error-logs-with-virtuozzo/</link>
		<comments>http://iandunn.name/php-error-logs-with-virtuozzo/#comments</comments>
		<pubDate>Mon, 10 May 2010 19:26:03 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux / Unix]]></category>
		<category><![CDATA[OpenVZ / Virtuozzo / Plesk]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Logging]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=278</guid>
		<description><![CDATA[Virtuozzo sets domains up to have PHP&#8217;s display_errors flag turned off by default, so that you&#8217;ll only see a blank page when there are critical errors. This is a good thing in production environments because it avoids potential security issues, but it can also be annoying when you&#8217;re trying to debug something. Instead of displaying... [<a href="http://iandunn.name/php-error-logs-with-virtuozzo/">more</a>]]]></description>
			<content:encoded><![CDATA[<p>Virtuozzo sets domains up to have PHP&#8217;s display_errors flag turned off by default, so that you&#8217;ll only see a blank page when there are critical errors. This is a good thing in production environments because it avoids potential security issues, but it can also be annoying when you&#8217;re trying to debug something.</p>
<p>Instead of displaying the errors, you can configure PHP to log them and then use the logs for debugging. For a Linux environment, you&#8217;ll need to create a file named vhost.conf inside the domain&#8217;s conf directory, <em>/var/www/vhosts/domain.name/conf</em>.</p>
<pre class="brush: plain; title: ; notranslate">
&lt;Directory /var/www/vhosts/domain.name&gt;
  php_value error_log /var/www/vhosts/domain.name/statistics/logs/php-errors.log
  php_flag display_errors off
  php_value error_reporting 6143
  php_flag log_errors on
&lt;/Directory&gt;
</pre>
<p>Then create the file and assign it the right permissions</p>
<pre class="brush: bash; title: ; notranslate">
  cd /var/www/vhosts/domain.name/statistics/logs/
  touch php-errors.log
  chown apache php-errors.log
</pre>
<p>And the last thing is to tell Apache to reread the updated conf file</p>
<pre class="brush: bash; title: ; notranslate">
  /usr/local/psa/admin/sbin/websrvmng -a
</pre>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/php-error-logs-with-virtuozzo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firewalling an OpenVZ node and containers</title>
		<link>http://iandunn.name/firewalling-an-openvz-node-and-containers/</link>
		<comments>http://iandunn.name/firewalling-an-openvz-node-and-containers/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 17:13:31 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux / Unix]]></category>
		<category><![CDATA[OpenVZ / Virtuozzo / Plesk]]></category>
		<category><![CDATA[iptables]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=266</guid>
		<description><![CDATA[The OpenVZ wiki has a nice script for <a href="http://wiki.openvz.org/Setting_up_an_iptables_firewall">firewalling an OpenVZ node and it&#8217;s containers</a> . It creates a service and configures iptables to block all traffic to the node (except the ports you specify), but allow all traffic through to the containers, so that they can manage their own firewall. It also allows the container&#8217;s firewalls to be managed on the... [<a href="http://iandunn.name/firewalling-an-openvz-node-and-containers/">more</a>]]]></description>
			<content:encoded><![CDATA[<p>The OpenVZ wiki has a nice script for <a href="http://wiki.openvz.org/Setting_up_an_iptables_firewall">firewalling an OpenVZ node and it&#8217;s containers</a>. It creates a service and configures iptables to block all traffic to the node (except the ports you specify), but allow all traffic through to the containers, so that they can manage their own firewall. It also allows the container&#8217;s firewalls to be managed on the node through a simple config file.</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/firewalling-an-openvz-node-and-containers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Relaying Qmail Through a Spam Filter</title>
		<link>http://iandunn.name/relaying-qmail-through-a-spam-filter/</link>
		<comments>http://iandunn.name/relaying-qmail-through-a-spam-filter/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 01:19:47 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux / Unix]]></category>
		<category><![CDATA[OpenVZ / Virtuozzo / Plesk]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[Qmail]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=250</guid>
		<description><![CDATA[If you&#8217;re running a mail service on a web server so it can send out e-mail from contact forms, etc then you&#8217;ll want to make sure it&#8217;s <a href="http://blog.pivotalweb.com/?p=19">relaying outbound mail through a spam filter</a> , or it could be used to send spam if the forms get hijacked. For qmail, you just need to create /var/qmail/control/smtproutes and enter &#8220;:yourmailserver.com&#8221;, then restart. Make... [<a href="http://iandunn.name/relaying-qmail-through-a-spam-filter/">more</a>]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re running a mail service on a web server so it can send out e-mail from contact forms, etc then you&#8217;ll want to make sure it&#8217;s <a href="http://blog.pivotalweb.com/?p=19">relaying outbound mail through a spam filter</a>, or it could be used to send spam if the forms get hijacked. For qmail, you just need to create /var/qmail/control/smtproutes and enter &#8220;:yourmailserver.com&#8221;, then restart. Make sure the spam filter is configured to allow the mail server to relay through it.</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/relaying-qmail-through-a-spam-filter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Skipping Disk Check When Rebooting Linux Server</title>
		<link>http://iandunn.name/skipping-disk-check-when-rebooting-linux-server/</link>
		<comments>http://iandunn.name/skipping-disk-check-when-rebooting-linux-server/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 00:35:31 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux / Unix]]></category>
		<category><![CDATA[fsck]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=246</guid>
		<description><![CDATA[If you don&#8217;t run a disk check on a Linux server in awhile and you reboot, it may force a disk check, which can take 30+ minutes, and it&#8217;ll be offline the entire time. You can reboot and skip the check with shutdown -fr now or force a check with shutdown -Fr now. (via <a href="http://www.go2linux.org/reboot-check-disks-for-errors-avoid-force-fsck">go2linux.org</a> ) &#160;]]></description>
			<content:encoded><![CDATA[<p class="codigo">If you don&#8217;t run a disk check on a Linux server in awhile and you reboot, it may force a disk check, which can take 30+ minutes, and it&#8217;ll be offline the entire time. You can reboot and skip the check with <strong><em>shutdown -fr now</em><span style="font-weight: normal;"> or force a check with <strong><em>shutdown -Fr now</em><span style="font-weight: normal;">. (via <a href="http://www.go2linux.org/reboot-check-disks-for-errors-avoid-force-fsck">go2linux.org</a>)</span></strong></span></strong></p>
<p class="codigo">&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/skipping-disk-check-when-rebooting-linux-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert Filenames to Lowercase on Linux</title>
		<link>http://iandunn.name/convert-filenames-to-lowercase-on-linux/</link>
		<comments>http://iandunn.name/convert-filenames-to-lowercase-on-linux/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 17:56:22 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux / Unix]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=224</guid>
		<description><![CDATA[If you transfer files from a Windows server to a Linux one, you may get some broken links because Linux is case-sensative while Windows isn&#8217;t. You can <a href="http://www.linuxjournal.com/content/convert-filenames-lowercase">rename all the files on the Linux server to their lowercase equivalents</a> with this shell script from Linux Journal.]]></description>
			<content:encoded><![CDATA[<p>If you transfer files from a Windows server to a Linux one, you may get some broken links because Linux is case-sensative while Windows isn&#8217;t. You can <a href="http://www.linuxjournal.com/content/convert-filenames-lowercase">rename all the files on the Linux server to their lowercase equivalents</a> with this shell script from Linux Journal.</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/sh
# lowerit
# convert all file names in the current directory to lower case
# only operates on plain files--does not change the name of directories
# will ask for verification before overwriting an existing file
for x in `ls`
do
	if [ ! -f $x ]; then
		continue
	fi

	lc=`echo $x  | tr '[A-Z]' '[a-z]'`
	if [ $lc != $x ]; then
		mv -i $x $lc
	fi
done
</pre>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/convert-filenames-to-lowercase-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

