<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>The CONSOLE</title>
	<atom:link href="http://ptankov.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ptankov.wordpress.com</link>
	<description>Command Line Incantations</description>
	<lastBuildDate>Thu, 10 Nov 2011 09:12:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ptankov.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>The CONSOLE</title>
		<link>http://ptankov.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ptankov.wordpress.com/osd.xml" title="The CONSOLE" />
	<atom:link rel='hub' href='http://ptankov.wordpress.com/?pushpress=hub'/>
		<item>
		<title>[HOWTO] Create a large file that occupies no space</title>
		<link>http://ptankov.wordpress.com/2011/09/07/howto-create-a-large-file-that-occupies-no-space/</link>
		<comments>http://ptankov.wordpress.com/2011/09/07/howto-create-a-large-file-that-occupies-no-space/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 11:18:47 +0000</pubDate>
		<dc:creator>ptankov</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ptankov.wordpress.com/?p=237</guid>
		<description><![CDATA[dd if=/dev/zero of=largefile count=0 obs=1 seek=200G<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=237&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><code><br />
dd if=/dev/zero of=largefile count=0 obs=1 seek=200G<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ptankov.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ptankov.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ptankov.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ptankov.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ptankov.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ptankov.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ptankov.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ptankov.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ptankov.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ptankov.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ptankov.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ptankov.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ptankov.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ptankov.wordpress.com/237/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=237&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ptankov.wordpress.com/2011/09/07/howto-create-a-large-file-that-occupies-no-space/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ptankov</media:title>
		</media:content>
	</item>
		<item>
		<title>[TIP] Find newest (last modified) files</title>
		<link>http://ptankov.wordpress.com/2010/11/23/tip-find-newest-last-modified-files/</link>
		<comments>http://ptankov.wordpress.com/2010/11/23/tip-find-newest-last-modified-files/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 11:38:36 +0000</pubDate>
		<dc:creator>ptankov</dc:creator>
				<category><![CDATA[console]]></category>

		<guid isPermaLink="false">http://ptankov.wordpress.com/?p=217</guid>
		<description><![CDATA[find . -type f -printf "%TY-%Tm-%Td %TT %p\n" &#124; sort &#124; tail -5 or find . -type f -printf "%TY-%Tm-%Td %TT %p\n" &#124; sort -r &#124; head -5<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=217&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><code><br />
find . -type f -printf "%TY-%Tm-%Td %TT %p\n" | sort | tail -5<br />
</code></p>
<p>or</p>
<p><code><br />
find . -type f -printf "%TY-%Tm-%Td %TT %p\n" | sort -r | head -5<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ptankov.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ptankov.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ptankov.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ptankov.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ptankov.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ptankov.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ptankov.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ptankov.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ptankov.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ptankov.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ptankov.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ptankov.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ptankov.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ptankov.wordpress.com/217/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=217&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ptankov.wordpress.com/2010/11/23/tip-find-newest-last-modified-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ptankov</media:title>
		</media:content>
	</item>
		<item>
		<title>[TIP] Avoid SSH security question</title>
		<link>http://ptankov.wordpress.com/2010/03/23/tip-avoid-ssh-security-question/</link>
		<comments>http://ptankov.wordpress.com/2010/03/23/tip-avoid-ssh-security-question/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 08:21:07 +0000</pubDate>
		<dc:creator>ptankov</dc:creator>
				<category><![CDATA[console]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://ptankov.wordpress.com/?p=215</guid>
		<description><![CDATA[ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null user@host<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=215&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><code><br />
ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null user@host<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ptankov.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ptankov.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ptankov.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ptankov.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ptankov.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ptankov.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ptankov.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ptankov.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ptankov.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ptankov.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ptankov.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ptankov.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ptankov.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ptankov.wordpress.com/215/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=215&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ptankov.wordpress.com/2010/03/23/tip-avoid-ssh-security-question/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ptankov</media:title>
		</media:content>
	</item>
		<item>
		<title>[TIP] Force variable substitution within single quotes in BASH</title>
		<link>http://ptankov.wordpress.com/2010/03/09/tip-force-variable-substitution-within-single-quotes-in-bash/</link>
		<comments>http://ptankov.wordpress.com/2010/03/09/tip-force-variable-substitution-within-single-quotes-in-bash/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 17:22:57 +0000</pubDate>
		<dc:creator>ptankov</dc:creator>
				<category><![CDATA[console]]></category>
		<category><![CDATA[BASH]]></category>

		<guid isPermaLink="false">http://ptankov.wordpress.com/?p=210</guid>
		<description><![CDATA[Sometimes in a BASH script you need to have single quotes but the value inside them is actually a variable. Here is how to have both the single quotes and the actual value of the variable expanded. % foo=bar % echo $foo bar % echo "$foo" bar % echo '$foo' $foo % echo "'$foo'" 'bar' [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=210&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Sometimes in a BASH script you need to have single quotes but the value inside them is actually a variable. Here is how to have both the single quotes and the actual value of the variable expanded.</p>
<pre>
% foo=bar
</pre>
<pre>
% echo $foo
bar
</pre>
<pre>
% echo "$foo"
bar
</pre>
<pre>
% echo '$foo'
$foo
</pre>
<pre>
% echo "'$foo'"
'bar'
</pre>
<p>It seems that double quotes around single quotes make the single quotes expand variables.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ptankov.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ptankov.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ptankov.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ptankov.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ptankov.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ptankov.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ptankov.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ptankov.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ptankov.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ptankov.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ptankov.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ptankov.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ptankov.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ptankov.wordpress.com/210/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=210&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ptankov.wordpress.com/2010/03/09/tip-force-variable-substitution-within-single-quotes-in-bash/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ptankov</media:title>
		</media:content>
	</item>
		<item>
		<title>[TIP] Count non-empty lines in a text file</title>
		<link>http://ptankov.wordpress.com/2010/03/09/tip-count-non-empty-lines-in-a-text-file/</link>
		<comments>http://ptankov.wordpress.com/2010/03/09/tip-count-non-empty-lines-in-a-text-file/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 08:51:13 +0000</pubDate>
		<dc:creator>ptankov</dc:creator>
				<category><![CDATA[console]]></category>
		<category><![CDATA[BASH]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://ptankov.wordpress.com/?p=198</guid>
		<description><![CDATA[grep -c -v '^$' filename If you want to, as well, exclude lines which contain only spaces: grep -c -v '^ *$' filename Notes (from the grep man page): -c, --count Suppress normal output; instead print a count of matching lines for each input file. With the -v, --invert-match option (see below), count non-matching lines. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=198&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><code>grep -c -v '^$' filename</code></p>
<p>If you want to, as well, exclude lines which contain only spaces:<br />
<code>grep -c -v '^ *$' filename</code></p>
<p><strong><u>Notes (from the <code>grep</code> man page):</u></strong><br />
<code>-c, --count</code><br />
Suppress normal output; instead print a count of matching lines for each input file.  With the <code>-v, --invert-match</code> option (see below), count  non-matching  lines. (<code>-c</code> is specified by POSIX.)</p>
<p><code>-v, --invert-match</code><br />
Invert the sense of matching, to select non-matching lines. (<code>-v</code> is specified by POSIX.)</p>
<p><code>Anchoring</code><br />
The caret <code>^</code> and the dollar sign <code>$</code> are meta-characters that respectively match the empty string at the beginning and end of a line.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ptankov.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ptankov.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ptankov.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ptankov.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ptankov.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ptankov.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ptankov.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ptankov.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ptankov.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ptankov.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ptankov.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ptankov.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ptankov.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ptankov.wordpress.com/198/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=198&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ptankov.wordpress.com/2010/03/09/tip-count-non-empty-lines-in-a-text-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ptankov</media:title>
		</media:content>
	</item>
		<item>
		<title>[HOWTO] Install and Configure FreeBSD 7.1 on VMware Workstation 6.5 From the Ground Up</title>
		<link>http://ptankov.wordpress.com/2009/02/24/howto-install-and-configure-freebsd-71-on-vmware-workstation-65-from-the-ground-up/</link>
		<comments>http://ptankov.wordpress.com/2009/02/24/howto-install-and-configure-freebsd-71-on-vmware-workstation-65-from-the-ground-up/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 23:48:47 +0000</pubDate>
		<dc:creator>ptankov</dc:creator>
				<category><![CDATA[console]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://ptankov.wordpress.com/?p=33</guid>
		<description><![CDATA[This HOWTO shows a step-by-step installation and configuration of FreeBSD 7.1 from scratch. The reader should have a basic Linux and/or Unix knowledge and should feel comfortably with the console. Throughout this document, by &#8220;VMware&#8221; I&#8217;m actually referring to &#8220;VMware Workstation&#8221;. Note: This is a work in progress, I add content and, from time to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=33&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This HOWTO shows a step-by-step installation and configuration of FreeBSD 7.1 from scratch. The reader should have a basic Linux and/or Unix knowledge and should feel comfortably with the console. Throughout this document, by &#8220;VMware&#8221; I&#8217;m actually referring to &#8220;VMware Workstation&#8221;.</p>
<blockquote><p>
<strong>Note:</strong> This is a work in progress, I add content and, from time to time, go back and change some text to make it better. Please, check up regularly for the latest updates.
</p></blockquote>
<h1>1. Getting the install media.</h1>
<p>I happen to have a DVD labeled &#8220;FreeBSD 7.1 32bit DVD&#8221; which I got for free at <a href="http://www.fosdem.org/2009/">FOSDEM &#8217;09</a> but you can as well go to <a href="ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/7.1/">ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/7.1/</a> and download the <a href="ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/7.1/7.1-RELEASE-i386-bootonly.iso">7.1-RELEASE-i386-bootonly.iso</a> ISO image &#8211; it&#8217;s just 36.1MB and is really all you need for this installation approach. You don&#8217;t need to burn it on CD or mount it whatsoever.</p>
<h1>2. Creating the virtual machine.</h1>
<p>For this HOWTO I&#8217;ve been using VMware Workstation version 6.5.1 build-126130 on Kubuntu 8.10 host, with KDE 4.1.4, but most probably different versions would work, too.</p>
<blockquote><p>
I had some keyboard problems within the virtual machine itself. A quick search showed that this can easily be fixed by adding <code>xkeymap.nokeycodeMap = true</code> in <code>~/.vmware/config</code>. I don&#8217;t know if this problem is caused by this specific Kubuntu version and/or KDE 4.x, but at work I&#8217;m running Fedora 8 with KDE 3.5.8 as host (and the same VMware version) and don&#8217;t have it there.
</p></blockquote>
<p>The &#8220;New Virtual Machine Wizard&#8221; goes like this:</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-012.png?w=646&#038;h=520" alt="New_Virtual_Machine_Wizard-01" title="New_Virtual_Machine_Wizard-01" width="646" height="520" class="alignnone size-full wp-image-47" /><br />
2.1. I choose &#8220;Custom&#8221; here.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-022.png?w=646&#038;h=520" alt="New_Virtual_Machine_Wizard-02" title="New_Virtual_Machine_Wizard-02" width="646" height="520" class="alignnone size-full wp-image-48" /><br />
2.2. Accept the defaults here.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-031.png?w=646&#038;h=520" alt="New_Virtual_Machine_Wizard-03" title="New_Virtual_Machine_Wizard-03" width="646" height="520" class="alignnone size-full wp-image-49" /><br />
2.3. I Select &#8220;I will install the operating system later.&#8221;, because I want to change something in the VMware BIOS, prior to starting the installation, and avoid accidentally booting from the installation media.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-04.png?w=646&#038;h=520" alt="New_Virtual_Machine_Wizard-04" title="New_Virtual_Machine_Wizard-04" width="646" height="520" class="alignnone size-full wp-image-50" /><br />
2.4. Select Guest Operating System: 5. Other, Version: FreeBSD</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-05.png?w=646&#038;h=520" alt="New_Virtual_Machine_Wizard-05" title="New_Virtual_Machine_Wizard-05" width="646" height="520" class="alignnone size-full wp-image-51" /><br />
2.5. Let&#8217;s name it &#8220;FreeBSD-7.1&#8243;.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-06.png?w=646&#038;h=520" alt="New_Virtual_Machine_Wizard-06" title="New_Virtual_Machine_Wizard-06" width="646" height="520" class="alignnone size-full wp-image-52" /><br />
2.6. Defaults here.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-07.png?w=646&#038;h=520" alt="New_Virtual_Machine_Wizard-07" title="New_Virtual_Machine_Wizard-07" width="646" height="520" class="alignnone size-full wp-image-53" /><br />
2.7. My host machine has quite enough RAM (4G), so I&#8217;m selecting 512 MB RAM for the guest.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-08.png?w=646&#038;h=520" alt="New_Virtual_Machine_Wizard-08" title="New_Virtual_Machine_Wizard-08" width="646" height="520" class="alignnone size-full wp-image-54" /><br />
2.8. NAT is OK for me, because I don&#8217;t want my guest to appear between the rest of the machines in the office and, besides, I&#8217;d like all the details of network configuration taken care of automatically. Also, moving the virtual machine image between different hosts is easier this way.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-09.png?w=646&#038;h=520" alt="New_Virtual_Machine_Wizard-09" title="New_Virtual_Machine_Wizard-09" width="646" height="520" class="alignnone size-full wp-image-55" /><br />
2.9. I don&#8217;t understand the question, therefore defaults here.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-10.png?w=646&#038;h=520" alt="New_Virtual_Machine_Wizard-10" title="New_Virtual_Machine_Wizard-10" width="646" height="520" class="alignnone size-full wp-image-56" /><br />
2.10. I want a new disk to be created for me, so I go with the defaults again.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-11.png?w=646&#038;h=520" alt="New_Virtual_Machine_Wizard-11" title="New_Virtual_Machine_Wizard-11" width="646" height="520" class="alignnone size-full wp-image-57" /><br />
2.11. I don&#8217;t know which setting is better for FreeBSD, so here I, too, accept the proposed defaults.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-12.png?w=646&#038;h=520" alt="New_Virtual_Machine_Wizard-12" title="New_Virtual_Machine_Wizard-12" width="646" height="520" class="alignnone size-full wp-image-58" /><br />
2.12. 8G is just enough for what I&#8217;m going to do (I didn&#8217;t know this in advance, but it fortunately happened so). Most modern OSes and/or filesystems can accommodate a file that large, so I don&#8217;t see why should I want it chunked. I have a relatively small hard disk on my laptop and by the time I took this screenshot I thought I&#8217;d save some space by having the virtual disk grow as needed. It eventually appeared that, of those 8G, up to about 7G were used at some point (when building kde4), so maybe having the virtual disk allocated in advance is not that bad idea, after all. Besides, there will be heavy compilation ahead, so this could speed things up a bit.</p>
<blockquote><p>
There&#8217;s a small bug here. Take a look at step 2.5. If this is the first virtual machine you&#8217;ve ever created with your Linux user, you most probably don&#8217;t have the <code>~/vmware</code> folder created. If this is the case or if you, at step 2.5., chose another nonexistent parent folder for this VM, then the option &#8220;Store virtual disk as a single file&#8221; will be grayed out and you can&#8217;t select it. Cancel the wizard, create the folder and start over.
</p></blockquote>
<p><img src="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-13.png?w=646&#038;h=520" alt="New_Virtual_Machine_Wizard-13" title="New_Virtual_Machine_Wizard-13" width="646" height="520" class="alignnone size-full wp-image-59" /><br />
2.13. Defaults here.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-14.png?w=646&#038;h=520" alt="New_Virtual_Machine_Wizard-14" title="New_Virtual_Machine_Wizard-14" width="646" height="520" class="alignnone size-full wp-image-60" /><br />
2.14. I don&#8217;t want my VM automatically powered on after creation. I also, hit &#8220;Customize Hardware&#8230;&#8221; button and remove the floppy &#8211; who needs it these days, anyway. Then &#8220;Finish&#8221; and so long for the creation of the virtual machine.</p>
<h1>3. Installing FreeBSD 7.1 in the virtual machine.</h1>
<p>I&#8217;m going to show detailed steps of how I install FreeBSD on VMware. I don&#8217;t claim that this is the best way, it&#8217;s just my way. My approach is minimalistic. It boils down to sticking to the bare minimum during the installation phase and doing any configuration later. You&#8217;ll see that I don&#8217;t even enable Linux binary compatibility or ports during installation. There will be screenshots accompanying most steps in this HOWTO, except for some trivial ones, to avoid bloating. I&#8217;ll also quote the <a href="http://www.freebsd.org/doc/en/books/handbook/index.html">FreeBSD Handbook</a> often.</p>
<p>First of all, I want to set the BIOS clock in the new VM to GMT so I power it on and hit F2 to enter SETUP.</p>
<blockquote><p>
This is the time when you&#8217;ll understand if you need the keyboard fix mentioned in the beginning. If you can&#8217;t navigate in the BIOS naturally, and the keys you press cause odd behavior then you probably need the fix. If you can&#8217;t navigate in the BIOS, you won&#8217;t be able to navigate in the FreeBSD installation, either.
</p></blockquote>
<p>Although my host machine&#8217;s BIOS clock is set to GMT, the host OS (my Kubuntu) is configured with my local timezone, of course. The new virtual machine&#8217;s BIOS clock is showing the local time by default, because it probably takes it from my Kubuntu, not my BIOS. Anyway, I set it 2 hours back and there it is in GMT.</p>
<blockquote><p>
That&#8217;s why at step 2.3. I chose &#8220;I will install the operating system later.&#8221; If I had specified the ISO file then, and now miss the moment of hitting F2 (which is very easy to miss), the installation would start before fixing the BIOS time.
</p></blockquote>
<p>Now I can power off and go to VM &#8211;&gt; Settings &#8211;&gt; CD/DVD (IDE) &#8211;&gt; Connection and select the ISO image <code>7.1-RELEASE-i386-bootonly.iso</code> I downloaded. &#8220;Save&#8221;, power on again and off we go&#8230;</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-01.png?w=734&#038;h=459" alt="freebsd71-installation-01" title="freebsd71-installation-01" width="734" height="459" class="alignnone size-full wp-image-90" /><br />
3.1. I put this screenshot for the sole purpose of making this HOWTO unnecessary long.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-02.png?w=734&#038;h=457" alt="freebsd71-installation-02" title="freebsd71-installation-02" width="734" height="457" class="alignnone size-full wp-image-99" /><br />
3.2. I choose &#8220;United States&#8221; so that I&#8217;m not asked to choose an alternative keyboard layout. Although not my country, US keyboard layout suits me best, isn&#8217;t this the case with everybody? By the way, I still don&#8217;t quite understand what exactly this questions asks me &#8211; whether it means &#8220;Set your location now, but the default keyboard layout for the system will still be US&#8221;, or &#8220;You may be having a non-qwerty keyboard (French, German, Chinese) so we want to set the default keyboard layout for you so that you can type at all&#8221;. Anyway, throughout my very little experience with the FreeBSD installer, I&#8217;ve always chosen US at this screen (with the sincere confidence that my location can easily be changed post installation, if necessary, and I still be on the safe side) and have never had worries with that. I mean, never had to change this later.</p>
<p>The <a href="http://www.freebsd.org/doc/en/books/handbook/install-start.html#VIEW-PROBE">FreeBSD Handbook</a> doesn&#8217;t explain this any further. Here&#8217;s the quote: &#8220;Use the arrow key to choose a country, region, or group. Then press Enter, it will set your country and keymap easily.&#8221;</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-03.png?w=734&#038;h=457" alt="freebsd71-installation-03" title="freebsd71-installation-03" width="734" height="457" class="alignnone size-full wp-image-100" /><br />
3.3. Standard installation sounds least scary.</p>
<p>3.4. A dialog box tells me I&#8217;ll need to deal with an &#8220;fdisk&#8221;-like partitioning program to create BSD slices.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-07.png?w=734&#038;h=457" alt="freebsd71-installation-07" title="freebsd71-installation-07" width="734" height="457" class="alignnone size-full wp-image-101" /><br />
3.5. I hit A = Use Entire Disk and these 3 slices are created automatically for me. Here&#8217;s what the <a href="http://www.freebsd.org/doc/en/books/handbook/install-steps.html#SYSINSTALL-FDISK1">FreeBSD Handbook</a> says about this: &#8220;The existing slices will be removed, and replaced with a small area flagged as unused (again, an artifact of PC disk layout), and then one large slice for FreeBSD. If you do this, then you should select the newly created FreeBSD slice using the arrow keys, and press S to mark the slice as being bootable&#8230; When finished, press Q. Your changes will be saved in sysinstall, but will not yet be written to disk.&#8221; That&#8217;s what I did.</p>
<p>I must confess, I always felt tempted to use the F = &#8216;DD&#8217; mode and, in fact, I did try it separately in another VM and all went well. For the purposes of this HOWTO I&#8217;m using A = Use Entire Disk. More on this here: <a href="http://www.freebsd.org/doc/en/articles/formatting-media/index.html">Formatting Media For Use With FreeBSD</a> and here: <a href="http://www.unixguide.net/freebsd/faq/09.03.shtml">Will a &#8220;dangerously dedicated&#8221; disk endanger my health?</a>. </p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-08.png?w=734&#038;h=457" alt="freebsd71-installation-08" title="freebsd71-installation-08" width="734" height="457" class="alignnone size-full wp-image-105" /><br />
3.6. Since this is the only OS in the VM, I can safely choose &#8220;Standard Install a standard MBR (no boot manager)&#8221;.</p>
<p>3.7. Another dialog box telling me I&#8217;ll need to create the partitions inside the BSD slices.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-16.png?w=734&#038;h=457" alt="freebsd71-installation-16" title="freebsd71-installation-16" width="734" height="457" class="alignnone size-full wp-image-106" /><br />
3.8. Nothing special here &#8211; a 512M swap partition and all the rest goes for the root filesystem (&#8220;/&#8221;). I&#8217;m not planning separate <code>/home</code>, <code>/usr</code> or so. After all, this is just a playground and I want to keep it simple. It is arguable whether a swap partition is needed at all under VMware, but I want to resemble a real world situation. The size of the swap partition is arguable, too, but 512M worked for this scenario.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-18.png?w=734&#038;h=457" alt="freebsd71-installation-18" title="freebsd71-installation-18" width="734" height="457" class="alignnone size-full wp-image-107" /><br />
3.9. As promised, I go for &#8220;A Minimal The smallest configuration possible&#8221;. I recall the installers of RHEL3 and Fedora Core 4 had a &#8220;minimal&#8221; option, which I now miss, because recent versions abandoned this approach. Other popular distros don&#8217;t seem to have it, either.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-21.png?w=734&#038;h=457" alt="freebsd71-installation-21" title="freebsd71-installation-21" width="734" height="457" class="alignnone size-full wp-image-110" /><br />
3.10. The <a href="ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/7.1/7.1-RELEASE-i386-bootonly.iso">7.1-RELEASE-i386-bootonly.iso</a> ISO image I downloaded doesn&#8217;t carry the distro files, so I&#8217;ll use network install. I could have downloaded <a href="ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/7.1/7.1-RELEASE-i386-disc1.iso">7.1-RELEASE-i386-disc1.iso</a> or <a href="ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/7.1/7.1-RELEASE-i386-dvd1.iso.gz">7.1-RELEASE-i386-dvd1.iso.gz</a> just as easily, and chosen &#8220;1 CD/DVD Install from a FreeBSD CD/DVD&#8221; option, but where&#8217;s all the fun in that? Anyway, FTP sounds &#8220;old-school&#8221; enough, so if there was only one network method to work for FreeBSD, that must be FTP. If your are behind a web proxy, that will probably fail. I&#8217;ve been behind proxy in the past and have been beating the air to get the &#8220;4 HTTP Install from an FTP server through a HTTP proxy&#8221; option working with no success.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-22.png?w=734&#038;h=457" alt="freebsd71-installation-22" title="freebsd71-installation-22" width="734" height="457" class="alignnone size-full wp-image-112" /><br />
3.11. Germany sounds like a good choice. It&#8217;s a shame <a href="http://bg.freebsd.org/">http://bg.freebsd.org/</a> is down. :(</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-23.png?w=734&#038;h=457" alt="freebsd71-installation-23" title="freebsd71-installation-23" width="734" height="457" class="alignnone size-full wp-image-113" /><br />
3.12. em0 must be my Ethernet card.</p>
<p>3.13. I don&#8217;t want IPv6. Again, this is a playground so let&#8217;s keep it simple.</p>
<p>3.14. I do want DHCP, because earlier I created my VM with NAT. VMware has its own DHCP server that takes care of network configuration.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-26.png?w=734&#038;h=457" alt="freebsd71-installation-26" title="freebsd71-installation-26" width="734" height="457" class="alignnone size-full wp-image-114" /><br />
3.15. Hostname will have to be entered manually. By the way, I didn&#8217;t try leaving that field blank. Maybe I&#8217;ll try and see what happens.</p>
<p>3.16. A warning dialog box asking if I&#8217;m sure. Select &#8220;YES&#8221; here.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-28.png?w=734&#038;h=457" alt="freebsd71-installation-28" title="freebsd71-installation-28" width="734" height="457" class="alignnone size-full wp-image-115" /><br />
<img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-29.png?w=734&#038;h=457" alt="freebsd71-installation-29" title="freebsd71-installation-29" width="734" height="457" class="alignnone size-full wp-image-116" /><br />
<img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-30.png?w=734&#038;h=457" alt="freebsd71-installation-30" title="freebsd71-installation-30" width="734" height="457" class="alignnone size-full wp-image-117" /><br />
<img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-31.png?w=734&#038;h=457" alt="freebsd71-installation-31" title="freebsd71-installation-31" width="734" height="457" class="alignnone size-full wp-image-118" /><br />
<img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-32.png?w=734&#038;h=457" alt="freebsd71-installation-32" title="freebsd71-installation-32" width="734" height="457" class="alignnone size-full wp-image-119" /><br />
3.17. Some progress screenshots.</p>
<p>3.18. A congratulating dialog box show here with &#8220;OK&#8221; as only button.</p>
<p>3.19. I don&#8217;t want this machine to function as a network gateway.</p>
<p>3.20. I don&#8217;t want to configure inetd and stuff, because it&#8217;s obsolete.</p>
<p>3.21. Yes, I do want SSH login.</p>
<p>3.22. Anonymous FTP access is not needed.</p>
<p>3.23. No NFS server or client needed. Well, if I ever need NFS client I&#8217;ll configure it later. I wouldn&#8217;t want to take all the fun out of it by letting some program do it for me :)</p>
<p>3.24. I don&#8217;t want to customize system console settings.</p>
<p>3.25. I do want to set the timezone.</p>
<p>3.26. A dialog box asks me if this machine&#8217;s CMOS clock is set to UTC and I answer &#8220;Yes&#8221;, because the first thing I did after creating the VM was to set it&#8217;s BIOS time to GMT.</p>
<p>3.27. A couple of dialogs to select the timezone.</p>
<p>3.28. I don&#8217;t want Linux binary compatibility right now. Will enable it later.</p>
<p>3.29. I answer that I don&#8217;t have a PS/2, serial or bus mouse. In fact, even though my host mouse is connected with USB, VMware is known to always emulate mouse as PS2. Nevertheless, answering &#8220;No&#8221; here, surprisingly, doesn&#8217;t cause any problems and mouse just works &#8211; I don&#8217;t know why.</p>
<p>3.30. The installer offers I quote &#8220;&#8230; a collection of thousands of ready-to-run applications, from text editors to games, to WEB servers and more.&#8221; and asks if I want to browse it now. No, I don&#8217;t.</p>
<p>3.31. I don&#8217;t want to add user accounts now. Part of this playground is to get familiar with FreeBSD and I want to learn how to add users from the console later and don&#8217;t want the installer to take the fun out of it.</p>
<p>3.32. Now I set the root password.</p>
<p>3.33. I don&#8217;t want to visit the general configuration menu for a chance to set any last options for the same reasons as in 3.10, 3.23, 3.31. Besides, the configuration menu is user-hostile and scares me &#8211; I&#8217;d rather take my chances on THE CONSOLE. :)</p>
<p>3.34. The configuration menu appears anyway. Huh, why did it ask me then? Select &#8220;X Exit Install&#8221;.</p>
<p>3.35. A dialog box asks if I&#8217;m sure. Yes, I am. But before hitting the &#8220;Yes&#8221; button I must open the VM settings and unselect the ISO image option for the CD ROM and let it use a physical drive. VMware may complain, see the screenshot below:</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-56.png?w=779&#038;h=528" alt="freebsd71-installation-56" title="freebsd71-installation-56" width="779" height="528" class="alignnone size-full wp-image-121" /><br />
3.36. I don&#8217;t know what the problem is, but I hit &#8220;Yes&#8221;.</p>
<p><img src="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-55.png?w=734&#038;h=457" alt="freebsd71-installation-55" title="freebsd71-installation-55" width="734" height="457" class="alignnone size-full wp-image-122" /><br />
3.37. Now I can safely tell the installer to reboot.</p>
<p>3.38. The VM reboots and loads my new FreeBSD-7.1 system! There is a small glitch, though. The message &#8220;Starting sshd.&#8221; stays there for several minutes. It looks like the system&#8217;s hung, but be patient it will boot eventually. A short investigation revealed that sendmail is the one to blame and looks like the boot process waits for it to timeout or whatever. I don&#8217;t even know if it eventually starts, but I don&#8217;t care. I disable it by adding <code>sendmail_enable="NONE"</code> in <code>/etc/rc.conf</code>, reboot again and all goes smoothly this time. Voila, we have ourselves a brand new FreeBSD to play with! :)</p>
<blockquote><p>
The first thing I do with the freshly installed system is open <code>/boot/loader.conf</code> and put the line <code>kern.hz=100</code> there. See <a href="http://ivoras.sharanet.org/freebsd/vmware.html">http://ivoras.sharanet.org/freebsd/vmware.html</a>, section &#8220;3. Reduce kern.hz&#8221; for more info.
</p></blockquote>
<h1>4. Updating the Base System sources, a.k.a. &#8220;The World&#8221;.</h1>
<p>Updating is crucial for an operating system because as soon as it&#8217;s installed it&#8217;s already old. FreeBSD has a clear distinction between base system and software packages (ports), and they are updated differently. In contrast, most Linux distros wrap everything in packages and updating is uniform.</p>
<p>There is a way to do a binary update of the base system, much like in Linux. This process is called <a href="http://www.freebsd.org/doc/en/books/handbook/updating-upgrading-freebsdupdate.html">FreeBSD Update</a> and is explained in the Handbook. I&#8217;m going to go for the source update approach, because it&#8217;s&#8230; that&#8217;s right &#8211; it&#8217;s more fun. Of course, updating from source is also well documented, but I&#8217;ll briefly list my steps here. Again, like in the previous chapter, I&#8217;m going to show the way I updated my FreeBSD but I don&#8217;t claim this to be the best or only possible way.</p>
<p>I&#8217;d like to login to the new FreeBSD installation over SSH so that I use my host console and not switch between VMware and host all the time. By default, root login is not allowed.</p>
<p>4.1. Open <code>/etc/ssh/sshd_config</code> and change <code>#PermitRootLogin no</code> to <code>PermitRootLogin yes</code> (make sure to uncomment, as well). Then issue <code>/etc/rc.d/sshd restart</code> and now I can initiate an SSH session to FreeBSD from my Linux host.</p>
<p>To update the base system sources there are several tools: Anonymous CVS, CTM, CVSup and probably more. However, in FreeBSD 6.2 and onwards there is a new tool &#8211; <a href="http://www.freebsd.org/cgi/man.cgi?query=csup&amp;sektion=1">csup(1)</a>, which is a rewrite of the CVSup software in C and I&#8217;m going to use that, because it&#8217;s included in the minimal installation I just did and don&#8217;t have to install it from port.</p>
<p>To run csup I need a configuration file. In <code>/usr/share/examples/cvsup/</code> there are several templates. Now is a good time to mention that there are several branches I could follow when updating from source and they are confusing to me, as well. To put it simply, I can choose to receive more updates with a higher risk of breaking things (and use template <code>stable-supfile</code>), or receive only critical security patches but be more stable (and use template <code>standard-supfile</code>). The complete list of the CVS tags is in the <a href="http://www.freebsd.org/doc/en/books/handbook/cvs-tags.html">Handbook</a>.</p>
<p>4.2. I&#8217;m choosing the safe side and will edit the <code>standard-supfile</code> template. Besides, there isn&#8217;t so much benefit of tracking the latest updates with the base system. Maybe the ports are more worth being followed in this manner. I need to change <code>*default host=CHANGE_THIS.FreeBSD.org</code> to <code>*default host=cvsup7.de.FreeBSD.org</code>, for example.</p>
<p>4.3. Let me deal with the <code>refuse</code> file, because I don&#8217;t need to download the language-specific files. <code>mkdir /var/db/sup</code> and <code>cp /usr/share/examples/cvsup/refuse /var/db/sup/</code>.</p>
<p>4.4. Now it&#8217;s time to do the actual retrieval of the sources. Usually, a simple <code>csup /usr/share/examples/cvsup/standard-supfile</code> should be enough for most people and for myself if I was doing this from my home laptop. Unfortunately, now I&#8217;m at work and our Internet access is a bit limited. The default CVS port is 5999 and our corporate firewall blocks it, so I&#8217;ll need a workaround. I&#8217;ll do the SSH tunneling like this: <code>ssh -f myusername@my.home.machine -L 5999:cvsup7.de.FreeBSD.org:5999 -N</code>. <code>-f</code> requests ssh to go to background just before command execution and <code>-N</code> means &#8220;do not execute a remote command&#8221; (this is useful for just forwarding ports). Now the command I need is <code>csup -h localhost /usr/share/examples/cvsup/standard-supfile</code> and about 45 min. later it&#8217;s done. The sources are retrieved and put in <code>/usr/src</code>.</p>
<p>The base system sources include the kernel sources, that&#8217;s why I don&#8217;t write a separate section about updating the kernel sources.</p>
<h1>5. Rebuilding &#8220;world&#8221; &amp; compiling a new kernel. Installing the new kernel &amp; the new world.</h1>
<p>Once having the sources, the <a href="http://www.freebsd.org/doc/en/books/handbook/makeworld.html#CANONICAL-BUILD">FreeBSD Handbook</a> advises that the currently recommended sequence of actions when upgrading is: buildworld, buildkernel, installkernel, installworld.</p>
<p>5.1. Firstly, check <code>/usr/src/UPDATING</code> for any pre-buildworld steps necessary for your version of the sources.</p>
<p>5.2. Create the file <code>/etc/make.conf</code> and put the following lines in it:<br />
<code><br />
CPUTYPE?=core<br />
CFLAGS= -O2 -fno-strict-aliasing -pipe<br />
NO_PROFILE=true<br />
</code></p>
<blockquote><p>
Note: My laptop has Intel Core Solo CPU, that&#8217;s why I use <code>CPUTYPE?=core</code>. You put whatever is appropriate for you. The complete list of valid CPU types is in <code>/usr/share/examples/etc/make.conf</code>. The other options should be suitable for most users.
</p></blockquote>
<p>5.3. As the <a href="http://www.freebsd.org/doc/en/books/handbook/makeworld.html#Q24.7.14.5.">FreeBSD Handbook</a> suggests, in order to speed up building, I reboot the system and at the boot prompt select the &#8220;single user&#8221; option. It will boot and ask &#8220;Enter full pathname of shell or RETURN for /bin/sh:&#8221; and I press ENTER here. Then the <a href="http://www.freebsd.org/doc/en/books/handbook/makeworld.html#MAKEWORLD-SINGLEUSER">Handbook</a> instructs me to run the following sequence of commands:<br />
<code><br />
fsck -p<br />
mount -u /<br />
mount -a -t ufs<br />
swapon -a<br />
</code></p>
<p>This checks the file systems, remounts the root filesystem (&#8220;/&#8221;) read-write, mounts all the other UFS file systems referenced in <code>/etc/fstab</code> and then turns swapping on. Having in mind that the system is freshly installed on VMware, I don&#8217;t think <code>fsck -p</code> is really needed.</p>
<p>Then the instruction follows: </p>
<blockquote><p>
Note: If your CMOS clock is set to local time and not to GMT (this is true if the output of the <a href="http://www.FreeBSD.org/cgi/man.cgi?query=date&amp;sektion=1">date(1)</a> command does not show the correct time and zone), you may also need to run the following command:</p>
<p><code>#adjkerntz -i</code></p>
<p>This will make sure that your local time-zone settings get set up correctly &#8212; without this, you may later run into some problems.
</p></blockquote>
<p>This won&#8217;t be necessary because the very first thing I did after powering on my newly created virtual machine was to ensure it&#8217;s BIOS time was set to GMT. See the beginning of section &#8220;3. Installing FreeBSD 7.1 in the virtual machine.&#8221;</p>
<p>5.4. <code>cd /usr/src</code> and <code>make -j4 buildworld</code> to start building. The <code>-j4</code> option has <a href="http://www.FreeBSD.org/cgi/man.cgi?query=make&amp;sektion=1">make(1)</a> run up to 4 processes in parallel. The FreeBSD Handbook says that this usually helps regardless of whether you have a single or a multi processor machine and empirical evidence posted to the mailing lists shows this number generally gives the best performance benefit on a single CPU. About 4 hours later (on my machine) the world is rebuilt. The resulting binaries are in <code>/usr/obj</code>.</p>
<p>5.5. While still in single user mode (for speed reasons), in order to compile a new kernel I do this: <code>cd /usr/src/sys/i386/conf</code> and <code>cp GENERIC MYKERNEL</code>. Edit <code>MYKERNEL</code> to leave only <code>cpu I686_CPU</code>, comment out <code>makeoptions DEBUG=-g</code> and <code>options INET6</code> and change <code>ident GENERIC</code> to <code>ident MYKERNEL</code>.</p>
<p>5.6. <code>cd /usr/src</code> and <code>make buildkernel KERNCONF=MYKERNEL</code> to start building. I don&#8217;t know whether it&#8217;s safe to use the <code>-j</code> option here. About 35 min. later (on my machine) my kernel is built.</p>
<p>5.7. To install the new kernel I do: <code>make installkernel KERNCONF=MYKERNEL</code>. Don&#8217;t use <code>-j</code> option here.</p>
<p>5.8. I then reboot again into single user mode as explained in 5.3, this time in order to actually load the new kernel.</p>
<p>5.9. I run <code>mergemaster -p</code>, the working directory doesn&#8217;t matter. It should complete pretty quickly and at the end will ask: &#8220;Do you wish to delete what is left of /var/tmp/temproot? [no]&#8221; &#8211; answer &#8220;no&#8221; here or just hit ENTER.</p>
<p>5.10. To install the new world I do: <code>cd /usr/src</code> and <code>make installworld</code>. Don&#8217;t use <code>-j</code> option here.</p>
<p>5.11. I run <code>mergemaster</code> again (without <code>-p</code> this time) to update the files in <code>/etc</code>, the working directory again doesn&#8217;t matter. It will first ask whether to use the existing <code>/var/tmp/temproot</code> &#8211; just hit ENTER here. Then it will find differences in <code>/etc/motd</code> &#8211; choose &#8220;i&#8221; to install the temporary <code>./etc/motd</code>. Finally, it will ask: &#8220;Do you wish to delete what is left of /var/tmp/temproot? [no]&#8221; &#8211; answer &#8220;yes&#8221; here.</p>
<p>5.12. Now I finally reboot and select normal boot. I can safely delete the <code>/usr/obj</code> directory to gain some space (currently about 340 MB). If it was a real working server, I&#8217;d probably leave <code>/usr/src</code> intact, but since this installation is just a playground and I&#8217;m not planning to do any patches to the sources in the future, I&#8217;ll delete it, too, with <code>rm -rf /usr/src/*</code> in order to keep the <code>src</code> itself. The only thing I&#8217;d save from there is my custom kernel configuration file &#8211; <code>/usr/src/sys/i386/conf/MYKERNEL</code>.</p>
<h1>6. Obtaining &amp; installing the Ports Collection meta files.</h1>
<p>When I installed this system I followed a minimalistic approach and, when sysinstall asked if I would like to install the Ports Collection, I said &#8220;no&#8221;. There are several ways to retrieve and deploy the ports collection meta files: CVSup, Portsnap, Sysinstall. All of them are documented in the <a href="http://www.freebsd.org/doc/en/books/handbook/ports-using.html#PORTS-TREE">FreeBSD Handbook</a>. Like when retrieving the base system sources, I&#8217;m going to use <a href="http://www.freebsd.org/cgi/man.cgi?query=csup&amp;sektion=1">csup(1)</a>, which is a rewrite of the CVSup software in C and is included in the minimal installation so I don&#8217;t have to install it separately. Moreover, most HOWTO&#8217;s out there already describe the Portsnap method and I want to be consistent with the way I got the system sources.</p>
<p>6.1. In <code>/usr/share/examples/cvsup/</code> there is a configuration file template called <code>ports-supfile</code>. I edit it and change <code>*default host=CHANGE_THIS.FreeBSD.org</code> to <code>*default host=cvsup7.de.FreeBSD.org</code>.</p>
<p>6.2. Just like in 4.4., I do the SSH port forwarding with the command <code>ssh -f myusername@my.home.machine -L 5999:cvsup7.de.FreeBSD.org:5999 -N</code> and get the error: &#8220;socket: Protocol not supported&#8221;. A quick search takes me to <a href="https://bugzilla.mindrot.org/show_bug.cgi?id=408">Bug 408 &#8211; sshd[25790]: error: socket: Protocol not supported</a>, which explains that the error can safely be ignored and is caused because I don&#8217;t have IPv6 on my hosts. In fact, <code>my.home.machine</code> does have IPv6, but the installation I&#8217;m doing here doesn&#8217;t &#8211; remember I disabled it during installation in 3.13. and later when configuring and rebuilding the new kernel in 5.5. So if I want to avoid the error I should replace <code>my.home.machine</code> with its IP address. Again, if you have direct Internet connection, you don&#8217;t need this SSH tunneling.</p>
<p>Finally, I get to the command which retrieves the ports: <code>csup -h localhost /usr/share/examples/cvsup/ports-supfile</code> and about 30 min. later it&#8217;s done. The Ports Collection is retrieved and put in <code>/usr/ports</code>. That folder is 394M.</p>
<p>6.3. Now that I have access to all those thousands of applications I need a proof of concept. Let me demonstrate how ports are built from source and installed, and test if that is at all possible. The very first thing I want is to, finally, get <a href="http://en.wikipedia.org/wiki/Bash">Bash</a>, because I&#8217;m not used to the default FreeBSD <a href="http://en.wikipedia.org/wiki/C_shell">C shell</a>. The commands follow:</p>
<p><code>cd /usr/ports/shells/bash</code><br />
<code>make config-recursive</code><br />
<code>make install clean</code></p>
<p>I can&#8217;t advise what&#8217;s best to answer to <code>config-recursive</code> &#8211; just use common sense or search the Internet for help about the specific port you&#8217;re building. Most of the time, if I&#8217;m not sure I go with the defaults.</p>
<p>Well, Bash is quite some port so it takes about 5 min. to fetch, build and install (for some ports it takes days). It also drags some dependencies in but that&#8217;s perfectly OK.</p>
<p>The <code>make config-recursive</code> option is often overlooked. Most documents that describe working with ports only say &#8220;go to the port directory and do <code>make install clean</code>&#8220;. However, the <code>config</code> target is interactive and for ports that depend on many other ports it is likely that I&#8217;ll be asked a lot of questions at different stages of the whole process. <code>make config-recursive</code> asks all the questions for this port and all its dependencies in advance so I can trigger the installation of a large port and go to bed, having it done in the morning. See <a href="http://www.freebsd.org/cgi/man.cgi?query=ports&amp;sektion=7#TARGETS">PORTS(7)#TARGETS</a> for more information about all the targets and their sequence.</p>
<p>To make Bash root&#8217;s default shell:<br />
<code>chsh -s bash root</code></p>
<h1>7. Enabling Linux binary compatibility &amp; installing Fedora 8 base libraries.</h1>
<p>When I installed this system I followed a minimalistic approach and, when sysinstall asked if I want Linux binary compatibility, I said &#8220;no&#8221;. Now it&#8217;s time to get it.</p>
<p>7.1. Add <code>linux_enable="YES"</code> in <code>/etc/rc.conf</code> and either reboot or issue <code>kldload linux</code>.</p>
<p>7.2. Add <code>OVERRIDE_LINUX_BASE_PORT=f8</code> in <code>/etc/make.conf</code>.</p>
<p>7.3. Add <code>compat.linux.osrelease=2.6.16</code> in <code>/etc/sysctl.conf</code> and either reboot or issue <code>sysctl compat.linux.osrelease=2.6.16</code>.</p>
<p>7.4. Add <code>none /usr/compat/linux/proc linprocfs rw 0 0</code> in <code>/etc/fstab</code>.</p>
<p>7.5. Run <code>mkdir -p /usr/compat/linux/proc</code> and either reboot or issue <code>mount /usr/compat/linux/proc</code>.</p>
<p>7.6. Get the linux libraries:</p>
<p><code>cd /usr/ports/emulators/linux_base-f8/</code><br />
<code>make config-recursive</code><br />
<code>make install clean</code></p>
<p>See <a href="http://www.linux.com/feature/53055">Setting up Linux compatibility on FreeBSD 6</a> for more in-depth explanation on this subject.</p>
<h1>8. Installing &amp; configuring Xorg.</h1>
<p>8.1. Add <code>X_WINDOW_SYSTEM=xorg</code> in <code>/etc/make.conf</code>.</p>
<p>8.2. Install it from port:</p>
<p><code>cd /usr/ports/x11/xorg</code><br />
<code>make config-recursive</code><br />
<code>make install clean</code></p>
<blockquote><p>
During <code>make config-recursive</code>, in &#8220;Options for xorg-drivers 7.4&#8243; I deselect everyting and leave only: &#8220;MOUSE Install mouse input driver&#8221;, &#8220;KEYBOARD Install keyboard input driver&#8221; and &#8220;VMWARE Install vmware video driver&#8221;.</p>
<p>In &#8220;Options for xorg-server 1.5.3_7,1&#8243;, leave &#8220;HAL Compile with HAL config support&#8221;. Without it, mouse and keyboard won&#8217;t work in X and the VM won&#8217;t power off by itself, but will require me to power it off from the VMware menu.
</p></blockquote>
<p>8.3. Add <code>127.0.0.1 freebsd71 freebsd71.localdomain</code> in <code>/etc/hosts</code>. Without this, startx will lag upon startup and shutdown. I wonder why this is not set by default. On a second thought, this lagging may be because I disabled IPV6 during installation in 3.13. and later when configuring and rebuilding the new kernel in 5.5.</p>
<p>8.4. Download this file: <a href="http://closet.hit.bg/xorg.conf">xorg.conf</a> and put it in <code>/etc/X11</code>.</p>
<p>8.5. Add <code>hald_enable="YES"</code> in <code>/etc/rc.conf</code>.</p>
<p>8.6. Issue <code>startx</code>. The X should start with resolution 1152&#215;864 and the mouse &amp; keyboard should work. I can easily change the resolution by changing the line <code>Modes "1152x864"</code> to whatever I like.</p>
<blockquote><p>
There are two very important configuration options in order to have the keyboard and the mouse working. I should either have a) <code>hald_enable="YES"</code> in <code>/etc/rc.conf</code>, or b) <code>Option "AllowEmptyInput" "off"</code> in <code>/etc/X11/xorg.conf</code>, otherwise the input devices don&#8217;t work. It took me about 5 days to figure this out. b) is only needed if a) is not present (or if HAL is not compiled/installed); if I have a) then b) is not needed. Anyway, if I don&#8217;t have any of them, keyboard and mouse will not work, even if I install VMware Tools &#8211; I tried that.
</p></blockquote>
<p>It looks like VMware Tools are not necessary. X works fine without them because I enabled &#8220;vmware video driver&#8221; when building it. The other benefits of VMware Tools can also be ignored, see <a href="http://ivoras.sharanet.org/freebsd/vmware.html">http://ivoras.sharanet.org/freebsd/vmware.html</a>, section &#8220;5. VMWare Tools not necessary&#8221; for more info.</p>
<h1>9. Installing kde4 &amp; making it start upon boot.</h1>
<p>9.1. Install it from port:</p>
<p><code>cd /usr/ports/x11/kde4/</code><br />
<code>make config-recursive</code><br />
<code>make install clean</code></p>
<blockquote><p>
Again, I can&#8217;t advise what&#8217;s best to answer to <code>config-recursive</code>, but anyway, in &#8220;Options for kde4 4.2.1&#8243; I dare to deselect some applications that look like I won&#8217;t be using, such as kdeaccessibility, games and so on.</p>
<p>In &#8220;Options for kdebase-runtime 4.2.1&#8243;, there was &#8220;PULSEAUDIO Enable playback via PulseAudio soundserver&#8221; which was disabled by default. I don&#8217;t know why but I felt like enabling it.</p>
<p>In &#8220;Options for ghostscript8 8.63&#8243; I enabled &#8220;Set A4 (not Letter) as a default paper size&#8221;.
</p></blockquote>
<p>Oh, duh! As I write this HOWTO, I repeat the steps one by one to make sure that everything I write is the way it is. Yesterday evening I left kde4 to build on VMware at work and it went on its own for a couple of hours, then I went home thinking it would be ready in the morning. This morning I find it waiting on my response to pulseaudio 0.9.14 <code>config</code> target.<br />
<img src="http://ptankov.files.wordpress.com/2009/02/pulseaudio-config.png?w=616&#038;h=400" alt="pulseaudio-config" title="pulseaudio-config" width="616" height="400" class="alignnone size-full wp-image-172" /><br />
Apparently, <code>make config-recursive</code> does its best in configuring all the dependencies, but it could not foresee that I would select pulseaudio at the kdebase-runtime <code>config</code> target. Anyway, I leave the defaults and the build resumes. I am also presented with the interactive <code>config</code> questions of libsndfile 1.0.19 where I again go with the defaults.</p>
<p>Oops, somewhere along the way I ran out of disk space! :( I think it was after kde4 was built but before it was installed. I went to <code>/usr/ports</code> and issued <code>make clean</code> followed by <code>make distclean</code> just in case and I don&#8217;t know why, but it did free some space. I then restarted building kde4 with <code>make build</code> which completed immediately. Then <code>make install</code> took a lot longer, not only installing the port but also building more and more stuff along the way.</p>
<p>Kde4 finally built and installed. Let me delete the dist files <code>rm -rf /usr/ports/distfiles/*</code> to free some space.</p>
<p>To test if kde will start, in file <code>~/.xinitrc</code> add the following lines (create the file if missing):<br />
<code>PATH=/usr/local/kde4/bin:$PATH</code><br />
<code>export PATH</code><br />
<code>exec startkde</code></p>
<p>and then issue <code>startx</code> from within VMware, not from the SSH session.</p>
<p>9.2. In order to login with graphical authentication form, in file <code>/etc/ttys</code> change<br />
<code>ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure</code><br />
with<br />
<code>ttyv8 "/usr/local/kde4/bin/kdm -nodaemon" xterm on secure</code></p>
<p>and reboot to test if it works.</p>
<p>9.3. Finally, I quickly install urwfonts: <code>cd /usr/ports/x11-fonts/urwfonts</code> and <code>make install clean</code>. They are not required for X or KDE4 to work, but the more fonts, the better. Moreover, before installing them the KDM login dialog looked like this:<br />
<img src="http://ptankov.files.wordpress.com/2009/02/kdm-login-dialog-01.png?w=457&#038;h=177" alt="kdm-login-dialog-01" title="kdm-login-dialog-01" width="457" height="177" class="alignnone size-full wp-image-194" /></p>
<p>and now it looks like this:<br />
<img src="http://ptankov.files.wordpress.com/2009/02/kdm-login-dialog-02.png?w=460&#038;h=175" alt="kdm-login-dialog-02" title="kdm-login-dialog-02" width="460" height="175" class="alignnone size-full wp-image-195" /></p>
<p>Looking at how the password dots have become thicker and smoother, I can only imagine what other goodies these urwfonts will bring me. ;-) I don&#8217;t have to add anything in my <code>/etc/X11/xorg.conf</code> because it already has the entry <code>FontPath "/usr/local/lib/X11/fonts/URW/"</code>.</p>
<h1>10. Adding a regular user.</h1>
<p>Now I am at the KDM login screen, but it won&#8217;t allow me to login with the root user, so I need to add a regular user. If I press Ctrl+Alt+F1 I&#8217;ll most likely switch to virtual console 1 on my Linux host. To switch to virtual console 1 in the guest OS I need to perform the following keyboard kombination: press &amp; hold Ctrl+Alt, press &amp; release Space while still holding Ctrl+Alt and finally press F1. In short, the key combination is the same with only a hit of the space bar just before F1. Of course, I can always SSH to the guest, but I wanted to demonstrate this nice feature VMware added receintly.</p>
<p>10.1. Once at the console, I add a user with the command (surprise!) <code>adduser</code>. It is interactive and I just answer what it asks, making sure I choose Bash as my shell. Most other questions have reasonable defaults.</p>
<p>10.2. Now go back to virtual console 9 where I left KDM login screen waiting for me (press &amp; hold Ctrl+Alt, press &amp; release Space while still holding Ctrl+Alt and finally press F9) and login with the newly created user.<br />
<img src="http://ptankov.files.wordpress.com/2009/02/kde4-initial-startup-00.png" alt="kde4-initial-startup-00" title="kde4-initial-startup-00" class="alignnone size-full wp-image-178" /></p>
<p>10.3. KDE4 may take a little bit longer to start for the first time and, in the beginning, may look like it&#8217;s hung but be patient, it will start eventually.<br />
<img src="http://ptankov.files.wordpress.com/2009/02/kde4-initial-startup-01.png" alt="kde4-initial-startup-01" title="kde4-initial-startup-01" class="alignnone size-full wp-image-179" /></p>
<p>10.4. Also, after the desktop is shown, some programs will launch themselves and pop up some windows for a while so I don&#8217;t rush into it immediately, but let those programs do their job without interference.<br />
<img src="http://ptankov.files.wordpress.com/2009/02/kde4-initial-startup-021.png" alt="kde4-initial-startup-021" title="kde4-initial-startup-021" class="alignnone size-full wp-image-185" /><br />
<img src="http://ptankov.files.wordpress.com/2009/02/kde4-initial-startup-031.png" alt="kde4-initial-startup-031" title="kde4-initial-startup-031" class="alignnone size-full wp-image-186" /><br />
<img src="http://ptankov.files.wordpress.com/2009/02/kde4-initial-startup-04.png" alt="kde4-initial-startup-04" title="kde4-initial-startup-04" class="alignnone size-full wp-image-187" /></p>
<p>A minute or two later, after all the bells and whistles have settled down and the hard disk indicator in the VMware status bar has stopped reporting crazy disk activity, I can dive into tweaking KDE4 to match my preference. I don&#8217;t hear any welcoming music because sound hasn&#8217;t been configured and enabled yet.</p>
<h1>11. Enabling sound.</h1>
<p>Of course, firstly there should be no sound problems with VMware and the host OS. In case of any &#8211; search the web, google returns plenty of results.</p>
<p>This one is easy. Just add <code>snd_es137x_load="YES"</code> in <code>/boot/loader.conf</code> and either reboot or issue <code>kldload snd_es137x</code>. Next time I login to KDE4 I am greeted with a welcome sound.</p>
<h1>12. Installing Java.</h1>
<p>12.1. Config and build the port.</p>
<p><code>cd /usr/ports/java/jdk16</code><br />
<code>make config-recursive</code></p>
<p>That pops up a configuration dialog for <code>jdk 1.6.0.3p4_10</code> and several more dependencies and I select all defaults.</p>
<p><code>make build</code></p>
<p>The build complains that some files with special licenses are missing. I read the error message carefully, because it says from where to get them. Finally, the following files should be in <code>/usr/ports/distfiles</code>:</p>
<p><code>bsd-jdk16-patches-4.tar.bz2</code><br />
<code>jdk-6u3-fcs-bin-b05-jrl-24_sep_2007.jar</code><br />
<code>jdk-6u3-fcs-mozilla_headers-b05-unix-24_sep_2007.jar</code><br />
<code>jdk-6u3-fcs-src-b05-jrl-24_sep_2007.jar</code><br />
<code>tzupdater-1_3_12-2009a.zip</code></p>
<p>Now I re-run <code>make build</code>. </p>
<p>Somewhere during the build process there&#8217;s another error:</p>
<blockquote><p>
===&gt;   Returning to build of jdk-1.6.0.3p4_10<br />
===&gt;   jdk-1.6.0.3p4_10 depends on file: /usr/local/include/cups/cups.h &#8211; found<br />
===&gt;   jdk-1.6.0.3p4_10 depends on file: /usr/local/diablo-jdk1.6.0/bin/javac &#8211; not found<br />
===&gt;    Verifying install for /usr/local/diablo-jdk1.6.0/bin/javac in /usr/ports/java/diablo-jdk16<br />
===&gt;  Vulnerability check disabled, database not found<br />
===&gt;  Found saved configuration for diablo-jdk-1.6.0.07.02_4</p>
<p> Because of licensing restrictions, you must fetch the distribution<br />
 manually.</p>
<p> Please access</p>
<p>http://www.FreeBSDFoundation.org/cgi-bin/download?download=diablo-caffe-freebsd7-i386-1.6.0_07-b02.tar.bz2</p>
<p> with a web browser and &#8220;Accept&#8221; the End User License Agreement for<br />
 &#8220;Caffe Diablo 1.6.0&#8243;.</p>
<p> Please place the downloaded file(s) in /usr/ports/distfiles.</p>
<p>*** Error code 1</p>
<p>Stop in /usr/ports/java/diablo-jdk16.<br />
*** Error code 1</p>
<p>Stop in /usr/ports/java/diablo-jdk16.<br />
*** Error code 1</p>
<p>Stop in /usr/ports/java/jdk16.<br />
*** Error code 1</p>
<p>Stop in /usr/ports/java/jdk16.
</p></blockquote>
<p>Looks like one more file will have to be fetched manually and put in <code>/usr/ports/distfiles</code>. I open the given web address, accept the license and download the file <code>diablo-caffe-freebsd7-i386-1.6.0_07-b02.tar.bz2</code>.</p>
<p>I re-run <code>make build</code> yet again and a few hours later it&#8217;s done. Installation is easy with <code>make install</code>, then a little housekeeping with <code>make clean</code> and <code>make distclean</code>.</p>
<p>12.2. I finally test the newly installed java with <code>java -version</code>. To my surprise I get the following output:</p>
<blockquote><p>
java version &#8220;1.6.0_07&#8243;<br />
Diablo Java(TM) SE Runtime Environment (build 1.6.0_07-b02)<br />
Diablo Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
</p></blockquote>
<p>Hum, Diablo Java&#8230; I remember it was dragged in as a dependency while building jdk16. Let me see how many Javas I have installed: <code>pkg_info | grep jdk</code></p>
<blockquote><p>
diablo-jdk-1.6.0.07.02_4 Java Development Kit 1.6.0_07.02<br />
jdk-1.6.0.3p4_10    Java Development Kit 1.6.0
</p></blockquote>
<p>Looks like diablo-jdk is somewhere in the PATH before jdk-1.6. Let&#8217;s see: <code>/usr/local/jdk1.6.0/bin/java -version</code></p>
<blockquote><p>
java version &#8220;1.6.0_03-p4&#8243;<br />
Java(TM) SE Runtime Environment (build 1.6.0_03-p4-root_30_mar_2009_17_29-b00)<br />
Java HotSpot(TM) Client VM (build 1.6.0_03-p4-root_30_mar_2009_17_29-b00, mixed mode)
</p></blockquote>
<p>That&#8217;s the Java I wanted. I will uninstall Diablo Java: <code>cd /usr/ports/java/diablo-jdk16</code> and <code>make deinstall</code>. Now let me check again <code>java -version</code></p>
<blockquote><p>
java version &#8220;1.6.0_03-p4&#8243;<br />
Java(TM) SE Runtime Environment (build 1.6.0_03-p4-root_30_mar_2009_17_29-b00)<br />
Java HotSpot(TM) Client VM (build 1.6.0_03-p4-root_30_mar_2009_17_29-b00, mixed mode)
</p></blockquote>
<p>Now it&#8217;s all done.</p>
<h1>13. Installing flash player.</h1>
<p>(to be continued&#8230;)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ptankov.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ptankov.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ptankov.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ptankov.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ptankov.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ptankov.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ptankov.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ptankov.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ptankov.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ptankov.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ptankov.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ptankov.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ptankov.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ptankov.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=33&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ptankov.wordpress.com/2009/02/24/howto-install-and-configure-freebsd-71-on-vmware-workstation-65-from-the-ground-up/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ptankov</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-012.png" medium="image">
			<media:title type="html">New_Virtual_Machine_Wizard-01</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-022.png" medium="image">
			<media:title type="html">New_Virtual_Machine_Wizard-02</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-031.png" medium="image">
			<media:title type="html">New_Virtual_Machine_Wizard-03</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-04.png" medium="image">
			<media:title type="html">New_Virtual_Machine_Wizard-04</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-05.png" medium="image">
			<media:title type="html">New_Virtual_Machine_Wizard-05</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-06.png" medium="image">
			<media:title type="html">New_Virtual_Machine_Wizard-06</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-07.png" medium="image">
			<media:title type="html">New_Virtual_Machine_Wizard-07</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-08.png" medium="image">
			<media:title type="html">New_Virtual_Machine_Wizard-08</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-09.png" medium="image">
			<media:title type="html">New_Virtual_Machine_Wizard-09</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-10.png" medium="image">
			<media:title type="html">New_Virtual_Machine_Wizard-10</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-11.png" medium="image">
			<media:title type="html">New_Virtual_Machine_Wizard-11</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-12.png" medium="image">
			<media:title type="html">New_Virtual_Machine_Wizard-12</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-13.png" medium="image">
			<media:title type="html">New_Virtual_Machine_Wizard-13</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/new_virtual_machine_wizard-14.png" medium="image">
			<media:title type="html">New_Virtual_Machine_Wizard-14</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-01.png" medium="image">
			<media:title type="html">freebsd71-installation-01</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-02.png" medium="image">
			<media:title type="html">freebsd71-installation-02</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-03.png" medium="image">
			<media:title type="html">freebsd71-installation-03</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-07.png" medium="image">
			<media:title type="html">freebsd71-installation-07</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-08.png" medium="image">
			<media:title type="html">freebsd71-installation-08</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-16.png" medium="image">
			<media:title type="html">freebsd71-installation-16</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-18.png" medium="image">
			<media:title type="html">freebsd71-installation-18</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-21.png" medium="image">
			<media:title type="html">freebsd71-installation-21</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-22.png" medium="image">
			<media:title type="html">freebsd71-installation-22</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-23.png" medium="image">
			<media:title type="html">freebsd71-installation-23</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-26.png" medium="image">
			<media:title type="html">freebsd71-installation-26</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-28.png" medium="image">
			<media:title type="html">freebsd71-installation-28</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-29.png" medium="image">
			<media:title type="html">freebsd71-installation-29</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-30.png" medium="image">
			<media:title type="html">freebsd71-installation-30</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-31.png" medium="image">
			<media:title type="html">freebsd71-installation-31</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-32.png" medium="image">
			<media:title type="html">freebsd71-installation-32</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-56.png" medium="image">
			<media:title type="html">freebsd71-installation-56</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/freebsd71-installation-55.png" medium="image">
			<media:title type="html">freebsd71-installation-55</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/pulseaudio-config.png" medium="image">
			<media:title type="html">pulseaudio-config</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/kdm-login-dialog-01.png" medium="image">
			<media:title type="html">kdm-login-dialog-01</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/kdm-login-dialog-02.png" medium="image">
			<media:title type="html">kdm-login-dialog-02</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/kde4-initial-startup-00.png" medium="image">
			<media:title type="html">kde4-initial-startup-00</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/kde4-initial-startup-01.png" medium="image">
			<media:title type="html">kde4-initial-startup-01</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/kde4-initial-startup-021.png" medium="image">
			<media:title type="html">kde4-initial-startup-021</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/kde4-initial-startup-031.png" medium="image">
			<media:title type="html">kde4-initial-startup-031</media:title>
		</media:content>

		<media:content url="http://ptankov.files.wordpress.com/2009/02/kde4-initial-startup-04.png" medium="image">
			<media:title type="html">kde4-initial-startup-04</media:title>
		</media:content>
	</item>
		<item>
		<title>[HOWTO] Mount ISO Image File on AIX</title>
		<link>http://ptankov.wordpress.com/2008/11/07/howto-mount-iso-image-file-on-aix/</link>
		<comments>http://ptankov.wordpress.com/2008/11/07/howto-mount-iso-image-file-on-aix/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 09:00:30 +0000</pubDate>
		<dc:creator>ptankov</dc:creator>
				<category><![CDATA[console]]></category>
		<category><![CDATA[AIX]]></category>

		<guid isPermaLink="false">http://ptankov.wordpress.com/?p=19</guid>
		<description><![CDATA[The usual mount -o ro,loop image.iso /mnt/iso/, which you&#8217;re used to on Linux, can&#8217;t be used on AIX. On AIX you dd the ISO file into a raw Logical Volume, then mount the LV as a filesystem. Here are the steps for copying the ISO named image.iso into the folder /mnt/iso/ (a JFS filesystem): 1. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=19&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The usual <code>mount -o ro,loop image.iso /mnt/iso/</code>, which you&#8217;re used to on Linux, can&#8217;t be used on AIX. On AIX you <code>dd</code> the ISO file into a raw Logical Volume, then mount the LV as a filesystem. Here are the steps for copying the ISO named <code>image.iso</code> into the folder <code>/mnt/iso/</code> (a JFS filesystem):</p>
<p>1. Create a filesystem with size slightly bigger than the size of the ISO image. Do NOT mount the filesystem yet. Here I assume we&#8217;re dealing with a DVD ISO image ~ 4.7G:</p>
<pre>
# crfs -v jfs -g rootvg -a size=5000M -m/mnt/iso -Ano -pro -tno
Based on the parameters chosen, the new /mnt/iso JFS file system
is limited to a maximum size of 134217728 (512 byte blocks)

New File System size is 10354688
</pre>
<p>2. Get the logical volume name associated with the new filesystem:</p>
<pre>
# lsfs | grep iso
/dev/lv01 -- /mnt/iso jfs 10354688 ro no no
</pre>
<p>(we see that the logical volume name is <code>lv01</code>)</p>
<p>3. dd the ISO image into <code>rlv01</code> (raw <code>lv01</code>):</p>
<pre>
# dd if=/path/to/image.iso of=/dev/rlv01 bs=100M
43+1 records in.
43+1 records out.
</pre>
<p>(Note the <code>r</code> before <code>lv01</code>! This is important)</p>
<p>4.  Mount the file system:</p>
<pre>
# mount -v cdrfs /mnt/iso
</pre>
<p>(Note the filesystem type! Unlike the <code>crfs</code> command above, where we used <code>-v jfs</code>, now we use <code>-v cdrfs</code>)</p>
<p>5. Do whatever you do with the files in <code>/mnt/iso</code>.</p>
<p>6. When finished, unmount the filesystem:</p>
<pre>
# umount /mnt/iso
</pre>
<p>7. And finally, remove the filesystem:</p>
<pre>
# rmfs /mnt/iso
rmlv: Logical volume lv01 is removed.
</pre>
<p><strong><u>Notes:</u></strong><br />
*) The above was tested on AIX 5.3<br />
*) For instructions how to do it on Solaris 10 see here: <a href="http://geekdom.wesmo.com/2007/03/29/mounting-an-iso-image-on-solaris/">http://geekdom.wesmo.com/2007/03/29/mounting-an-iso-image-on-solaris/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ptankov.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ptankov.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ptankov.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ptankov.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ptankov.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ptankov.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ptankov.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ptankov.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ptankov.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ptankov.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ptankov.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ptankov.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ptankov.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ptankov.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=19&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ptankov.wordpress.com/2008/11/07/howto-mount-iso-image-file-on-aix/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ptankov</media:title>
		</media:content>
	</item>
		<item>
		<title>[TIP] View or Extract RPM Packages Content</title>
		<link>http://ptankov.wordpress.com/2008/04/15/tip-viewextract-rpm-packages-content/</link>
		<comments>http://ptankov.wordpress.com/2008/04/15/tip-viewextract-rpm-packages-content/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 12:41:01 +0000</pubDate>
		<dc:creator>ptankov</dc:creator>
				<category><![CDATA[console]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://ptankov.wordpress.com/?p=16</guid>
		<description><![CDATA[Case: You have an RPM package file, for example file.rpm. You want to view what files it contains, and then extract them just as if it was a .tar.gz archive. By the way, it&#8217;s a pity Konqueror doesn&#8217;t provide a reasonable context menu when you rightclick on it, but only offers to compress (like any [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=16&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Case:</strong><br />
You have an RPM package file, for example <code>file.rpm</code>. You want to view what files it contains, and then extract them just as if it was a .tar.gz archive. By the way, it&#8217;s a pity Konqueror doesn&#8217;t provide a reasonable context menu when you rightclick on it, but only offers to compress (like any regular file) or open it with Software Installer. (I&#8217;m talking about KDE, don&#8217;t know about Gnome Nautilus). Moreover, if you choose to open it with <code>ark</code>, it doesn&#8217;t recognise the format. Of course, the easiest way would be to launch Midnight Commander, &#8220;enter&#8221; this file as if it was a regular folder and copy whatever you need, but we are looking for a non-interactive and more straightforward method here.</p>
<p><strong>Incantation:</strong></p>
<pre>rpm2cpio file.rpm | cpio -t
rpm2cpio file.rpm | cpio -i</pre>
<p><strong><u>Notes:</u></strong><br />
*) <code>rpm2cpio</code> converts the .rpm file specified as a single argument to a cpio archive on standard out;<br />
*) The <code>-t</code> switch of <code>cpio</code> prints a table of contents of the input, and the <code>-i</code> does the extraction;<br />
*) I tested this on Fedora;<br />
*) The command <code>rpm2cpio</code> is a part of the <code>rpm</code> package on Fedora. You should see how to obtain it for your distro;<br />
*) The command <code>cpio</code> is a separate package on Fedora. You should see how to obtain it for your distro;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ptankov.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ptankov.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ptankov.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ptankov.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ptankov.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ptankov.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ptankov.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ptankov.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ptankov.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ptankov.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ptankov.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ptankov.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ptankov.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ptankov.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ptankov.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ptankov.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=16&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ptankov.wordpress.com/2008/04/15/tip-viewextract-rpm-packages-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ptankov</media:title>
		</media:content>
	</item>
		<item>
		<title>[HOWTO] Grant and Revoke Remote root Access to MySQL</title>
		<link>http://ptankov.wordpress.com/2008/04/09/howto-grant-and-revoke-remote-root-access-to-mysql/</link>
		<comments>http://ptankov.wordpress.com/2008/04/09/howto-grant-and-revoke-remote-root-access-to-mysql/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 10:20:32 +0000</pubDate>
		<dc:creator>ptankov</dc:creator>
				<category><![CDATA[console]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://ptankov.wordpress.com/?p=11</guid>
		<description><![CDATA[To grant root access from all hosts (except for localhost): GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY 'topsecret'; To revoke root access from all hosts (except for localhost): DELETE FROM mysql.user WHERE User = 'root' AND Host = '%'; FLUSH PRIVILEGES; To enable MySQL service to accept connections from all hosts change the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=11&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To grant root access from all hosts (except for localhost):</p>
<pre>
GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY 'topsecret';
</pre>
<p>To revoke root access from all hosts (except for localhost):</p>
<pre>
DELETE FROM mysql.user WHERE User = 'root' AND Host = '%';
FLUSH PRIVILEGES;
</pre>
<p>To enable MySQL service to accept connections from all hosts change the following line in file mysql.conf:<br />
<code>bind-address=127.0.0.1</code><br />
to<br />
<code>bind-address=0.0.0.0</code><br />
or better just comment out:<br />
<code>#bind-address=127.0.0.1</code><br />
and restart the MySQL service.</p>
<p><strong><u>Notes:</u></strong><br />
*) The percent symbol (<code>"%"</code>) in the notation <code>root@"%"</code> means &#8220;any host&#8221;, but it doesn&#8217;t imply localhost. You need to repeat the commands above with <code>root@localhost</code> in order to grant/revoke permissions for localhost.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ptankov.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ptankov.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ptankov.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ptankov.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ptankov.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ptankov.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ptankov.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ptankov.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ptankov.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ptankov.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ptankov.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ptankov.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ptankov.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ptankov.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ptankov.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ptankov.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=11&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ptankov.wordpress.com/2008/04/09/howto-grant-and-revoke-remote-root-access-to-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ptankov</media:title>
		</media:content>
	</item>
		<item>
		<title>[TIP] Mount a Windows share on Linux</title>
		<link>http://ptankov.wordpress.com/2008/04/09/tip-mount-a-windows-share-on-linux/</link>
		<comments>http://ptankov.wordpress.com/2008/04/09/tip-mount-a-windows-share-on-linux/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 11:10:26 +0000</pubDate>
		<dc:creator>ptankov</dc:creator>
				<category><![CDATA[console]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://ptankov.wordpress.com/?p=10</guid>
		<description><![CDATA[To test if your Linux machine sees the shares on the Windows box: smbclient -L windowsbox -U username and it prompts you for the password. Mount the share: mount -t smbfs -o username=john //winbox/share /mnt and it prompts you for the password. Notes: 1) It&#8217;s OK to use domain users in both cases ("domainusername"). You [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=10&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To test if your Linux machine sees the shares on the Windows box:<br />
<code>smbclient -L windowsbox -U username</code><br />
and it prompts you for the password.</p>
<p>Mount the share:<br />
<code>mount -t smbfs -o username=john //winbox/share /mnt</code><br />
and it prompts you for the password.</p>
<p><strong><u>Notes:</u></strong><br />
1) It&#8217;s OK to use domain users in both cases (<code>"domainusername"</code>). You need to use quotes to escape the backslash.</p>
<p>2) You can give the password in the commandline options list like this:<br />
<code>-o username="domainusername",password=topsecret</code><br />
<span style="color:#ff0000;">Note that this syntax saves the password. Also, it will be visible in the processes list.</span></p>
<p>3) The <code>-t smbfs</code> option can usually be omitted. The mount command should detect the type automatically.</p>
<p>See: <a href="http://cri.ch/linux/docs/sk0001.html">http://cri.ch/linux/docs/sk0001.html</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ptankov.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ptankov.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ptankov.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ptankov.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ptankov.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ptankov.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ptankov.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ptankov.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ptankov.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ptankov.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ptankov.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ptankov.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ptankov.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ptankov.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ptankov.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ptankov.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ptankov.wordpress.com&amp;blog=3417687&amp;post=10&amp;subd=ptankov&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ptankov.wordpress.com/2008/04/09/tip-mount-a-windows-share-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ptankov</media:title>
		</media:content>
	</item>
	</channel>
</rss>
