<?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>Tequila Fish &#187; Fedora</title>
	<atom:link href="http://www.tequilafish.com/category/tech/linux/fedora/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tequilafish.com</link>
	<description>Ran-dumb ramblings of me...</description>
	<lastBuildDate>Thu, 26 Jan 2012 23:30:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Slicehost: Setting up a Tor relay on Fedora to help keep Iran connected #IranElection</title>
		<link>http://www.tequilafish.com/2009/06/21/slicehost-setting-up-a-tor-relay-on-fedora-to-help-keep-iran-connected-iranelection/</link>
		<comments>http://www.tequilafish.com/2009/06/21/slicehost-setting-up-a-tor-relay-on-fedora-to-help-keep-iran-connected-iranelection/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 20:23:50 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Politics]]></category>
		<category><![CDATA[#iranelection]]></category>
		<category><![CDATA[bittorrent]]></category>
		<category><![CDATA[dcma]]></category>
		<category><![CDATA[iran]]></category>
		<category><![CDATA[relay]]></category>
		<category><![CDATA[slicehost]]></category>
		<category><![CDATA[tor]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/?p=319</guid>
		<description><![CDATA[As many of you know, most of the information from within Iran is coming from on-the-ground new-media and social networking sites such as Twitter, YouTube, and Facebook. This is happening despite crackdowns on communications networks by the Iranian government. The way this information is able to escape the firewalls of Iran is via proxies which [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2009%2F06%2F21%2Fslicehost-setting-up-a-tor-relay-on-fedora-to-help-keep-iran-connected-iranelection%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2009%2F06%2F21%2Fslicehost-setting-up-a-tor-relay-on-fedora-to-help-keep-iran-connected-iranelection%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>As many of you know, most of the information from within Iran is coming from on-the-ground new-media and social networking sites such as <a href="http://twitter.com/#search?q=%23iranelection">Twitter</a>, YouTube, and Facebook.  This is happening despite crackdowns on communications networks by the Iranian government.  The way this information is able to escape the firewalls of Iran is via proxies which relay and "hide" the destination of the communications so that it becomes difficult to block.  This allows those on the ground in Iran to communicate with the world instantly and effectively, without fear of government crackdown.  But it is a constant arms race.  As soon as a relay becomes known by the Iranian government it gets shut down.  The only way to keep the lines of communication open are to strengthen the distributed Tor network by adding more relays and bridges, making it more difficult for the Iranian government to block them all.</p>
<p>There have already been great write-ups on how you can contribute to the distributed proxy network <a href="http://www.torproject.org/">Tor</a>:<br />
<a href="http://anonygreen.wordpress.com/2009/06/18/how-to-setup-a-tor-relay-or-tor-bridge/">http://anonygreen.wordpress.com/2009/06/18/how-to-setup-a-tor-relay-or-tor-bridge/</a><br />
<a href="http://smokingfish.blogspot.com/2009/06/brief-introduction-to-tor-and-why-its.html">http://smokingfish.blogspot.com/2009/06/brief-introduction-to-tor-and-why-its.html</a></p>
<p>Please read over those documents for an overview.  I wanted to provide detailed instructions on how to get a Tor network set up quickly, easily, and cheaply for those of you who would like to contribute.  <strong style="color: #41A801;">You can provide invaluable assistance to the people of Iran for as little as 15 minutes of your time and $20/month</strong>.  </p>
<p><strong style="color: #41A801;">First off, this document assumes you have some system administration knowledge with Linux (Fedora) and are comfortable installing and configuring packages from the command line.</strong>  If that's you, you can have a Tor relay up and running in about 15 minutes.</p>
<p><strong>Key:</strong><br />
Shell commands are in <strong style="color: #9241AF;">purple</strong><br />
Config file settings are in <strong style="color: #3B6BBF;">blue</strong></p>
<ol>
<li>
<h2>Register at Slicehost</h2>
<p>Slicehost is a VPS provider that allows you to quickly build/deploy webservers very cheaply.  <a href="https://manage.slicehost.com/customers/new?flavor=1">Sign up here</a> and purchase the cheapest $20 slice to get started.  Pick <strong>Fedora 10</strong> as your Linux Distribution.  Do not pick Fedora 11, as it is incompatible with the current version of Tor.  Once you are registered, Slicehost will email you your IP and root password.  It can take a few minutes to build your new slice, so be patient.</li>
<li>
<h2>Slice Security</h2>
<p>Log in to your new slice.  Please note that this document covers the bare minimum of commands to get Tor up and running.  You should follow due diligence when it comes to securing your new slice, something which is outside the scope of this document.  Common practice security configurations are recommended.  <strong>Security is your own responsibility, and I will not be held liable for any security issues with your slice.</strong>  There are a few bare-minimum security things you should do to your slice:</p>
<p><strong>Change the root password:</strong><br />
<span style="color: #9241AF;">&nbsp;&nbsp;&nbsp;&nbsp;passwd root</span></p>
<p><strong>Create your own account &#038; set password:</strong><br />
<span style="color: #9241AF;">&nbsp;&nbsp;&nbsp;&nbsp;adduser yourusername<br />
&nbsp;&nbsp;&nbsp;&nbsp;passwd yourusername</span></p>
<p><strong>Disable root login to ssh</strong><br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #9241AF;">vim /etc/ssh/sshd_config</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;Change to this: <span style="color: #3B6BBF;">PermitRootLogin no</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #9241AF;">service sshd restart</span></p>
<p>These steps are the <strong>BARE MINIMUM</strong> you should do to secure your slice.
</li>
<li>
<h2>Update Your System</h2>
<p><span style="color: #9241AF;">yum -y update</span></li>
<li>
<h2>Install Prerequisites</h2>
<p><span style="color: #9241AF;">yum install wget vim-enhanced gcc make libevent libevent-devel openssl openssl-devel zlib zlib-devel rpm-build</span></li>
<li>
<h2>Download Tor &#038; Signature</h2>
<p><span style="color: #9241AF;"><br />
wget https://www.torproject.org/dist/rpm/tor-0.2.1.16.rc-tor.0.fc10.src.rpm<br />
wget https://www.torproject.org/dist/rpm/tor-0.2.1.16.rc-tor.0.fc10.src.rpm.asc<br />
</span></p>
</li>
<li>
<h2>Verify Packages</h2>
<p>Follow directions at <a href="http://www.torproject.org/verifying-signatures.html.en">http://www.torproject.org/verifying-signatures.html.en</a> to verify that you have an authentic RPM and not a fake.
</li>
<li>
<h2>Build &#038; Install Tor</h2>
<p><span style="color: #9241AF;"><br />
rpmbuild &#45;&#45;rebuild tor-0.2.1.16.rc-tor.0.fc10.src.rpm<br />
rpm -i rpmbuild/RPMS/x86_64/tor-0.2.1.16.rc-tor.0.fc10.x86_64.rpm<br />
</span>
</li>
<li>
<h2>Configure Tor</h2>
<p><span style="color: #9241AF;">vim /etc/tor/torrc</span></p>
<p>Change the following settings, substituting your own values for Nickname and Address:<br />
<span style="color: #3B6BBF;"><br />
DataDirectory /var/lib/tor<br />
ORPort 9001<br />
DirPort 9030<br />
Nickname YOUR_NICKNAME<br />
Address YOUR.IP.ADDRESS.XX<br />
</span><br />
Save &#038; Exit
</li>
<li>
<h2>Set Bandwidth Limits for Tor</h2>
<p>These settings are largely dependent on which slice you have purchased.  The ones you see below are for a 20GB slice, and they allow 2GB of transfer per day, so you should be well within the 20GB slice limit of 100GB/month.  If you have purchased a larger slice, these settings can be increased accordingly.  <strong style="color: #8F0808;">Be careful here, incorrect settings can push you over your monthly bandwidth limit very quickly!</strong>  I did over 12GB of transfer in a little over 8 hours before limiting bandwidth with these settings.</p>
<p><span style="color: #9241AF;">vim /etc/tor/torrc</span><br />
<span style="color: #3B6BBF;"><br />
RelayBandwidthRate 64 KBytes<br />
RelayBandwidthBurst 128 KBytes<br />
AccountingStart day 12:00<br />
AccountingMax 2 GB<br />
</span><br />
Save &#038; Exit.  The AccountingStart and AccountingMax settings will limit 2GB max transfer per day, resetting at 12:00 every day.  The RelayBandwidthRate and RelayBandwidthBurst settings throttle the bandwidth so that you don't reach AccountingMax after only a few hours.  Normally AccountingStart and AccountingMax would be enough to stay within your bandwidth limits, but I want my relay to be available all day rather than reaching AccountingMax and shutting down after a few hours.
</li>
<li>
<h2>Configure Your Firewall</h2>
<p><span style="color: #9241AF;">iptables-save > /etc/sysconfig/iptables.default<br />
iptables-save > /etc/sysconfig/iptables.test<br />
vim /etc/sysconfig/iptables.test<br />
</span><br />
Insert the following settings:<br />
<span style="color: #3B6BBF;"><br />
	# tor ORPort &#038; DirPort<br />
	-A INPUT -p tcp --dport 9001 -j ACCEPT<br />
	-A INPUT -p tcp --dport 9030 -j ACCEPT</span></p>
<p><span style="color: #3B6BBF;"><br />
	# tor Allow all outbound traffic<br />
	-A OUTPUT -j ACCEPT<br />
</span><br />
Save &#038; Exit.<br />
<span style="color: #9241AF;"><br />
iptables-restore < /etc/sysconfig/iptables.test<br />
iptables -L</span> (verify the rules are correct)<br />
<span style="color: #9241AF;">iptables-save > /etc/sysconfig/iptables</span><br />
</span></li>
<li>
<h2>Increase the number of open file descriptors</h2>
<p><span style="color: #9241AF;">vim /etc/security/limits.conf</span></p>
<p>Add this line:</p>
<p><span style="color: #3B6BBF;">_tor hard nofile 32768</span></p>
<p>Save &#038; Exit
</li>
<li>
<h2>Start up the Tor Service</h2>
<p><span style="color: #9241AF;">service tor start</span></li>
<p>If everything starts correctly, you should see output like this:<br />
<code>Starting tor: Jun 21 15:44:04.219 [notice] Tor v0.2.1.15-rc. This is experimental software. Do not rely on it for strong anonymity. (Running on Linux x86_64)<br />
Jun 21 15:44:04.219 [notice] Your ContactInfo config option is not set. Please consider setting it, so we can contact you if your server is misconfigured or something else goes wrong.<br />
Jun 21 15:44:04.223 [notice] Initialized libevent version 1.4.5-stable using method epoll. Good.<br />
Jun 21 15:44:04.223 [notice] Opening OR listener on 0.0.0.0:9001<br />
Jun 21 15:44:04.223 [notice] Opening Directory listener on 0.0.0.0:9030<br />
Jun 21 15:44:04.223 [notice] Opening Socks listener on 127.0.0.1:9050<br />
/usr/bin/torctl start: tor started  [  OK  ]</code></p>
<p>Also, you should view the tor.log and verify that you see the following (after 20-minutes):</p>
<p><span style="color: #9241AF;">cat /var/log/tor/tor.log</span></p>
<p><code>Jun 21 15:44:13.835 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.<br />
Jun 21 15:44:13.835 [notice] Bootstrapped 100%: Done.<br />
Jun 21 15:44:13.835 [notice] Now checking whether ORPort XXX.XXX.XXX.XXX:9001 and DirPort XXX.XXX.XXX.XXX:9030 are reachable.. (this may take up to 20 minutes &#45;&#45; look for log messages indicating success)<br />
Jun 21 15:44:18.492 [notice] Self-testing indicates your DirPort is reachable from the outside. Excellent.<br />
Jun 21 15:44:18.492 [notice] Not advertising DirPort (Reason: AccountingMax enabled)<br />
Jun 21 15:44:26.804 [notice] Self-testing indicates your ORPort is reachable from the outside. Excellent. Publishing server descriptor.<br />
Jun 21 15:44:43.813 [notice] Performing bandwidth self&#45;test.. done.</code></p>
<p>If you see some errors or it doesn't start correctly, post in the comments and I'll see if I can help you out.  Here are some references to help you get it going:<br />
<a href="http://www.torproject.org/docs/tor-doc-unix.html.en#installing">http://www.torproject.org/docs/tor-doc-unix.html.en#installing</a><br />
<a href="http://www.torproject.org/docs/tor-doc-relay.html.en">http://www.torproject.org/docs/tor-doc-relay.html.en</a>
</ol>
<p>That's it!  You now have a fully functioning Tor Relay and are helping the Iranian people get news and information out to the rest of the world.  The cool thing about Slicehost is that you can easily upgrade your Slice with the click of a button to allow more bandwidth, RAM, and other resources.  They also have a Clone option so that once you have your initial Tor slice running, you can clone it multiple times so that you can have multiple Tor servers at a time.</p>
<p>More good reads on Tor and its effect in Iran:<br />
<a href="http://blog.torproject.org/blog/measuring-tor-and-iran">http://blog.torproject.org/blog/measuring-tor-and-iran</a><br />
<a href="http://p10.hostingprod.com/@spyblog.org.uk/blog/2009/06/tor-relays-and-exit-nodes-for-iran-and-for-the-rest-of-us.html">http://p10.hostingprod.com/@spyblog.org.uk/blog/2009/06/tor-relays-and-exit-nodes-for-iran-and-for-the-rest-of-us.html</a></p>
<h2>Update 1 - Preventing Abuse by BitTorrent Users</h2>
<p>A couple of days after setting up my Tor slice, I received a Digital Millennium Copyright Act (“DMCA”) notice that my relay was hosting copyrighted material and that I would be required to remove it or face having my Slice shut down.  Turns out that there are people out there using BitTorrent over the Tor network to transfer copyrighted material.  Philosophical debates about BitTorrent and copyright law aside, the whole reason why I am running Tor is to help those in Iran stay connected -- not to assist in the distribution of copyrighted material.  So, after a few minutes of research, I found out we can prevent Tor being used by BitTorrent by adjusting your <strong>ExitPolicy</strong>:</p>
<p><span style="color: #9241AF;">vim /etc/tor/torrc</span></p>
<p>Add the following:<span style="color: #3B6BBF;"><br />
  ExitPolicy reject *:1214<br />
  ExitPolicy reject *:4661-4666<br />
  ExitPolicy reject *:6346-6429<br />
  ExitPolicy reject *:6881-6999<br />
</span><br />
Save &amp; Exit<br />
Restart Tor: <span style="color: #9241AF;">service tor restart</span></p>
<p>You should also probably follow the advice at <a href="http://blog.torproject.org/blog/tips-running-exit-node-minimal-harassment">http://blog.torproject.org/blog/tips-running-exit-node-minimal-harassment</a></p>
<p>References:<br />
<a href="http://www.torproject.org/faq.html.en#ExitPolicies">http://www.torproject.org/faq.html.en#ExitPolicies</a> - Exit Policies in Tor<br />
<a href="https://www.torproject.org/eff/tor-dmca-response.html">https://www.torproject.org/eff/tor-dmca-response.html</a> - DCMA Response Template<br />
<a href="http://www.orient-lodge.com/node/3622?dsq=11687593">http://www.orient-lodge.com/node/3622?dsq=11687593</a> - A Slicehost user who also received a DCMA notice<br />
<a href="http://www.chrisbrunner.com/?p=119">http://www.chrisbrunner.com/?p=119</a> - Why You Shouldn’t Run BitTorrent Over Tor</p>
<h2>Update 2 - Slicehost Responds</h2>
<p>After making the adjustments above, I notified Slicehost of my changes and they have responded:<br />
<code>Thank you for your response.  We will go ahead and consider this matter resolved.  Thank you for your attention to this matter.</code><br />
Gotta give them credit for understanding that we're trying to help people in Iran -- not to pirate movies.  Thanks Slicehost!</p>
<h2>Update 3 - Upgraded to 0.2.1.16 &#038; Config Adjustments</h2>
<p>I received some configuration recommendations from Andrew Lewman of The Tor Project, and have updated the steps above accordingly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2009/06/21/slicehost-setting-up-a-tor-relay-on-fedora-to-help-keep-iran-connected-iranelection/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Cacti on Fedora: Blank Graphs</title>
		<link>http://www.tequilafish.com/2007/09/19/cacti-on-fedora-blank-graphs/</link>
		<comments>http://www.tequilafish.com/2007/09/19/cacti-on-fedora-blank-graphs/#comments</comments>
		<pubDate>Thu, 20 Sep 2007 02:08:56 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[cacti]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/2007/09/19/cacti-on-fedora-blank-graphs/</guid>
		<description><![CDATA[After getting Cacti up and running successfully on Fedora Core 5, I had a problem with the graphing. Caci was receiving the SNMP data correctly (the graph legends would show the proper data values), but the actual neato colors and lines were absent in the graph image. After some research I found a fix: Everything [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2007%2F09%2F19%2Fcacti-on-fedora-blank-graphs%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2007%2F09%2F19%2Fcacti-on-fedora-blank-graphs%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>After getting <a href="http://cacti.net/">Cacti</a> up and running successfully on Fedora Core 5, I had a problem with the graphing.  Caci was receiving the SNMP data correctly (the graph legends would show the proper data values), but the actual neato colors and lines were absent in the graph image.  After some research I found a fix: Everything in the rra file must be owned by the cacti user, or the user running the poller crontab.  Pretty simple:</p>
<p><code>chown -R cacti.cacti /usr/share/cacti/rra</code></p>
<p>Once the rra files were owned by the cacti user, the graphs started to appear in all their colored and lined splendor!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2007/09/19/cacti-on-fedora-blank-graphs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP &amp; imagettftext with Webcore TrueType fonts.</title>
		<link>http://www.tequilafish.com/2007/07/21/php-imagettftext-with-webcore-truetype-fonts/</link>
		<comments>http://www.tequilafish.com/2007/07/21/php-imagettftext-with-webcore-truetype-fonts/#comments</comments>
		<pubDate>Sat, 21 Jul 2007 21:37:12 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[imagegettftext]]></category>
		<category><![CDATA[truetype]]></category>
		<category><![CDATA[webcore]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/2007/07/21/php-imagettftext-with-webcore-truetype-fonts/</guid>
		<description><![CDATA[If you're trying to write some text using PHP/GD &#038; the imagettftext() function, you will of course need some TrueType fonts to work with. I've found a great set of fonts available for free: Webcore. Webcore contains all the fonts web designers constantly use, things like Arial, Tahoma, Verdana, Georgia, etc.. To install, simply download [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2007%2F07%2F21%2Fphp-imagettftext-with-webcore-truetype-fonts%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2007%2F07%2F21%2Fphp-imagettftext-with-webcore-truetype-fonts%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>If you're trying to write some text using PHP/GD &#038; the <tt>imagettftext()</tt> function, you will of course need some TrueType fonts to work with.  I've found a great set of fonts available for free: <a href="http://avi.alkalay.net/software/webcore-fonts/">Webcore</a>.  Webcore contains all the fonts web designers constantly use, things like Arial, Tahoma, Verdana, Georgia, etc..</p>
<p>To install, simply download to your server and install the RPM (Fedora):<br />
<code>shell&gt; wget http://avi.alkalay.net/software/webcore-fonts/webcore-fonts-3.0-1.noarch.rpm<br />
shell&gt; rpm -i webcore-fonts-3.0-1.noarch.rpm</code></p>
<p>These fonts will now be available to you in <strong><tt>/usr/share/fonts/webcore/</tt></strong>.</p>
<p>Make sure you specify the full path when calling <tt>imagettftext()</tt>, eg:<br />
<code>&lt;?php<br />
&nbsp;<br />
// Set the content-type<br />
header("Content-type: image/png");<br />
&nbsp;<br />
// Replace path by your own font path<br />
$font = '/usr/share/fonts/webcore/arial.ttf';<br />
&nbsp;<br />
// Create the image<br />
$im = imagecreatetruecolor(400, 30);<br />
&nbsp;<br />
// Create some colors<br />
$white = imagecolorallocate($im, 255, 255, 255);<br />
$black = imagecolorallocate($im, 0, 0, 0);<br />
imagefilledrectangle($im, 0, 0, 399, 29, $white);<br />
&nbsp;<br />
// The text to draw<br />
$text = 'Hello world!';<br />
&nbsp;<br />
// Add some text<br />
imagettftext($im, 20, 0, 10, 20, $black, $font, $text);<br />
&nbsp;<br />
// Using imagepng() results in clearer text compared with imagejpeg()<br />
imagepng($im);<br />
imagedestroy($im);<br />
?&gt;</code></p>
<p>Your mileage may vary if you are using a different distribution, but the docs state that this RPM should work on other distros.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2007/07/21/php-imagettftext-with-webcore-truetype-fonts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vi: Get rid of Windows formatted linebreaks (^M)</title>
		<link>http://www.tequilafish.com/2007/07/03/vi-get-rid-of-windows-formatted-linebreaks-m/</link>
		<comments>http://www.tequilafish.com/2007/07/03/vi-get-rid-of-windows-formatted-linebreaks-m/#comments</comments>
		<pubDate>Tue, 03 Jul 2007 19:10:54 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[linebreak]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/2007/07/03/vi-get-rid-of-windows-formatted-linebreaks-m/</guid>
		<description><![CDATA[If you've ever tried to edit a Windows-created file in Unix or OSX, you've probably encountered a messy translation in line breaks: A file full of "^M" characters. There is an easy search/replace you can use in vi/vim to format the file Unix-style: :%s/\r/\r/g]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2007%2F07%2F03%2Fvi-get-rid-of-windows-formatted-linebreaks-m%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2007%2F07%2F03%2Fvi-get-rid-of-windows-formatted-linebreaks-m%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>If you've ever tried to edit a Windows-created file in Unix or OSX, you've probably encountered a messy translation in line breaks: A file full of "<tt>^M</tt>" characters.  There is an easy search/replace you can use in vi/vim to format the file Unix-style:</p>
<p><code>:%s/\r/\r/g</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2007/07/03/vi-get-rid-of-windows-formatted-linebreaks-m/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yum: Cannot find a valid baseurl for repo: core</title>
		<link>http://www.tequilafish.com/2006/10/25/yum-cannot-find-a-valid-baseurl-for-repo-core/</link>
		<comments>http://www.tequilafish.com/2006/10/25/yum-cannot-find-a-valid-baseurl-for-repo-core/#comments</comments>
		<pubDate>Wed, 25 Oct 2006 22:17:40 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/2006/10/25/yum-cannot-find-a-valid-baseurl-for-repo-core/</guid>
		<description><![CDATA[I went to update my Fedora Core 5 machine today, and received the following error: [root ~] yum check-update Loading "installonlyn" plugin Setting up repositories core [1/3] Cannot find a valid baseurl for repo: core Error: Cannot find a valid baseurl for repo: core I tried running yum clean all but it didn't help. After [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2006%2F10%2F25%2Fyum-cannot-find-a-valid-baseurl-for-repo-core%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2006%2F10%2F25%2Fyum-cannot-find-a-valid-baseurl-for-repo-core%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I went to update my Fedora Core 5 machine today, and received the following error:<br />
<code>[root ~] yum check-update<br />
Loading "installonlyn" plugin<br />
Setting up repositories<br />
core                                                                 [1/3]<br />
Cannot find a valid baseurl for repo: core<br />
Error: Cannot find a valid baseurl for repo: core</code><br />
I tried running <strong><tt>yum clean all</tt></strong> but it didn't help.  After looking around I found that all of my repo files in <strong><tt>/etc/yum.repos.d/</tt></strong> had their <tt>baseurl</tt> values commented out.  Don't ask me how that happened, I have no idea.  Simply un-commenting all the <tt>baseurl</tt> values in all my repo files fixed the problem, and yum is once again running as expected.  So if you run into this problem, make sure everything is set up right in <strong><tt>/etc/yum.repos.d/*.repo</tt></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2006/10/25/yum-cannot-find-a-valid-baseurl-for-repo-core/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing PDFlib Lite as a PHP module on Fedora Core 4</title>
		<link>http://www.tequilafish.com/2006/05/23/installing-pdflib-lite-as-a-php-module-on-fedora-core-4/</link>
		<comments>http://www.tequilafish.com/2006/05/23/installing-pdflib-lite-as-a-php-module-on-fedora-core-4/#comments</comments>
		<pubDate>Tue, 23 May 2006 23:15:21 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[pdflib]]></category>
		<category><![CDATA[redhat]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/2006/05/23/installing-pdflib-lite-as-a-php-module-on-fedora-core-4/</guid>
		<description><![CDATA[The instructions for doing so (here) seemed straightforward enough, but I ran into a few problems. So here's how I got PDFLib working with my PHP install on Fedora Core 4. First we need to build PDFlib Lite from Source. Download it from here. Unpack it, then: ./configure make make install Easy enough. Now: yum [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2006%2F05%2F23%2Finstalling-pdflib-lite-as-a-php-module-on-fedora-core-4%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2006%2F05%2F23%2Finstalling-pdflib-lite-as-a-php-module-on-fedora-core-4%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>The instructions for doing so (<a href="http://www.pdflib.com/products/pdflib/info/PDFlib-in-PHP-HowTo.pdf">here</a>) seemed straightforward enough, but I ran into a few problems.  So here's how I got PDFLib working with my PHP install on Fedora Core 4.</p>
<p>First we need to build PDFlib Lite from Source.  Download it from <a href="http://www.pdflib.com/products/pdflib/download-source.html">here</a>.  Unpack it, then:<br />
<code>./configure<br />
make<br />
make install</code><br />
Easy enough.  Now:<br />
<code>yum install automake<br />
yum install php-devel<br />
pecl install pdflib</code><br />
(Note: <tt>php-devel</tt> is required because we need <strong><tt>phpize</tt></strong> which is used by the <tt>pecl</tt> command.)</p>
<p>The PECL install will ask you a question: "Path to PDFlib installation?"  This is where I ran into problems.  You must put <strong><tt>/usr/local/</tt></strong> and NOT <strong><tt>/usr/local/include</tt></strong> because the script is hardcoded to look inside the include directory automatically.  Once PECL finds <tt>pdflib.h</tt> it will continue and finish compiling our shared object, <strong><tt>pdf.so</tt></strong>.  The script will install it for us in <strong><tt>/usr/lib/php/modules/</tt></strong><br />
Now we just have to tell PHP to load the SO.  Open up <tt>php.ini</tt> and add the following line:<br />
<code>extension=pdf.so</code><br />
Save &#038; exit, and restart your Apache with <strong><tt>apachectl graceful</tt></strong>.  Now browse to a file containing the <tt>phpinfo()</tt> function and check to see if PDFlib is now active.  If you see it, you're good to go!</p>
<p><strong>NOTE:</strong> I ran into a problem with RPM GPG Keys at the <tt>automake install</tt> step.  I was getting the following error:<br />
<code>warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID db42a60e<br />
public key not available for autoconf-2.59-5.noarch.rpm<br />
Retrieving GPG key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora<br />
The GPG key at file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora (0x4F2A6FD2)<br />
is already installed but is not the correct key for this package.<br />
Check that this is the correct key for the "Fedora Core 4 - i386 - Base" repository.</code><br />
To get around this we need to import all the keys by run the following command:<br />
<code>rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*</code><br />
I found this solution in <a href="http://www.redhat.com/archives/fedora-maintainers/2005-July/msg00070.html">this thread</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2006/05/23/installing-pdflib-lite-as-a-php-module-on-fedora-core-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Red Hat Fedora Linux: Add an additional IP to your network card.</title>
		<link>http://www.tequilafish.com/2006/02/27/red-hat-fedora-linux-add-an-additional-ip-to-your-network-card/</link>
		<comments>http://www.tequilafish.com/2006/02/27/red-hat-fedora-linux-add-an-additional-ip-to-your-network-card/#comments</comments>
		<pubDate>Mon, 27 Feb 2006 22:38:08 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[redhat]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/2006/02/27/red-hat-fedora-linux-add-an-additional-ip-to-your-network-card/</guid>
		<description><![CDATA[Adding an additional IP or IPs to your network card in Linux is easy. Here's how I did it in my Fedora Core 4 installation: cd /etc/sysconfig/network-scripts/ cp ifcfg-eth0 ifcfg-eth0:0 Now you will need to open your newly created ifcfg-eth0:0 file in your favorite editor and modify it to fit your needs. The two lines [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2006%2F02%2F27%2Fred-hat-fedora-linux-add-an-additional-ip-to-your-network-card%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2006%2F02%2F27%2Fred-hat-fedora-linux-add-an-additional-ip-to-your-network-card%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Adding an additional IP or IPs to your network card in Linux is easy.  Here's how I did it in my Fedora Core 4 installation:<br />
<code>cd /etc/sysconfig/network-scripts/<br />
cp ifcfg-eth0 ifcfg-eth0:0</code><br />
Now you will need to open your newly created <tt>ifcfg-eth0:0</tt> file in your favorite editor and modify it to fit your needs.  The two lines you MUST change are the following, the rest are optional:<br />
<code>DEVICE=eth0:0<br />
IPADDR=192.x.x.x</code><br />
Of course you will want to fill in the <tt>IPADDR</tt> value to fit your needs.</p>
<p>Now, to make the changes take effect, you will need to bring your new IP up by issuing the following command:<br />
<code>./ifup eth0:0</code><br />
Or if you want you can just restart the entire network:<br />
<code>/etc/rc.d/init.d/network reload</code><br />
There you go!  Run <strong><tt>ifconfig</tt></strong> and you should see your new IP assigned to <tt>eth0:0</tt>.  It should look something like this:<br />
<code>eth0:0    Link encap:Ethernet  HWaddr 00:D0:B7:B7:XX:XX<br />
inet addr:192.168.1.XX  Bcast:192.168.1.255  Mask:255.255.255.0<br />
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1</code><br />
You can add even more IPs by repeating this process and incrementing the value of <tt>eth0:0</tt>, for example you can add <tt>eth0:1</tt>, <tt>eth0:2</tt>, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2006/02/27/red-hat-fedora-linux-add-an-additional-ip-to-your-network-card/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MRTG Error: gd-png:  fatal libpng error: Invalid filter type specified</title>
		<link>http://www.tequilafish.com/2005/02/17/mrtg-error-gd-png-fatal-libpng-error-invalid-filter-type-specified/</link>
		<comments>http://www.tequilafish.com/2005/02/17/mrtg-error-gd-png-fatal-libpng-error-invalid-filter-type-specified/#comments</comments>
		<pubDate>Thu, 17 Feb 2005 18:08:05 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[gd-png]]></category>
		<category><![CDATA[libpng]]></category>
		<category><![CDATA[mrtg]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/?p=2</guid>
		<description><![CDATA[I recently upgraded my MRTG install from v 2.10.13 to 2.11.1, and while the upgrade went fine, I ran into problems running mrtg: [bash] /usr/local/mrtg-2/bin/mrtg /etc/mrtg/mrtg.cfg gd-png: fatal libpng error: Invalid filter type specified gd-png error: setjmp returns error condition gd-png: fatal libpng error: Invalid filter type specified gd-png error: setjmp returns error condition gd-png: [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2005%2F02%2F17%2Fmrtg-error-gd-png-fatal-libpng-error-invalid-filter-type-specified%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2005%2F02%2F17%2Fmrtg-error-gd-png-fatal-libpng-error-invalid-filter-type-specified%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I recently upgraded my MRTG install from v 2.10.13 to 2.11.1, and while the upgrade went fine, I ran into problems running mrtg:<br />
<code>[bash] /usr/local/mrtg-2/bin/mrtg /etc/mrtg/mrtg.cfg<br />
gd-png:  fatal libpng error: Invalid filter type specified<br />
gd-png error: setjmp returns error condition<br />
gd-png:  fatal libpng error: Invalid filter type specified<br />
gd-png error: setjmp returns error condition<br />
gd-png:  fatal libpng error: Invalid filter type specified<br />
gd-png error: setjmp returns error condition<br />
.....</code><br />
I did a thorough Google search and never found a good answer or fix, except for a patch to the MRTG source code, which I didn't find satisfactory.  So it turns out that it was a problem with the PNG libraries.  The machine was running an old Redhat 7.2, and libpng had previously been installed via RPM, with the libpng files from this RPM residing in <tt>/usr/lib</tt>.  Prior to upgrading MRTG I had installed a newer libpng via source, with the new libpng files residing in <tt>/usr/local/lib</tt>.  So the problem was that I had two different versions of libpng installed in different places on the machine, and this was causing the problems.  This was easily fixed by creating symbolic links from the old RPM dir (<tt>/usr/lib</tt>) to the new manually installed dir (<tt>/usr/local/lib</tt>)<br />
<code>[bash] cd /usr/lib<br />
[bash] mv libpng.a libpng.a.old<br />
[bash] ln -s /usr/local/lib/libpng.a libpng.a<br />
[bash] ln -s /usr/local/lib/libpng.so.3.1.2.8 libpng.so.3<br />
[bash] ln -s /usr/local/lib/libpng.so.3 libpng.so</code><br />
Once this library hell was fixed, MRTG went back to operating as expected.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2005/02/17/mrtg-error-gd-png-fatal-libpng-error-invalid-filter-type-specified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

