<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Shuron's Letters&#187; linux</title>
	<atom:link href="http://alexander.holbreich.org/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexander.holbreich.org</link>
	<description>Personal blog of Alexander Holbreich</description>
	<lastBuildDate>Tue, 25 May 2010 21:46:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Sending Mails with own Exim: Google account example.</title>
		<link>http://alexander.holbreich.org/2010/02/exim-mail-google/</link>
		<comments>http://alexander.holbreich.org/2010/02/exim-mail-google/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 23:22:52 +0000</pubDate>
		<dc:creator>shuron</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[googlemail]]></category>
		<category><![CDATA[smarthost]]></category>

		<guid isPermaLink="false">http://alexander.holbreich.org/?p=508</guid>
		<description><![CDATA[
Today I&#8217;ll describe short, how to configure sending of emails with your Debian or other Linux distribution. The ability of sending mails is very useful feature for every long-running server machine, it&#8217;s easy and common way to notify the administrator on problems.


Here are configurationsteps for mail-sending with Exim and Googlemail account (google Apps accounts work [...]]]></description>
			<content:encoded><![CDATA[<p>
<a href="http://alexander.holbreich.org/wp-content/uploads/2010/02/exim1-e1266189286432.png"><img class="size-full wp-image-560 alignright" style="margin: 5px;" title="exim" src="http://alexander.holbreich.org/wp-content/uploads/2010/02/exim1-e1266189286432.png" alt="" width="150" height="111" /></a>Today I&#8217;ll describe short, how to configure sending of emails with your Debian or other Linux distribution. The ability of sending mails is very useful feature for every long-running server machine, it&#8217;s easy and common way to notify the administrator on problems.
</p>
<p>
Here are configurationsteps for mail-sending with Exim and Googlemail account (google Apps accounts work the same way too).
</p>
<ol>
<li>first of all we need working Exim. If not installed &#8211; install exim4.
<pre class="brush: bash;">
$ apt-get update
$ apt-get install exim4
</pre>
</li>
<li> Configuration should start after the installation. However you can start configuration of exim every-time with
<pre class="brush: bash;">
$ dpkg-reconfigure exim4-config
</pre>
</li>
<li> Answer the questions of configuration wizard. The important one is.<br />
a <strong>general type of mail configuration</strong>. Choose &#8220;sent by <strong>smarthost</strong>&#8221;<br />
if you wanna use the ability of e.g. Googlemail account. Then SMTP with dynamic IP would be difficult <img src='http://alexander.holbreich.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li> answer other questions
<ul>
<li> Provide a System Mail Name: e.g. mycompany.com</li>
<li> Provide IP addresses to listen on for incoming SMTP connections<br />
User 127.0.0.1 if you don&#8217;t want only send mail from local machine and nothing for all IP&#8217;s.</li>
<li> <strong>Provide Machine handling outgoing mail for this host (smarthost): smtp.gmail.com::587</strong></li>
</ul>
<p>Other parameter are not so important for a start. However read more about <a href="http://pkg-exim4.alioth.debian.org/README/README.Debian.html#id280581">debconf questions</a> and other configuration if you like.</li>
<li> Now it&#8217;s time to provide credentials information of your gmail account. Therefore you need edit <em>/etc/exim4/passwd.client</em> file with your favorite editor.<br />
Insert that for Standard or google app account but replace with valid mail and password.</p>
<pre class="brush: bash;">
gmail-smtp.l.google.com:yourYourMail@googlemail.com:yourPass
*.google.com:yourYourMail@googlemail.com:yourPass
smtp.gmail.com:yourYourMail@googlemail.com:yourPass
</pre>
</li>
<li> Make sure  <em>/etc/exim4/passwd.client</em> belongs to user root and group Debian-exim which is normal so on my Debian. If not, run that command:
<pre class="brush: bash;">
$ chown root:Debian-exim /etc/exim4/passwd.client
</pre>
</li>
<li> Actualize the whole configuration with:
<pre class="brush: bash;">
$ update-exim4.conf
</pre>
<p>Your &#8216;re done!</li>
</ol>
<p>Now it&#8217;s test it with.</p>
<pre class="brush: bash;">
echo &quot;Server Mail Test Message &quot; | mail -s &quot;Just Test&quot; SomeMail@someDomain.org
</pre>
<p>Watch logs:</p>
<pre class="brush: bash;">
$ tail -1000f /var/log/exim4/mainlog
</pre>
<p>When you see something like this. Everything should vent perfect.</p>
<pre class="brush: bash;">
2010-02-14 23:00:26 1NgmVu-0007v8-Kt &lt; = root@mail-server1.mycompany.com U=root P=local S=424
2010-02-14 23:00:28 1NgmVu-0007v8-Kt =&gt; testMail@mycompany.org R=smarthost T=remote_smtp_smarthost H=gmail-smtp-msa.l.google.com [72.14.221.109] X=TLS1.0:RSA_ARCFOUR_MD5:16 DN=&quot;C=US,ST=California,L=Mountain View,O=Google Inc,CN=smtp.gmail.com&quot;
</pre></p>



Share and Enjoy:


	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fexim-mail-google%2F&amp;title=Sending%20Mails%20with%20own%20Exim%3A%20Google%20account%20example.&amp;bodytext=%0D%0AToday%20I%27ll%20describe%20short%2C%20how%20to%20configure%20sending%20of%20emails%20with%20your%20Debian%20or%20other%20Linux%20distribution.%20The%20ability%20of%20sending%20mails%20is%20very%20useful%20feature%20for%20every%20long-running%20server%20machine%2C%20it%27s%20easy%20and%20common%20way%20to%20notify%20the%20administra" title="Digg"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fexim-mail-google%2F&amp;title=Sending%20Mails%20with%20own%20Exim%3A%20Google%20account%20example.&amp;notes=%0D%0AToday%20I%27ll%20describe%20short%2C%20how%20to%20configure%20sending%20of%20emails%20with%20your%20Debian%20or%20other%20Linux%20distribution.%20The%20ability%20of%20sending%20mails%20is%20very%20useful%20feature%20for%20every%20long-running%20server%20machine%2C%20it%27s%20easy%20and%20common%20way%20to%20notify%20the%20administra" title="del.icio.us"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fexim-mail-google%2F&amp;t=Sending%20Mails%20with%20own%20Exim%3A%20Google%20account%20example." title="Facebook"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mixx.com/submit?page_url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fexim-mail-google%2F&amp;title=Sending%20Mails%20with%20own%20Exim%3A%20Google%20account%20example." title="Mixx"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fexim-mail-google%2F&amp;title=Sending%20Mails%20with%20own%20Exim%3A%20Google%20account%20example.&amp;annotation=%0D%0AToday%20I%27ll%20describe%20short%2C%20how%20to%20configure%20sending%20of%20emails%20with%20your%20Debian%20or%20other%20Linux%20distribution.%20The%20ability%20of%20sending%20mails%20is%20very%20useful%20feature%20for%20every%20long-running%20server%20machine%2C%20it%27s%20easy%20and%20common%20way%20to%20notify%20the%20administra" title="Google Bookmarks"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fexim-mail-google%2F&amp;Title=Sending%20Mails%20with%20own%20Exim%3A%20Google%20account%20example." title="BlinkList"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/blinklist.png" title="BlinkList" alt="BlinkList" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mister-wong.de/addurl/?bm_url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fexim-mail-google%2F&amp;bm_description=Sending%20Mails%20with%20own%20Exim%3A%20Google%20account%20example.&amp;plugin=soc" title="MisterWong.DE"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong.DE" alt="MisterWong.DE" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://slashdot.org/bookmark.pl?title=Sending%20Mails%20with%20own%20Exim%3A%20Google%20account%20example.&amp;url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fexim-mail-google%2F" title="Slashdot"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fexim-mail-google%2F&amp;title=Sending%20Mails%20with%20own%20Exim%3A%20Google%20account%20example." title="StumbleUpon"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fexim-mail-google%2F" title="Technorati"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fexim-mail-google%2F&amp;h=Sending%20Mails%20with%20own%20Exim%3A%20Google%20account%20example." title="NewsVine"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fexim-mail-google%2F&amp;title=Sending%20Mails%20with%20own%20Exim%3A%20Google%20account%20example." title="Reddit"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://yigg.de/neu?exturl=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fexim-mail-google%2F&amp;exttitle=Sending%20Mails%20with%20own%20Exim%3A%20Google%20account%20example." title="Yigg"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/yiggit.png" title="Yigg" alt="Yigg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fexim-mail-google%2F&amp;t=Sending%20Mails%20with%20own%20Exim%3A%20Google%20account%20example." title="HackerNews"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fexim-mail-google%2F&amp;title=Sending%20Mails%20with%20own%20Exim%3A%20Google%20account%20example.&amp;source=Shuron%27s+Letters+Personal+blog+of+Alexander+Holbreich&amp;summary=%0D%0AToday%20I%27ll%20describe%20short%2C%20how%20to%20configure%20sending%20of%20emails%20with%20your%20Debian%20or%20other%20Linux%20distribution.%20The%20ability%20of%20sending%20mails%20is%20very%20useful%20feature%20for%20every%20long-running%20server%20machine%2C%20it%27s%20easy%20and%20common%20way%20to%20notify%20the%20administra" title="LinkedIn"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.webnews.de/einstellen?url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fexim-mail-google%2F&amp;title=Sending%20Mails%20with%20own%20Exim%3A%20Google%20account%20example." title="Webnews.de"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/webnews.png" title="Webnews.de" alt="Webnews.de" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fexim-mail-google%2F&amp;submitHeadline=Sending%20Mails%20with%20own%20Exim%3A%20Google%20account%20example.&amp;submitSummary=%0D%0AToday%20I%27ll%20describe%20short%2C%20how%20to%20configure%20sending%20of%20emails%20with%20your%20Debian%20or%20other%20Linux%20distribution.%20The%20ability%20of%20sending%20mails%20is%20very%20useful%20feature%20for%20every%20long-running%20server%20machine%2C%20it%27s%20easy%20and%20common%20way%20to%20notify%20the%20administra&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://alexander.holbreich.org/2010/02/exim-mail-google/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH tunnel without password</title>
		<link>http://alexander.holbreich.org/2010/02/ssh-tunnel-without-password/</link>
		<comments>http://alexander.holbreich.org/2010/02/ssh-tunnel-without-password/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 23:16:40 +0000</pubDate>
		<dc:creator>shuron</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[encrypted]]></category>
		<category><![CDATA[public key]]></category>
		<category><![CDATA[remote server]]></category>
		<category><![CDATA[secure shell]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://alexander.holbreich.org/?p=517</guid>
		<description><![CDATA[ SSH (Secure Shell) allows simple establishment of encrypted and authenticated connection between computers. Today i describe how easy it is do establish such SSH tunnels without using a password. You may need such connections when they have to be opened by daemons (e.g. Cron) without user interaction.


Two words on theory. Password-less connections have to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://alexander.holbreich.org/wp-content/uploads/2010/02/ssh.jpg"><img class="alignleft size-thumbnail wp-image-520" style="margin: 5px 10px;" title="ssh" src="http://alexander.holbreich.org/wp-content/uploads/2010/02/ssh-150x150.jpg" alt="" width="150" height="150" /></a> SSH (Secure Shell) allows simple establishment of encrypted and authenticated connection between computers. Today i describe how easy it is do establish such SSH tunnels without using a password. You may need such connections when they have to be opened by daemons (e.g. Cron) without user interaction.
</p>
<p>
Two words on theory. Password-less connections have to be authenticated at least so strong like the password enabled one, so asymmetric cryptography which enables certificates comes into play.  The clue is to have private and public keys and share your public key with domains which should be able identify you.
</p>
<p>
So therefore let&#8217;s start by generation a needed key-pair.
</p>
<h2>Generating Keys</h2>
<p>
It is possible to create key with pass-phrase and without (or empty pass-phrases). I prefer to not use pass phrase because it is asked every-time on later usage of a ssh.<br />
Even there are ways to gives the pass-phrase to ssh command, but it is more work, with no significant security benefits. So i do the following statement and do not enter any pass-phrase (just hit enter on question).</p>
<pre class="brush: bash;">
$ ssh-keygen -t rsa
</pre>
</p>
<p>
This will create <a href="http://en.wikipedia.org/wiki/RSA">RSA</a> key-pair as following files in ~/.ssh directory:</p>
<ul>
<li>id_rsa</li>
<li>id_rsa.pub</li>
</ul>
<p>Now public key need to be copied to remote host and has to be added to end of <em>~/.ssh/authorized_keys</em> file.
</p>
<h2>Transfer Public keys</h2>
<p>The best way to do it is to use <em>ssh-copy-id</em> program which is inside of many linux distributions.</p>
<pre class="brush: bash;">
$ ssh-copy-id -i ~/.ssh/id_rsa.pub remote-user@remote-server.org
</pre>
<p>In that case everything is done automatically and you are ready after that.  But if <em>ssh-copy-id</em> is not available, you can copy keys manually e.g. like that.</p>
<pre class="brush: bash;">
$ cat ~/.ssh/*.pub | ssh remote-user@remote-server.org 'umask 077; cat &gt;&gt;.ssh/authorized_keys'
</pre>
<p><strong>Attention! </strong>On some linux distrs SSH2 searches for keys in <em>~/.ssh/authorized_keys2</em> . Not so in actual Debian (Lenny), but seems to be so in SuSe linux.</p>
<h2>Test</h2>
<p>Now remote login, scp and sftp can be used without password.<br />
Test it:</p>
<pre class="brush: bash;">
# establish connection
$ ssh remote-user@remote-server.org
#or copy files secure and password-less.
$ scp /home/user/some-file remote-user@remote-server.org:/some-path/dir/
</pre>
<p>More information on <a href="http://www.openssh.org/manual.html">SSH related man pages</a>.</p>



Share and Enjoy:


	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fssh-tunnel-without-password%2F&amp;title=SSH%20tunnel%20without%20password&amp;bodytext=%20SSH%20%28Secure%20Shell%29%20allows%20simple%20establishment%20of%20encrypted%20and%20authenticated%20connection%20between%20computers.%20Today%20i%20describe%20how%20easy%20it%20is%20do%20establish%20such%20SSH%20tunnels%20without%20using%20a%20password.%20You%20may%20need%20such%20connections%20when%20they%20have%20to%20be%20op" title="Digg"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fssh-tunnel-without-password%2F&amp;title=SSH%20tunnel%20without%20password&amp;notes=%20SSH%20%28Secure%20Shell%29%20allows%20simple%20establishment%20of%20encrypted%20and%20authenticated%20connection%20between%20computers.%20Today%20i%20describe%20how%20easy%20it%20is%20do%20establish%20such%20SSH%20tunnels%20without%20using%20a%20password.%20You%20may%20need%20such%20connections%20when%20they%20have%20to%20be%20op" title="del.icio.us"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fssh-tunnel-without-password%2F&amp;t=SSH%20tunnel%20without%20password" title="Facebook"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mixx.com/submit?page_url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fssh-tunnel-without-password%2F&amp;title=SSH%20tunnel%20without%20password" title="Mixx"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fssh-tunnel-without-password%2F&amp;title=SSH%20tunnel%20without%20password&amp;annotation=%20SSH%20%28Secure%20Shell%29%20allows%20simple%20establishment%20of%20encrypted%20and%20authenticated%20connection%20between%20computers.%20Today%20i%20describe%20how%20easy%20it%20is%20do%20establish%20such%20SSH%20tunnels%20without%20using%20a%20password.%20You%20may%20need%20such%20connections%20when%20they%20have%20to%20be%20op" title="Google Bookmarks"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fssh-tunnel-without-password%2F&amp;Title=SSH%20tunnel%20without%20password" title="BlinkList"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/blinklist.png" title="BlinkList" alt="BlinkList" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mister-wong.de/addurl/?bm_url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fssh-tunnel-without-password%2F&amp;bm_description=SSH%20tunnel%20without%20password&amp;plugin=soc" title="MisterWong.DE"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong.DE" alt="MisterWong.DE" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://slashdot.org/bookmark.pl?title=SSH%20tunnel%20without%20password&amp;url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fssh-tunnel-without-password%2F" title="Slashdot"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fssh-tunnel-without-password%2F&amp;title=SSH%20tunnel%20without%20password" title="StumbleUpon"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fssh-tunnel-without-password%2F" title="Technorati"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fssh-tunnel-without-password%2F&amp;h=SSH%20tunnel%20without%20password" title="NewsVine"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fssh-tunnel-without-password%2F&amp;title=SSH%20tunnel%20without%20password" title="Reddit"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://yigg.de/neu?exturl=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fssh-tunnel-without-password%2F&amp;exttitle=SSH%20tunnel%20without%20password" title="Yigg"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/yiggit.png" title="Yigg" alt="Yigg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fssh-tunnel-without-password%2F&amp;t=SSH%20tunnel%20without%20password" title="HackerNews"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fssh-tunnel-without-password%2F&amp;title=SSH%20tunnel%20without%20password&amp;source=Shuron%27s+Letters+Personal+blog+of+Alexander+Holbreich&amp;summary=%20SSH%20%28Secure%20Shell%29%20allows%20simple%20establishment%20of%20encrypted%20and%20authenticated%20connection%20between%20computers.%20Today%20i%20describe%20how%20easy%20it%20is%20do%20establish%20such%20SSH%20tunnels%20without%20using%20a%20password.%20You%20may%20need%20such%20connections%20when%20they%20have%20to%20be%20op" title="LinkedIn"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.webnews.de/einstellen?url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fssh-tunnel-without-password%2F&amp;title=SSH%20tunnel%20without%20password" title="Webnews.de"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/webnews.png" title="Webnews.de" alt="Webnews.de" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Falexander.holbreich.org%2F2010%2F02%2Fssh-tunnel-without-password%2F&amp;submitHeadline=SSH%20tunnel%20without%20password&amp;submitSummary=%20SSH%20%28Secure%20Shell%29%20allows%20simple%20establishment%20of%20encrypted%20and%20authenticated%20connection%20between%20computers.%20Today%20i%20describe%20how%20easy%20it%20is%20do%20establish%20such%20SSH%20tunnels%20without%20using%20a%20password.%20You%20may%20need%20such%20connections%20when%20they%20have%20to%20be%20op&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://alexander.holbreich.org/2010/02/ssh-tunnel-without-password/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JBoss 5 GA on Debian linux</title>
		<link>http://alexander.holbreich.org/2010/01/java-jboss-debian-linux/</link>
		<comments>http://alexander.holbreich.org/2010/01/java-jboss-debian-linux/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 23:50:05 +0000</pubDate>
		<dc:creator>shuron</dc:creator>
				<category><![CDATA[JBoss]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[application server]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://alexander.holbreich.org?p=31</guid>
		<description><![CDATA[This short tutorial describes how to configure JBoss Application Server (Jboss GA 5.1.0) on a debian linux (Debian GNU/Linux 5.x &#8220;Lenny&#8221; ). Article starts with installation of java JDK and continues with JBoss installation and basic configuration according to standard  file system hierarchy. Also init.d. scripts configuration is given here.
Installing Java SDK
Nowadays  installing Java environment [...]]]></description>
			<content:encoded><![CDATA[<p>This short tutorial describes how to configure JBoss Application Server (Jboss GA 5.1.0) on a debian linux (Debian GNU/Linux 5.x &#8220;Lenny&#8221; ). Article starts with installation of java JDK and continues with JBoss installation and basic configuration according to standard  file system hierarchy. Also init.d. scripts configuration is given here.</p>
<h2>Installing Java SDK</h2>
<p>Nowadays  installing Java environment on Debian is an easy task. I used JDK 1.6. Don&#8217;t confound JDK with JRE, because bare Java Runtime Environment is not enough for running JBoss. Debian Wiki maintains (hope) a<a href="http://wiki.debian.org/Java" target="_blank"> list of available java .deb packages</a>, which are easily can be installed with your preferred way. I prefer <em>aptitude</em>, but <em>apt-get</em> of course works too.</p>
<pre class="brush: bash;">
$ aptitude install sun-java6-jdk
#or by good old apt-get.
$ apt-get install sun-java6-jdk
</pre>
<p>Installation is done after seconds. Now test your java installation with</p>
<pre class="brush: bash;">
$ java -version
# Here example result on my configuration:

java version &quot;1.6.0_12&quot;
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode)
</pre>
<p>If you get something like this, you&#8217;re done and your java should be already in the PATH.</p>
<h2>Installing JBoss AS</h2>
<p>Now let&#8217;s install  JBoss Application Server.</p>
<h3>Preparing</h3>
<p><a href="http://alexander.holbreich.org/wp-content/uploads/2010/01/openlogo-nd-50.png"><img class="alignleft size-full wp-image-500" style="margin-left: 15px; margin-right: 15px;" title="openlogo-nd-debian" src="http://alexander.holbreich.org/wp-content/uploads/2010/01/openlogo-nd-50.png" alt="" width="50" height="61" /></a>Normally you are not willing  to start services (especially when they are accessed from outher machines) with root privileges. Therefore we have to define new user and group which will be used to manage JBoss.  So next line will create new group and new user with this group.</p>
<pre class="brush: bash;">
 $ groupadd jboss
 $ useradd -s /bin/bash -d /home/jboss -m -g jboss jboss
</pre>
<p>This jboss user has no password, so nobody can login with this username. If you consider to  login with jboss user,  password has to be set. Use <em>passwd jboss</em> command for that.</p>
<h3>Download, Installation,  filesystem layout</h3>
<p>Now  download desired Jboss version. I started with JBoss 5.1.0 GA, which can be download with:</p>
<pre class="brush: bash;">
$ cd /tmp # swithch to temp dir
$ wget http://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.1.0.GA/jboss-5.1.0.GA.zip/download
</pre>
<p>Check also the whole <a href="http://labs.jboss.com/jbossas/downloads/" target="_blank">list of verisons</a> if interested. As you may noticed JBoss binaries are packaged with ZIP. So it is comfortable to use<em> unzip</em> tool. Maybe you have to install it first.</p>
<p>But before you extract  downloaded file, we have to decide, where exactly should JBoss files be placed on a  file-system. Unfortunately JBoss is not quite conform to Linux <a href="http://proton.pathname.com/fhs/pub/fhs-2.3.html" target="_blank">File System Hierarchy Standard</a> per default, so there are many possibilities for a location configuration. Some of you may want to place JBoss  into <em>/opt</em> directory. But I prefer to split the installation a little bit and  want to start by putting  JBoss core files in <em>/usr/local/,</em> where local, unchangeable and read-only files usually placed. E.g. I use  /usr/local/jboss/510 as JBoss 5.1.0 GA root.  So let&#8217;s create that location and extract files into it.</p>
<pre class="brush: bash;">
mkdir /usr/local/jboss #create new jboss directroy
chown jboss:jboss /usr/local/jboss #now its belongs touser jboss and group jboss
su jboss
mkdir /usr/local/jboss/510
cd /usr/local/jboss/510
unzip /tmp/jboss-5.1.0.GA.zip
</pre>
<p>At this moment you should have new working JBoss. If you want, test it with</p>
<pre class="brush: bash;">
bin/run.sh -b 0.0.0.0
</pre>
<p>Where<em> -b 0.0.0.0 </em>means that JBoss is listening for every ip address of current machine.</p>
<p>However at this stage the installed Jboss still brakes the  Linux Filesystem Hierarchy Standard, so let&#8217;s improve this situation.</p>
<p><span id="more-31"></span>After the first start of the server used configuration will have new directories <em>/tmp</em> and <em>/work</em> . The /tmp directory contain the temporarily state of the deployed applications and /work is contains compiled jsp pages of deployed applications. Therefore both directories are of temporal character and  should be on more appropriate place according to Linux standards.</p>
<p>I use only a default JBoss configuration,  which is defined under <em>&lt;jboss_root&gt;/server/default</em>, so I need to do further changes only for this configuration. My decision is to put both directories to /var /tmp/jboss.:</p>
<pre class="brush: bash;">
$ mkdir /var/tmp/jboss
$ chown jboss:jboss /var/tmp/jboss/
$ su jboss
$ mkdir /var/tmp/jboss/510
$ mkdir /var/tmp/jboss/510/tmp # creating alternavtive location for tmp
$ mkdir /var/tmp/jboss/510/work # creating alternavtive location for work
$ cd /usr/local/jboss/510/server/default # switch to configuration directory if not allready here.
$ rm -R tmp # delete existing tmp directory (server should not run at this moment)
$ rm -R work # delete existing work directory
$ ln -s /var/tmp/jboss/510/tmp ./tmp # Finaly create symbolic link to new place$
$ ln -s /var/tmp/jboss/510/work ./work # Finaly create symbolic link to new place
</pre>
<p>repeat the same for /log directory. It is common to have logs at one place in /var/log<br />
create a log directory tree e.g. /var/log/jboss/510/ and let log link to it as was shown for tmp and work directories.</p>
<p>After that your configuration directory should look like:</p>
<pre class="brush: bash;">
$ ls -l /usr/local/jboss/510/server/default
drwxr-xr-x  6 jboss jboss 4096 22. Mai 2009  conf
drwxr-xr-x  6 jboss jboss 4096 23. Jan 00:10 data
drwxr-xr-x 15 jboss jboss 4096 22. Mai 2009  deploy
drwxr-xr-x 12 jboss jboss 4096 22. Mai 2009  deployers
drwxr-xr-x  2 jboss jboss 4096 22. Mai 2009  lib
lrwxrwxrwx  1 jboss jboss   19 23. Jan 01:07 log -&gt; /var/log/jboss/510/
lrwxrwxrwx  1 jboss jboss   23 23. Jan 01:13 tmp -&gt; /var/tmp/jboss/510/tmp/
lrwxrwxrwx  1 jboss jboss   24 23. Jan 01:13 work -&gt; /var/tmp/jboss/510/work/
</pre>
<p>And your logs are of course accessible directly at new location e.g.</p>
<pre class="brush: bash;">
tail -1000f /var/log/jboss/510/server.log
</pre>
<p>Furthermore you should deploy your applications to /srv/jboss/510 to enable this location for automatically scan and deployment,just create a link from /default/deploy/. Call it e.g. applications.:</p>
<pre class="brush: bash;">
$ ln -s /srv/jboss/510 ./usr/local/jboss/510/server/default/deploy/applications #
</pre>
<p>So applications which are placed to /srv/jboss/510 will be automatically deployed on the server.</p>
<h3>Start JBoss on boot</h3>
<p>First of all you need a life-cycle management script used by <em>init</em>. Jboss already provides some of then.  Let&#8217;s use one of Red Hat default script by adopting it a little bit. First of all copy the script to common place (feel free to ad version ti scriptname if you need or like)</p>
<pre class="brush: bash;">
$ cp /usr/local/jboss/bin/jboss_init_redhat.sh /etc/init.d/jboss
</pre>
<p>If you want to access you fresh JBoss also from other IP addresses you need to change<br />
JBOSS_HOST line according to:</p>
<pre class="brush: bash;">
JBOSS_BIND_ADDR=${JBOSS_HOST:-&quot;-b 0.0.0.0&quot;}.
</pre>
<p>0.0.0.0. binds it on all IP addresses. Consider to change also other param this file to mach your personal needs. Now you can automatically create all the symbolic links used by <em>init</em> service.</p>
<pre class="brush: bash;">

$ update-rc.d jboss defaults
</pre>
<p>Now your Jboss will  start automatically after reboot&#8230;</p>
<h3>Additional configuration</h3>
<ul>
<li><em>&lt;jboss_root&gt;/bin/run.conf</em> file configures the start parameters of the server. Maybe default limits are not suitable for your applications. So check it.</li>
<li>Under <em>&lt;jboss_root&gt;/server/default/conf</em> you will find some configuration files of the default server configuration. One of the interesting is of course <em>jboss-lo4j.xml</em>, where you can precisely define logging processing.</li>
</ul>
<h3>Questions &amp; Suggestions</h3>
<p>Thank you for reading this. Please feel free to provide any suggestions to the topic of JBoss installation on Linux and specially on Debian. Of course your questions are welcome too!</p>



Share and Enjoy:


	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fjava-jboss-debian-linux%2F&amp;title=JBoss%205%20GA%20on%20Debian%20linux&amp;bodytext=This%20short%20tutorial%20describes%20how%20to%20configure%20JBoss%20Application%20Server%20%28Jboss%20GA%205.1.0%29%20on%20a%20debian%20linux%20%28Debian%20GNU%2FLinux%205.x%20%22Lenny%22%20%29.%20Article%20starts%20with%20installation%20of%20java%20JDK%20and%20continues%20with%20JBoss%20installation%20and%20basic%20configuration%20acc" title="Digg"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fjava-jboss-debian-linux%2F&amp;title=JBoss%205%20GA%20on%20Debian%20linux&amp;notes=This%20short%20tutorial%20describes%20how%20to%20configure%20JBoss%20Application%20Server%20%28Jboss%20GA%205.1.0%29%20on%20a%20debian%20linux%20%28Debian%20GNU%2FLinux%205.x%20%22Lenny%22%20%29.%20Article%20starts%20with%20installation%20of%20java%20JDK%20and%20continues%20with%20JBoss%20installation%20and%20basic%20configuration%20acc" title="del.icio.us"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fjava-jboss-debian-linux%2F&amp;t=JBoss%205%20GA%20on%20Debian%20linux" title="Facebook"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mixx.com/submit?page_url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fjava-jboss-debian-linux%2F&amp;title=JBoss%205%20GA%20on%20Debian%20linux" title="Mixx"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fjava-jboss-debian-linux%2F&amp;title=JBoss%205%20GA%20on%20Debian%20linux&amp;annotation=This%20short%20tutorial%20describes%20how%20to%20configure%20JBoss%20Application%20Server%20%28Jboss%20GA%205.1.0%29%20on%20a%20debian%20linux%20%28Debian%20GNU%2FLinux%205.x%20%22Lenny%22%20%29.%20Article%20starts%20with%20installation%20of%20java%20JDK%20and%20continues%20with%20JBoss%20installation%20and%20basic%20configuration%20acc" title="Google Bookmarks"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fjava-jboss-debian-linux%2F&amp;Title=JBoss%205%20GA%20on%20Debian%20linux" title="BlinkList"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/blinklist.png" title="BlinkList" alt="BlinkList" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mister-wong.de/addurl/?bm_url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fjava-jboss-debian-linux%2F&amp;bm_description=JBoss%205%20GA%20on%20Debian%20linux&amp;plugin=soc" title="MisterWong.DE"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong.DE" alt="MisterWong.DE" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://slashdot.org/bookmark.pl?title=JBoss%205%20GA%20on%20Debian%20linux&amp;url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fjava-jboss-debian-linux%2F" title="Slashdot"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fjava-jboss-debian-linux%2F&amp;title=JBoss%205%20GA%20on%20Debian%20linux" title="StumbleUpon"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fjava-jboss-debian-linux%2F" title="Technorati"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fjava-jboss-debian-linux%2F&amp;h=JBoss%205%20GA%20on%20Debian%20linux" title="NewsVine"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fjava-jboss-debian-linux%2F&amp;title=JBoss%205%20GA%20on%20Debian%20linux" title="Reddit"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://yigg.de/neu?exturl=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fjava-jboss-debian-linux%2F&amp;exttitle=JBoss%205%20GA%20on%20Debian%20linux" title="Yigg"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/yiggit.png" title="Yigg" alt="Yigg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fjava-jboss-debian-linux%2F&amp;t=JBoss%205%20GA%20on%20Debian%20linux" title="HackerNews"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fjava-jboss-debian-linux%2F&amp;title=JBoss%205%20GA%20on%20Debian%20linux&amp;source=Shuron%27s+Letters+Personal+blog+of+Alexander+Holbreich&amp;summary=This%20short%20tutorial%20describes%20how%20to%20configure%20JBoss%20Application%20Server%20%28Jboss%20GA%205.1.0%29%20on%20a%20debian%20linux%20%28Debian%20GNU%2FLinux%205.x%20%22Lenny%22%20%29.%20Article%20starts%20with%20installation%20of%20java%20JDK%20and%20continues%20with%20JBoss%20installation%20and%20basic%20configuration%20acc" title="LinkedIn"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.webnews.de/einstellen?url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fjava-jboss-debian-linux%2F&amp;title=JBoss%205%20GA%20on%20Debian%20linux" title="Webnews.de"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/webnews.png" title="Webnews.de" alt="Webnews.de" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fjava-jboss-debian-linux%2F&amp;submitHeadline=JBoss%205%20GA%20on%20Debian%20linux&amp;submitSummary=This%20short%20tutorial%20describes%20how%20to%20configure%20JBoss%20Application%20Server%20%28Jboss%20GA%205.1.0%29%20on%20a%20debian%20linux%20%28Debian%20GNU%2FLinux%205.x%20%22Lenny%22%20%29.%20Article%20starts%20with%20installation%20of%20java%20JDK%20and%20continues%20with%20JBoss%20installation%20and%20basic%20configuration%20acc&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://alexander.holbreich.org/2010/01/java-jboss-debian-linux/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Software RAID on Debian Linux</title>
		<link>http://alexander.holbreich.org/2010/01/software-raid-debian/</link>
		<comments>http://alexander.holbreich.org/2010/01/software-raid-debian/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 00:57:11 +0000</pubDate>
		<dc:creator>shuron</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[raid 1]]></category>
		<category><![CDATA[raid test]]></category>
		<category><![CDATA[software raid]]></category>

		<guid isPermaLink="false">http://alexander.holbreich.org/?p=423</guid>
		<description><![CDATA[Wow, my last post here is month ago. But don&#8217;t worry I did not forget about my blog. There are just many thing happened in my life, all of them are time consuming   So there no reason to remove me from your RSS reader. Today i will share some thought on software RAID [...]]]></description>
			<content:encoded><![CDATA[<p>Wow, my last post here is month ago. But don&#8217;t worry I did not forget about my blog. There are just many thing happened in my life, all of them are time consuming <img src='http://alexander.holbreich.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  So there no reason to remove me from your RSS reader. Today i will share some thought on software RAID under linux with you.</p>
<div class="wp-caption alignright" style="width: 216px"><img title="RAID 1" src="http://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/RAID_1.svg/325px-RAID_1.svg.png" alt="RAID 1" width="206" height="286" /><p class="wp-caption-text">RAID 1</p></div>
<p>Sometimes you need to store data relative save and high available. That is where RAID solutions come in to play. Especially RAID 1 (mirroring) based solutions provide better availability of your data. But don&#8217;t forget to use backs anyway <img src='http://alexander.holbreich.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Some days ago i installed RAID 1 on Debian Lenny (amd64 arch) without any troubles for now.<br />
I just was following <a href="http://dev.jerryweb.org/raid/">Jerry&#8217;s description</a> which is enough detailed to make no mistakes except maybe one thing.<br />
The Partitions used in the RAID /dev/md0/ should both enable boot flag if you want to boot from RAID.<br />
This is worked for me.</p>
<h2>Configuration</h2>
<p>My configuration is the same as Jerry&#8217;s except partition sizes and chosed LVM. So boot is done form RAID partition /dev/md0. And SWAP is on RAID too, which is controversy solution but it the best one for me, of course availability of a system is primary goal.</p>
<p>So how to check the state of raid after installation. The simplest is to look on /proc file-system with <em>$cat /proc/mdstat</em>. Here is my configuration.</p>
<pre class="brush: bash;">
$cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sda2[0] sdb2[1]
476560128 blocks [2/2] [UU]

md0 : active raid1 sda1[0] sdb1[1]
497856 blocks [2/2] [UU]

unused devices: &lt;none&gt;
</pre>
<p>Here you see two RAID arrays <em>md0</em> and<em> md1</em>. Also information about used devices and state are peresent. <em>[UU] </em>stand for &#8220;used&#8221; for every disc is used in a raid. On diskfailure you wold see something like <em>[U_] </em>and <em>sdb2(F)</em>.</p>
<p>Next example utilizes <strong>mdadm</strong> which is used by kernel in latest kernel versions. My is 2.6.26-2-amd64 (lenny default)<br />
Use of <em>&#8211;detail </em>or <em>-D</em> option with a device name gives more information. Here my example.</p>
<pre class="brush: bash;">
# mdadm --detail /dev/md1
/dev/md1:
Version : 00.90
Creation Time : Wed Jan  6 00:51:37 2010
Raid Level : raid1
Array Size : 476560128 (454.48 GiB 488.00 GB)
Used Dev Size : 476560128 (454.48 GiB 488.00 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 1
Persistence : Superblock is persistent

Update Time : Mon Jan 11 02:18:01 2010
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

UUID : fe3bbbfd:2c6963e7:9785a408:be715448
Events : 0.8

Number   Major   Minor   RaidDevice State
0       8        2        0      active sync   /dev/sda2
1       8       18        1      active sync   /dev/sdb2
</pre>
<p><span id="more-423"></span></p>
<h2>GRUB Config</h2>
<p>If you wish that your system is able to boot even if one of disks fails completely. You need to write  GRUB loader on every hard disk separately.</p>
<p>Here the example for hd0 ( fist hard disk)</p>
<pre class="brush: bash;">
$ grub
grub&gt; root (hd0,0)
Filesystem type is ext2fs, partition type 0xfd
grub&gt; setup (hd0)
setup (hd0)
Checking if &quot;/boot/grub/stage1&quot; exists... no
Checking if &quot;/grub/stage1&quot; exists... yes
Checking if &quot;/grub/stage2&quot; exists... yes
Checking if &quot;/grub/e2fs_stage1_5&quot; exists... yes
Running &quot;embed /grub/e2fs_stage1_5 (hd0)&quot;...  17 sectors are embedded.
succeeded
Running &quot;install /grub/stage1 (hd0) (hd0)1+17 p (hd0,0)/grub/stage2 /grub/menu.lst&quot;... succeeded
Done.
</pre>
<p>Run the same also for second disk.</p>
<pre class="brush: bash;">
grub&gt; root (hd1,0)
...
grub&gt; setup (hd1)
</pre>
<p>Also your GRUB configuration should enabe loading form the first and alternatively the second disk.</p>
<pre class="brush: bash;">
default 0
fallback  1
# is there after installation
title           Debian GNU/Linux, kernel 2.6.18-6-686 Raid (hd0)
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.18-6-686 root=/dev/md0 ro
initrd          /boot/initrd.img-2.6.18-6-686

# manually created
title           Debian GNU/Linux, kernel 2.6.18-6-686 Raid (hd1)
root            (hd1,0)
kernel          /boot/vmlinuz-2.6.18-6-686 root=/dev/md0 ro
initrd          /boot/initrd.img-2.6.18-6-686
</pre>
<p>The default option declares the first configuration to run on default. fallback option forces grub to load fallback configuration (here hd1)<br />
when the firt one could not start.</p>
<p>You&#8217;r done.</p>
<h2>Monitoring</h2>
<p>Once you run your &#8220;high&#8221;-available RAID you&#8217;re probably very interested to be informed about problems with it.<br />
E.g. on a failure of one (hope only one) HD device.</p>
<p>Yet i know only two most common solutions for monitoring Software RAID. First of it bases on <a href="http://www.nagios.org/" target="_blank">Nagios tool</a>, but is not described here, because not tired yet. The second is to involve mdadm again.</p>
<p>The  option <em>&#8211;monitor</em> causes mdadm periodically poll a your md arrays and to inform you on every events that occurs. mdadm should never exit process, so it should normally be run in the background.<br />
Here is example of sending a mail on event. Of course sendmail must be configured.</p>
<pre class="brush: bash;">
mdadm --monitor --mail=admin@yourcompany.com --scan --delay=1800 -ft
</pre>
<p>It would run a monitor deamon which scanns all of RAID arrays with delay. The option <em>f</em> starts it as deamon process and <em>t</em> option generates test messages on a startup.</p>
<p>When you want to run mdadm through crone job so use option <em>-1</em></p>
<pre class="brush: bash;">
mdadm --monitor--scan -1
</pre>
<p>Also this would send your mail or run program which are specified in /etc/mdadm.conf file.<br />
Please see <a href="http://linux.die.net/man/8/mdadm" target="_blank">manual of mdadm</a> for more details.</p>
<h2>Test Performance</h2>
<p>You can test our physical drives with hdparm utility e.g.</p>
<pre class="brush: bash;">
hdparm -tT /dev/hda
</pre>
<p>But hdparm would not correct work on your <em>mdX</em> RAID arrays.</p>
<p>So one of the simplest methods is to try <em>time</em> utility.</p>
<pre class="brush: bash;">
time dd if=/dev/md0 of=/dev/null bs=1024k count=1000
</pre>
<p>This test reads 1 GB data file from you RAID Array but reports to copy only something like &#8220;509804544 Bytes (510 MB) in 5,73989 s, 88,8 MB/s&#8221; by me. So why only half of the Gigabyte? Just be cause it utilizes two devices, as i think, and indeed it copies 500MB two times parallel = 1 Gig. And this only in the half of time as it needed to red 1 Gigabyte from physical <em>/dev/sda </em>directly.</p>
<pre class="brush: bash;">
time dd if=/dev/zero bs=1024k count=1000 of=/home/1Gb.file
</pre>
<p>This test writes 1 Gb file on RAID partition <em>/home</em> . Therefore you can compare write performance with RAID and non raid partitions but don&#8217;t expect any considerable advantages on Mirroring systems <img src='http://alexander.holbreich.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The last one more professional but also complex tools is <a href="http://www.iozone.org/">iozone</a>. It can perform a various of tests,which can&#8217;t be explained here detailed.<br />
Please read manual if you really need to test your raid that way. Alternatively you can start <em>iozone</em> in automatic mode, which performs various of tests (relative long-running) and prints on console.</p>
<pre class="brush: bash;">
iozone -a
</pre>
<p>See on <em>Strided Read</em> column which should consider software RAID bonus.</p>
<h2>Failure and Recovery</h2>
<p>RAID 1 should preserve you from data loose and improve your scalability. So it  is very good idea to has relative good knowledge of what to do on Failure. Best way to get this knowledge is to simulate failure. Take try to remove one disk and put it again into array.</p>



Share and Enjoy:


	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fsoftware-raid-debian%2F&amp;title=Software%20RAID%20on%20Debian%20Linux&amp;bodytext=Wow%2C%20my%20last%20post%20here%20is%20month%20ago.%20But%20don%27t%20worry%20I%20did%20not%20forget%20about%20my%20blog.%20There%20are%20just%20many%20thing%20happened%20in%20my%20life%2C%20all%20of%20them%20are%20time%20consuming%20%3A%29%20So%20there%20no%20reason%20to%20remove%20me%20from%20your%20RSS%20reader.%20Today%20i%20will%20share%20some%20though" title="Digg"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fsoftware-raid-debian%2F&amp;title=Software%20RAID%20on%20Debian%20Linux&amp;notes=Wow%2C%20my%20last%20post%20here%20is%20month%20ago.%20But%20don%27t%20worry%20I%20did%20not%20forget%20about%20my%20blog.%20There%20are%20just%20many%20thing%20happened%20in%20my%20life%2C%20all%20of%20them%20are%20time%20consuming%20%3A%29%20So%20there%20no%20reason%20to%20remove%20me%20from%20your%20RSS%20reader.%20Today%20i%20will%20share%20some%20though" title="del.icio.us"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fsoftware-raid-debian%2F&amp;t=Software%20RAID%20on%20Debian%20Linux" title="Facebook"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mixx.com/submit?page_url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fsoftware-raid-debian%2F&amp;title=Software%20RAID%20on%20Debian%20Linux" title="Mixx"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fsoftware-raid-debian%2F&amp;title=Software%20RAID%20on%20Debian%20Linux&amp;annotation=Wow%2C%20my%20last%20post%20here%20is%20month%20ago.%20But%20don%27t%20worry%20I%20did%20not%20forget%20about%20my%20blog.%20There%20are%20just%20many%20thing%20happened%20in%20my%20life%2C%20all%20of%20them%20are%20time%20consuming%20%3A%29%20So%20there%20no%20reason%20to%20remove%20me%20from%20your%20RSS%20reader.%20Today%20i%20will%20share%20some%20though" title="Google Bookmarks"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fsoftware-raid-debian%2F&amp;Title=Software%20RAID%20on%20Debian%20Linux" title="BlinkList"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/blinklist.png" title="BlinkList" alt="BlinkList" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mister-wong.de/addurl/?bm_url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fsoftware-raid-debian%2F&amp;bm_description=Software%20RAID%20on%20Debian%20Linux&amp;plugin=soc" title="MisterWong.DE"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong.DE" alt="MisterWong.DE" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://slashdot.org/bookmark.pl?title=Software%20RAID%20on%20Debian%20Linux&amp;url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fsoftware-raid-debian%2F" title="Slashdot"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fsoftware-raid-debian%2F&amp;title=Software%20RAID%20on%20Debian%20Linux" title="StumbleUpon"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fsoftware-raid-debian%2F" title="Technorati"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fsoftware-raid-debian%2F&amp;h=Software%20RAID%20on%20Debian%20Linux" title="NewsVine"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fsoftware-raid-debian%2F&amp;title=Software%20RAID%20on%20Debian%20Linux" title="Reddit"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://yigg.de/neu?exturl=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fsoftware-raid-debian%2F&amp;exttitle=Software%20RAID%20on%20Debian%20Linux" title="Yigg"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/yiggit.png" title="Yigg" alt="Yigg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fsoftware-raid-debian%2F&amp;t=Software%20RAID%20on%20Debian%20Linux" title="HackerNews"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fsoftware-raid-debian%2F&amp;title=Software%20RAID%20on%20Debian%20Linux&amp;source=Shuron%27s+Letters+Personal+blog+of+Alexander+Holbreich&amp;summary=Wow%2C%20my%20last%20post%20here%20is%20month%20ago.%20But%20don%27t%20worry%20I%20did%20not%20forget%20about%20my%20blog.%20There%20are%20just%20many%20thing%20happened%20in%20my%20life%2C%20all%20of%20them%20are%20time%20consuming%20%3A%29%20So%20there%20no%20reason%20to%20remove%20me%20from%20your%20RSS%20reader.%20Today%20i%20will%20share%20some%20though" title="LinkedIn"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.webnews.de/einstellen?url=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fsoftware-raid-debian%2F&amp;title=Software%20RAID%20on%20Debian%20Linux" title="Webnews.de"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/webnews.png" title="Webnews.de" alt="Webnews.de" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Falexander.holbreich.org%2F2010%2F01%2Fsoftware-raid-debian%2F&amp;submitHeadline=Software%20RAID%20on%20Debian%20Linux&amp;submitSummary=Wow%2C%20my%20last%20post%20here%20is%20month%20ago.%20But%20don%27t%20worry%20I%20did%20not%20forget%20about%20my%20blog.%20There%20are%20just%20many%20thing%20happened%20in%20my%20life%2C%20all%20of%20them%20are%20time%20consuming%20%3A%29%20So%20there%20no%20reason%20to%20remove%20me%20from%20your%20RSS%20reader.%20Today%20i%20will%20share%20some%20though&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://alexander.holbreich.org/2010/01/software-raid-debian/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Extracting tar, gzip, bzip2, z</title>
		<link>http://alexander.holbreich.org/2009/02/tar-gzip/</link>
		<comments>http://alexander.holbreich.org/2009/02/tar-gzip/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 21:02:16 +0000</pubDate>
		<dc:creator>shuron</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[off topic]]></category>
		<category><![CDATA[archive]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tar]]></category>
		<category><![CDATA[untar]]></category>
		<category><![CDATA[zcat]]></category>
		<category><![CDATA[zip]]></category>

		<guid isPermaLink="false">http://alexander.holbreich.org/?p=387</guid>
		<description><![CDATA[ Sometimes you need to extract some files on Linux console. Here  some examples how to do that.
tar
Tar archives are the most common way of distributing bundles of files under Linux or UNIX. A .tar file is simply a bundle of files packaged with GNU tar program. To extract such files use following:

tar xf somearchive.tar
tar [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-388" title="tar-gzip" src="http://alexander.holbreich.org/wp-content/uploads/2009/02/tar-gzip.gif" alt="tar-gzip" width="80" height="80" /> Sometimes you need to extract some files on Linux console. Here  some examples how to do that.</p>
<h2>tar</h2>
<p>Tar archives are the most common way of distributing bundles of files under Linux or UNIX. A <strong><em>.tar</em></strong> file is simply a bundle of files packaged with GNU tar program. To extract such files use following:</p>
<pre class="brush: bash;">
tar xf somearchive.tar
tar xvf somearchive.tar
</pre>
<ul>
<li>Provide <em>option f</em> if you want to extract content of files. <em>Tar</em> (from <strong>t</strong>ape <strong>ar</strong>chive) has long history and was intended to work with tape media, so when you omit <em>f </em>tar tries to work with tape device.</li>
<li><em>v</em>- stands for verbose. List all the files by extract process.</li>
<li><em>x</em>- Extract command</li>
</ul>
<p>Before extracting you may be interested in Looking inside of tar. Do it with option <em>&#8220;t</em><em>&#8221; </em>:</p>
<pre class="brush: bash;">
tar tf archive.tar
</pre>
<p>For more tar parameters see <a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?tar" target="_blank">Man pages</a>.</p>
<h2>gzip</h2>
<p>Often tar-files are also compressed. One of the most known compressed formats is GNU Zip (gzip).  Tar bundeld and zipped file would  normally  have extension <em><strong>.tar.gz</strong></em>. To extract such files you can use tar with  &#8220;<em>z</em>&#8221; option, which causes tar to automatically invoke gzip. Modify abow example  and you get able to extract tar.gz  files too.</p>
<pre class="brush: bash;">
tar -xzf somearchive.tar.gz
</pre>
<p>In old tar version the &#8220;z&#8221; option is may be not available. In that case just use UNIX pipes:</p>
<pre class="brush: bash;">
gzip -dc target.tar.gz | tar xf -
</pre>
<p>Meaning of gzip options</p>
<ul>
<li>d &#8211; Do decompress!</li>
<li>c &#8211; write to console (So that tar can take it from there )</li>
<li>t &#8211; Tests file integrity</li>
<li>l &#8211; lists archive file information</li>
</ul>
<p>You will find more on <a href="http://persephone.cps.unizar.es/~spd/gzip/gzip_man.html" target="_blank">Man pages.</a></p>
<h2>bzip2</h2>
<p>Sometimes you can find files ending with <strong>.tar.bz2</strong>. That are files packaged with bzip (a block-sorting file compressor). Use it like gzip</p>
<pre class="brush: bash;">
tar xjvf filename.tar.bz2
</pre>
<p>Options d,c,t have the same meaning. More on <a href="http://www.edenwaith.com/support/guitar/help/man/bzip2.html" target="_blank">Man pages</a>.</p>
<h2>zcat</h2>
<p>Some files have .tar.Z endings. They can be extracted by</p>
<pre class="brush: bash;">
zcat somearchive.tar.Z | tar xf -
</pre>
<p>Look in <a href="http://cis.kutztown.edu/~frye/cgi-bin/unixManPages.cgi?zcat+1" target="_blank">Man pages</a> for more.</p>
<p>Any questions? You are welcome to comment!</p>



Share and Enjoy:


	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Falexander.holbreich.org%2F2009%2F02%2Ftar-gzip%2F&amp;title=Extracting%20tar%2C%20gzip%2C%20bzip2%2C%20z&amp;bodytext=%20Sometimes%20you%20need%20to%20extract%20some%20files%20on%20Linux%20console.%20Here%C2%A0%20some%20examples%20how%20to%20do%20that.%0D%0Atar%0D%0ATar%20archives%20are%20the%20most%20common%20way%20of%20distributing%20bundles%20of%20files%20under%20Linux%20or%20UNIX.%20A%20.tar%20file%20is%20simply%20a%20bundle%20of%20files%20packaged%20with%20GN" title="Digg"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Falexander.holbreich.org%2F2009%2F02%2Ftar-gzip%2F&amp;title=Extracting%20tar%2C%20gzip%2C%20bzip2%2C%20z&amp;notes=%20Sometimes%20you%20need%20to%20extract%20some%20files%20on%20Linux%20console.%20Here%C2%A0%20some%20examples%20how%20to%20do%20that.%0D%0Atar%0D%0ATar%20archives%20are%20the%20most%20common%20way%20of%20distributing%20bundles%20of%20files%20under%20Linux%20or%20UNIX.%20A%20.tar%20file%20is%20simply%20a%20bundle%20of%20files%20packaged%20with%20GN" title="del.icio.us"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Falexander.holbreich.org%2F2009%2F02%2Ftar-gzip%2F&amp;t=Extracting%20tar%2C%20gzip%2C%20bzip2%2C%20z" title="Facebook"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mixx.com/submit?page_url=http%3A%2F%2Falexander.holbreich.org%2F2009%2F02%2Ftar-gzip%2F&amp;title=Extracting%20tar%2C%20gzip%2C%20bzip2%2C%20z" title="Mixx"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Falexander.holbreich.org%2F2009%2F02%2Ftar-gzip%2F&amp;title=Extracting%20tar%2C%20gzip%2C%20bzip2%2C%20z&amp;annotation=%20Sometimes%20you%20need%20to%20extract%20some%20files%20on%20Linux%20console.%20Here%C2%A0%20some%20examples%20how%20to%20do%20that.%0D%0Atar%0D%0ATar%20archives%20are%20the%20most%20common%20way%20of%20distributing%20bundles%20of%20files%20under%20Linux%20or%20UNIX.%20A%20.tar%20file%20is%20simply%20a%20bundle%20of%20files%20packaged%20with%20GN" title="Google Bookmarks"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Falexander.holbreich.org%2F2009%2F02%2Ftar-gzip%2F&amp;Title=Extracting%20tar%2C%20gzip%2C%20bzip2%2C%20z" title="BlinkList"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/blinklist.png" title="BlinkList" alt="BlinkList" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mister-wong.de/addurl/?bm_url=http%3A%2F%2Falexander.holbreich.org%2F2009%2F02%2Ftar-gzip%2F&amp;bm_description=Extracting%20tar%2C%20gzip%2C%20bzip2%2C%20z&amp;plugin=soc" title="MisterWong.DE"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong.DE" alt="MisterWong.DE" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://slashdot.org/bookmark.pl?title=Extracting%20tar%2C%20gzip%2C%20bzip2%2C%20z&amp;url=http%3A%2F%2Falexander.holbreich.org%2F2009%2F02%2Ftar-gzip%2F" title="Slashdot"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Falexander.holbreich.org%2F2009%2F02%2Ftar-gzip%2F&amp;title=Extracting%20tar%2C%20gzip%2C%20bzip2%2C%20z" title="StumbleUpon"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Falexander.holbreich.org%2F2009%2F02%2Ftar-gzip%2F" title="Technorati"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Falexander.holbreich.org%2F2009%2F02%2Ftar-gzip%2F&amp;h=Extracting%20tar%2C%20gzip%2C%20bzip2%2C%20z" title="NewsVine"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Falexander.holbreich.org%2F2009%2F02%2Ftar-gzip%2F&amp;title=Extracting%20tar%2C%20gzip%2C%20bzip2%2C%20z" title="Reddit"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://yigg.de/neu?exturl=http%3A%2F%2Falexander.holbreich.org%2F2009%2F02%2Ftar-gzip%2F&amp;exttitle=Extracting%20tar%2C%20gzip%2C%20bzip2%2C%20z" title="Yigg"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/yiggit.png" title="Yigg" alt="Yigg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Falexander.holbreich.org%2F2009%2F02%2Ftar-gzip%2F&amp;t=Extracting%20tar%2C%20gzip%2C%20bzip2%2C%20z" title="HackerNews"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Falexander.holbreich.org%2F2009%2F02%2Ftar-gzip%2F&amp;title=Extracting%20tar%2C%20gzip%2C%20bzip2%2C%20z&amp;source=Shuron%27s+Letters+Personal+blog+of+Alexander+Holbreich&amp;summary=%20Sometimes%20you%20need%20to%20extract%20some%20files%20on%20Linux%20console.%20Here%C2%A0%20some%20examples%20how%20to%20do%20that.%0D%0Atar%0D%0ATar%20archives%20are%20the%20most%20common%20way%20of%20distributing%20bundles%20of%20files%20under%20Linux%20or%20UNIX.%20A%20.tar%20file%20is%20simply%20a%20bundle%20of%20files%20packaged%20with%20GN" title="LinkedIn"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.webnews.de/einstellen?url=http%3A%2F%2Falexander.holbreich.org%2F2009%2F02%2Ftar-gzip%2F&amp;title=Extracting%20tar%2C%20gzip%2C%20bzip2%2C%20z" title="Webnews.de"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/webnews.png" title="Webnews.de" alt="Webnews.de" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Falexander.holbreich.org%2F2009%2F02%2Ftar-gzip%2F&amp;submitHeadline=Extracting%20tar%2C%20gzip%2C%20bzip2%2C%20z&amp;submitSummary=%20Sometimes%20you%20need%20to%20extract%20some%20files%20on%20Linux%20console.%20Here%C2%A0%20some%20examples%20how%20to%20do%20that.%0D%0Atar%0D%0ATar%20archives%20are%20the%20most%20common%20way%20of%20distributing%20bundles%20of%20files%20under%20Linux%20or%20UNIX.%20A%20.tar%20file%20is%20simply%20a%20bundle%20of%20files%20packaged%20with%20GN&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://alexander.holbreich.org/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://alexander.holbreich.org/2009/02/tar-gzip/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
