<?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>LongSpine.com &#187; debian</title>
	<atom:link href="http://longspine.com/tag/debian/feed/" rel="self" type="application/rss+xml" />
	<link>http://longspine.com</link>
	<description>Yes, we are lazy.</description>
	<lastBuildDate>Wed, 18 Jan 2012 01:17:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Trac Served by Lighttpd on Debian Lenny</title>
		<link>http://longspine.com/how-to/trac-served-by-lighttpd-on-debian-lenny/</link>
		<comments>http://longspine.com/how-to/trac-served-by-lighttpd-on-debian-lenny/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 10:49:58 +0000</pubDate>
		<dc:creator>poomk</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://longspine.com/?p=231</guid>
		<description><![CDATA[Last week I found a very nice Trac+Lighttpd tutorial at landschoff.net. It was comprehensive and practical, however, I found that the configuration part does not fit my demand. Generally, Trac is installed for each project we need to put online. Sadly though, programmers are low-paid, so one domain name may contain more than one projects. [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I found a very nice Trac+Lighttpd tutorial at <a href="http://www.landschoff.net/blog/2009/01/trac-hosted-on-debian-unstable-lighty/">landschoff.net</a>. It was comprehensive and practical, however, I found that the configuration part does not fit my demand.</p>
<p>Generally, Trac is installed for each project we need to put online. Sadly though, programmers are low-paid, so one domain name may contain more than one projects. That&#8217;s why I needed more detailed on Trac configuration.</p>
<p>Despite the facts that Trac has very confusing manual, I found that the<a href="http://trac.edgewall.org/wiki/TracFastCgi"> FastCGI section</a> is pretty clear, step-by-step.</p>
<p>Conclusion: If you&#8217;re looking for a guide about Trac+Lighttpd configuration, I&#8217;d recommend the <a href="http://www.landschoff.net/blog/2009/01/trac-hosted-on-debian-unstable-lighty/">landschoff.net version</a>, and if you need more detailed configuration guide, just follow the <a href="http://trac.edgewall.org/wiki/TracFastCgi">standard manual</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://longspine.com/how-to/trac-served-by-lighttpd-on-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Lighttpd and Subversion on Debian Lenny</title>
		<link>http://longspine.com/how-to/install-lighttpd-and-subversion-on-debian-lenny/</link>
		<comments>http://longspine.com/how-to/install-lighttpd-and-subversion-on-debian-lenny/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 16:15:13 +0000</pubDate>
		<dc:creator>poomk</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svnserve]]></category>

		<guid isPermaLink="false">http://longspine.com/?p=50</guid>
		<description><![CDATA[Introduction This article is a step-by-step guide for installing Lighttpd (pronounced lighty) and Subversion on Debian Lenny. My previous setup was Subversion with Apache, however Apache was too heavy for my virtual private server so I had to move to Lighttpd. Most resources from the previous article are used in this article as well. Sadly, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>This article is a step-by-step guide for installing Lighttpd (pronounced lighty) and Subversion on Debian Lenny.<br />
My previous setup was Subversion with Apache, however Apache was too heavy for my virtual private server so I had to move to Lighttpd. Most resources from the previous article are used in this article as well.</p>
<p>Sadly, however, there is no mod_svn for Lighttpd, and it will not be implemented in the near future. <a href="http://forum.lighttpd.net/topic/59#6369">This</a> is one of the good reasons why not.</p>
<p>The most common solution is to use mod_proxy and forward the command to Apache with the module dav_svn, but it doesn&#8217;t make sense to run Apache in parallel with Lighttpd if we tried to avoid using Apache since the beginning.</p>
<p>My solution was to use <strong>svnserve</strong>, which is the default server for svn and has a relatively better performance than WebDAV on Apache. The operations of lighttpd and svnserve are totally decoupled, which means we <strong>do not</strong> need to configure Lighttpd for svnserve and vice versa.</p>
<p>If you prefer using Apache than svnserve, as many people did, use this <a href="http://redmine.lighttpd.net/wiki/lighttpd/ApacheSubversionRecipe">very simple guide</a>.</p>
<p>Otherwise, please follow the following steps:</p>
<p><strong>Install and Configure Lighttpd</strong></p>
<p>Install the package from <em>aptitude</em>:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> lighttpd</div></div>
<p>Edit the config file:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>lighttpd<span style="color: #000000; font-weight: bold;">/</span>lighttpd.conf</div></div>
<p>Change the default document root by editing <em>server.document-root</em>:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">server.document-root = <span style="color: #ff0000;">&quot;/var/www/example1.com/&quot;</span></div></div>
<p>Where <em>example1.com</em> is the directory where you default website is located.</p>
<p>If you need to create a virtual host, add the following virtual host at the end of the file (otherwise skip this step):</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">$HTTP</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #ff0000;">&quot;host&quot;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> == <span style="color: #ff0000;">&quot;(^|\.)example2\.com&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
server.document-root = <span style="color: #ff0000;">&quot;/var/www/example2.com/&quot;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span></div></div>
<p>Don&#8217;t forget to change <em>example2.com</em> to your own directory.</p>
<p>Noted that Lighttpd has a module called <em>simple-vhost</em>, however, it&#8217;s not the robust choice and I don&#8217;t recommend it.</p>
<p>Now save the file and reload Lightty by:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>lighttpd force-reload</div></div>
<p>Try accessing the website by using your browsers. The default location is at <em>/var/www/example1.com/</em>, but if you enter your website with the name <em>example2.com</em> you&#8217;ll be redirected to your virtual host at <em>/var/www/example2.com/</em> instead (this requires a DNS).</p>
<p><strong>Install and Configure Subversion</strong></p>
<p>Install subversion from <em>aptitude</em>:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> subversion</div></div>
<p>A new subversion user group should be created. This can be done by creating a new user called <em>svn</em> and and the existing users to this group, as follows:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> useradd <span style="color: #c20cb9; font-weight: bold;">svn</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> usermod <span style="color: #660033;">-a</span> <span style="color: #660033;">-G</span> <span style="color: #c20cb9; font-weight: bold;">svn</span> user1</div></div>
<p>Where <em>user1</em> is an existing user that is added to the group <em>svn</em>.</p>
<p>Set a new password for the user <em>svn</em>:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">passwd</span> <span style="color: #c20cb9; font-weight: bold;">svn</span></div></div>
<p>Create a new directory for repositories, and create a new repository for testing:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">svnadmin</span> create <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> svn:svn <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span></div></div>
<p>This will create a new directory called <em>/var/svn</em> which contains a new testing repository <em>test</em>.</p>
<p>Don&#8217;t forget to change the permission for all users in the group <em>svn</em> for the test project:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> g+<span style="color: #c20cb9; font-weight: bold;">w</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span></div></div>
<p>Test the setting by usinf the <em>file</em> protocol:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">svn co</span> file:<span style="color: #000000; font-weight: bold;">///</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span></div></div>
<p>This will check out our test project to <em>/tmp/test</em>. You should get an output like &#8220;Checked out revision 0&#8243;.</p>
<p><strong>Using svnserve</strong></p>
<p>Now, assuming that you need some level of security for your code, which will be transmitted through the Internet or LAN, we have to enable ssh tunneling for svnserve. The good news is that you can use the protocol svn+ssh, by default. This will make a ssh connection to you server, run svnserver, and stop svnserver after the command is executed. This is an example:</p>
<p>(on the client side)</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">svn list</span> <span style="color: #c20cb9; font-weight: bold;">svn</span>+ssh:<span style="color: #000000; font-weight: bold;">//</span>example.com<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span></div></div>
<p>This command will list the subversion project at the location <em>/var/svn/test</em> of the server <em>example.com</em>. If you want to specify the username, just add the username and @ before the hostname as in this example:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">svn list</span> <span style="color: #c20cb9; font-weight: bold;">svn</span>+ssh:<span style="color: #000000; font-weight: bold;">//</span>user1<span style="color: #000000; font-weight: bold;">@</span>example.com<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span></div></div>
<p>Don&#8217;t forget to change <em>user1</em>, <em>example.com</em>, and <em>/var/svn/test</em> to your own setting.</p>
<p>If SSH key authentication was not set, you will be asked for your password <strong>twice</strong>. If you feel annoyed by this strange design, set the  public key authentication up. If you don&#8217;t know how to do it, I found <a href="http://www.petefreitag.com/item/532.cfm">this</a> a nice and simple guide for beginners.</p>
<p><strong>Other port than 22?</strong></p>
<p>If, for a security reason, your ssh server doesn&#8217;t run on port 22, you need to edit <em>/etc/subvesion/config</em> in the client side (assuming you client also uses Debian Lenny):</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>subversion<span style="color: #000000; font-weight: bold;">/</span>config</div></div>
<p>Now in the <em>[tunnel]</em> section add the following line:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ssh2222 = <span style="color: #007800;">$SVN_SSH_2222</span> <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-p</span> <span style="color: #000000;">2222</span> <span style="color: #660033;">-o</span> <span style="color: #007800;">ControlMaster</span>=no</div></div>
<p>This will use ssh tunneling on port 2222 instead of the default port 22. You can change the port to you own setting and also change <em>ssh2222</em> and <em>SVN_SSH_2222</em> to the name you prefer. ControlMaster option must be turned off, according to the default configuration file.</p>
<p>On the client side you can list the repository by using the command:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">svn list</span> <span style="color: #c20cb9; font-weight: bold;">svn</span>+ssh2222:<span style="color: #000000; font-weight: bold;">//</span>user1<span style="color: #000000; font-weight: bold;">@</span>example.com<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span></div></div>
<p>Good luck. Your comments are always appreciated.</p>
]]></content:encoded>
			<wfw:commentRss>http://longspine.com/how-to/install-lighttpd-and-subversion-on-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opera 10 with Qt4 on Debian Lenny</title>
		<link>http://longspine.com/how-to/opera-10-with-qt4-on-debian-lenny/</link>
		<comments>http://longspine.com/how-to/opera-10-with-qt4-on-debian-lenny/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 23:55:03 +0000</pubDate>
		<dc:creator>poomk</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[qt]]></category>

		<guid isPermaLink="false">http://longspine.com/?p=63</guid>
		<description><![CDATA[Opera uses Qt3 interface by default. I didn&#8217;t find it disturbing, just until when I installed Opera 10 on my workstation today. It seems like there&#8217;s some kind of bugs or problems with the configuration file, which makes the interface looks really ugly and runs incredibly slow. My solution was to install the Qt4 version [...]]]></description>
			<content:encoded><![CDATA[<p>Opera uses Qt3 interface by default. I didn&#8217;t find it disturbing, just until when I installed Opera 10 on my workstation today. It seems like there&#8217;s some kind of bugs or problems with the configuration file, which makes the interface looks really ugly and runs incredibly slow.</p>
<p>My solution was to install the Qt4 version of Opera, and here is a simple step-by-step guide:</p>
<p><strong>Download Opera</strong></p>
<p>Look for the newest version of Opera on it&#8217;s <a href="http://ftp.opera.com/pub/opera/linux/">FTP archive</a>. If you have no clues which version you should download, you probably need <a href="http://ftp.opera.com/pub/opera/linux/1000/final/en/i386/opera_10.00.4585.gcc4.qt4_i386.deb">this version</a>.</p>
<p><strong>Install Opera</strong></p>
<p>First you need to remove the previous version of opera, if you have one.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> remove opera</div></div>
<p>Now go to the directory where you downloaded your opera and install it using dpkg.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-i</span> opera_10.00.4585.gcc4.qt4_i386.deb</div></div>
<p>Change <em>opera_10.00.4585.gcc4.qt4_i386.deb</em> to the name of the file you downloaded.</p>
<p>If it asks for the replacement of the configuration, simply say no since you don&#8217;t want to set everything up again. But if it doesn&#8217;t work try to reinstall it and now have the configuration file replaced as well.</p>
<p>That&#8217;s all. This could be the easiest how-to I&#8217;ve ever written in my life though.</p>
]]></content:encoded>
			<wfw:commentRss>http://longspine.com/how-to/opera-10-with-qt4-on-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Apache/Subversion on Debian Lenny and Migrate the Repositories</title>
		<link>http://longspine.com/how-to/install-apachesubversion-on-debian-lenny-and-migrate-the-repositories/</link>
		<comments>http://longspine.com/how-to/install-apachesubversion-on-debian-lenny-and-migrate-the-repositories/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 22:39:20 +0000</pubDate>
		<dc:creator>poomk</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://longspine.com/?p=32</guid>
		<description><![CDATA[Install Subversion/Apache sudo aptitude install subversion apache2 libapache2-svn Subversion Configuration Create subversion repositories: sudo mkdir /var/svn sudo chown -R www-data:www-data /var/svn All our subversion repositories should be located in /var/svn in order to be visible to Apache (you can change /var/svn to any directory). SSL (Secure Sockets Layer) The following steps are required if you [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Install Subversion/Apache</strong></p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> subversion apache2 libapache2-svn</div></div>
<p><strong>Subversion Configuration</strong></p>
<p>Create subversion repositories:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www-data:www-data <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span></div></div>
<p>All our subversion repositories should be located in /var/svn in order to be visible to Apache (you can change /var/svn to any directory).</p>
<p><strong>SSL (Secure Sockets Layer)</strong></p>
<p>The following steps are required if you need SSL, otherwise skip this chapter.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> openssl ssl-cert<br />
a2enmod ssl</div></div>
<p>&#8220;Listen 443&#8243; should already exist in /etc/apache2/ports.conf, otherwise add it manually:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>ports.conf</div></div>
<p>Create a new SSL config file (replace ssl.new.site with your preferred name):</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites-available<span style="color: #000000; font-weight: bold;">/</span>default <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites-available<span style="color: #000000; font-weight: bold;">/</span>ssl.new.site</div></div>
<p>Edit the file:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites-available<span style="color: #000000; font-weight: bold;">/</span>ssl.new.site</div></div>
<p>Replace:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;</span>VirtualHost <span style="color: #000000; font-weight: bold;">*</span>:<span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">&gt;</span></div></div>
<p>with</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;</span>VirtualHost <span style="color: #000000; font-weight: bold;">*</span>:<span style="color: #000000;">443</span><span style="color: #000000; font-weight: bold;">&gt;</span></div></div>
<p>Before &lt;/VirtualHost&gt;, add:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SSLEngine on<br />
SSLCertificateFile <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #000000; font-weight: bold;">/</span>ssl.new.site.pem</div></div>
<p>You can try using the template from &#8220;default-ssl&#8221; instead of &#8220;default&#8221;, which is easier and more reliable since many SSL-related configurations are already handled. However, I haven&#8217;t tried this method and I&#8217;m not sure if it works without modifications.</p>
<p>Create SSL certificate file:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>ssl<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> make-ssl-cert <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>ssl-cert<span style="color: #000000; font-weight: bold;">/</span>ssleay.cnf <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #000000; font-weight: bold;">/</span>ssl.new.site.pem</div></div>
<p>Enable the new site:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> a2ensite ssl.new.site<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 reload</div></div>
<p>To see if the setup works, use your web browser to visit:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">https:<span style="color: #000000; font-weight: bold;">//</span>server.ip<span style="color: #000000; font-weight: bold;">/</span></div></div>
<p>Replace server.ip with the ip of your server.<br />
There should be a pop-up or an alert about the new certificate.</p>
<p><strong>DAV_SVN Configuration</strong></p>
<p>Edit /etc/apache2/mods-available/dav_svn.conf and follow the guidline:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>mods-available<span style="color: #000000; font-weight: bold;">/</span>dav_svn.conf</div></div>
<p>Normally it looks like this:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;</span>Location <span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span><span style="color: #000000; font-weight: bold;">&gt;</span><br />
DAV <span style="color: #c20cb9; font-weight: bold;">svn</span><br />
SVNParentPath <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span><br />
<br />
AuthType Basic<br />
AuthName <span style="color: #ff0000;">&quot;Subversion Repository&quot;</span><br />
AuthUserFile <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>dav_svn.passwd<br />
<br />
Require valid-user<br />
SSLRequireSSL &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># this line must be added if you want SSL enabled</span><br />
<br />
<span style="color: #000000; font-weight: bold;">&lt;/</span>Location<span style="color: #000000; font-weight: bold;">&gt;</span></div></div>
<p>Don&#8217;t forget to change /var/svn to your svn directory (thanks, D@vid).</p>
<p>Enable the mod and restart:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> a2enmod dav_svn<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</div></div>
<p>Create a user account for dav_svn:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> htpasswd <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>dav_svn.passwd user1</div></div>
<p>To add more users, use:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> htpasswd <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>dav_svn.passwd user2</div></div>
<p><strong>Subversion Testing</strong></p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">svnadmin</span> create <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www-data:www-data <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span><br />
<br />
<span style="color: #c20cb9; font-weight: bold;">svn co</span> https:<span style="color: #000000; font-weight: bold;">//</span>new.site<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span></div></div>
<p>It should says &#8220;Checked out revision 0.&#8221;, otherwise try looking for the errors on the Internet.<br />
You probably forgot some steps or I forgot to mention some details.</p>
<p><strong>Migration</strong></p>
<p>Skip this chapter if you don&#8217;t need to migrate you data from your old server.</p>
<p>On the old server, we need to dump all updates into a single file. Each repository must be done separately.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> svndump<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> svndump<br />
<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">svnadmin</span> dump <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>repository <span style="color: #000000; font-weight: bold;">&gt;</span> .<span style="color: #000000; font-weight: bold;">/</span>repository.dump<br />
<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> ..<br />
<span style="color: #c20cb9; font-weight: bold;">tar</span> zcvf svndump.tgz svndump<br />
<span style="color: #c20cb9; font-weight: bold;">scp</span> svndump.tgz username<span style="color: #000000; font-weight: bold;">@</span>new.server.ip:.<span style="color: #000000; font-weight: bold;">/</span></div></div>
<p>Those dump files must be applied on the new system&#8217;s repositories.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">tar</span> zxvf svndump.tgz<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>repository<br />
<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">svnadmin</span> create repository-name<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">svnadmin</span> load repository-name <span style="color: #000000; font-weight: bold;">&lt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>svndump<span style="color: #000000; font-weight: bold;">/</span>repository.dump<br />
<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www-data:www-data <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/*</span></div></div>
<p>Congratulations, all your source code has been migrated!</p>
]]></content:encoded>
			<wfw:commentRss>http://longspine.com/how-to/install-apachesubversion-on-debian-lenny-and-migrate-the-repositories/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Securing SSH in Debian Lenny</title>
		<link>http://longspine.com/how-to/securing-ssh-in-debian-lenny/</link>
		<comments>http://longspine.com/how-to/securing-ssh-in-debian-lenny/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 22:24:36 +0000</pubDate>
		<dc:creator>poomk</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://longspine.com/?p=25</guid>
		<description><![CDATA[เรื่องนี้เริ่มมาจากเมือสิบนาทีที่ผ่านมาได้เข้าไปดูเซิร์ฟเวอร์ที่ใช้อยู่ ปรากฎว่ามีการใช้แบนวิดท์ที่สูงมากโดยที่ผมไม่ได้ใช้งาน จึงเกิดเอะใจขึ้นมาว่ามีใรมาเล่นอะไรแผลงๆรึเปล่าเลยเข้าไปดูที่ /var/log/auth.log ก็พบว่ามีบางคนทำ brute force attack กับเครื่องผม ผมจึงต้องทำอะไรซักอย่างเพื่อป้องกันการถูกเจาะเข้าระบบ การใช้ ssh นั้นเป็นช่องทางที่สะดวกและแพร่หลาย แต่ในขณะเดียวกันก็เหมือนกับเป็นช่องทางมาตรฐานสำหรับผู้ไม่ประสงค์ดีเข้ามารบกวน เราสามารถป้องกันในเบื้องต้นได้ง่ายๆคือ ใช้รหัสผ่านที่ดี แต่รหัสผ่านที่ดีนั้นคืออะไร? จากประสพการณ์รหัสผ่านที่ดีมักจะมีลักษณะดังนี้&#160; มีจำนวนอักษรหลายตัว ใช้เลข พยัญชนะ และเครื่องหมายผสมกัน ไม่ใช่คำที่พบได้ตามพจนานุกรม หรือคำที่พบเห็นได้ทั่วไป เจ้าของต้องจำได้ (สำคัญมาก!) แก้ไข /etc/ssh/sshd_config Protocol 2 &#160; &#160; &#160; &#160; &#160;# โปรโตคอล 2 ปลอดภัยกว่าโปรโตคอล 1 PermitRootLogin no &#160;# ห้ามล็อกอินโดย root AllowUsers username # ให้ล็อกอินได้เฉพาะ username ที่ระบุ &#160; หลังจากนั้นอย่าลืมสั่ง sudo /etc/init.d/ssh restart [...]]]></description>
			<content:encoded><![CDATA[<p>เรื่องนี้เริ่มมาจากเมือสิบนาทีที่ผ่านมาได้เข้าไปดูเซิร์ฟเวอร์ที่ใช้อยู่ ปรากฎว่ามีการใช้แบนวิดท์ที่สูงมากโดยที่ผมไม่ได้ใช้งาน จึงเกิดเอะใจขึ้นมาว่ามีใรมาเล่นอะไรแผลงๆรึเปล่าเลยเข้าไปดูที่ /var/log/auth.log ก็พบว่ามีบางคนทำ brute force attack กับเครื่องผม ผมจึงต้องทำอะไรซักอย่างเพื่อป้องกันการถูกเจาะเข้าระบบ</p>
<p>การใช้ ssh นั้นเป็นช่องทางที่สะดวกและแพร่หลาย แต่ในขณะเดียวกันก็เหมือนกับเป็นช่องทางมาตรฐานสำหรับผู้ไม่ประสงค์ดีเข้ามารบกวน เราสามารถป้องกันในเบื้องต้นได้ง่ายๆคือ</p>
<ol>
<li><strong>ใช้รหัสผ่านที่ดี</strong><br />
แต่รหัสผ่านที่ดีนั้นคืออะไร? จากประสพการณ์รหัสผ่านที่ดีมักจะมีลักษณะดังนี้&nbsp;</p>
<ul>
<li>มีจำนวนอักษรหลายตัว</li>
<li>ใช้เลข พยัญชนะ และเครื่องหมายผสมกัน</li>
<li>ไม่ใช่คำที่พบได้ตามพจนานุกรม หรือคำที่พบเห็นได้ทั่วไป</li>
<li>เจ้าของต้องจำได้ (สำคัญมาก!)</li>
</ul>
</li>
<li><strong>แก้ไข /etc/ssh/sshd_config</strong>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Protocol <span style="color: #000000;">2</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># โปรโตคอล 2 ปลอดภัยกว่าโปรโตคอล 1</span><br />
PermitRootLogin no &nbsp;<span style="color: #666666; font-style: italic;"># ห้ามล็อกอินโดย root</span><br />
AllowUsers username <span style="color: #666666; font-style: italic;"># ให้ล็อกอินได้เฉพาะ username ที่ระบุ</span></div></div>
<p>&nbsp;</p>
<p>หลังจากนั้นอย่าลืมสั่ง</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ssh</span> restart</div></div>
<p>นอกจากนี้ยังสามารถทำให้ปลอดภัยขึ้นได้โดยการเปลี่ยนพอร์ท และการบังคับให้ผู้ใช้ใช้กุญแจแทนที่รหัสผ่าน แต่เนื่องจากมันทำให้ใช้งานได้ไม่สะดวก วิธีพวกนี้จึงไม่ใช่วิธีที่ผมจะใช้สำหรับเซิร์ฟเวอร์สันหลังยาว</li>
<li><strong>ทำการ Blacklist ผู้ที่อาจจะมีประสงค์ร้าย</strong><br />
วิธีการนั้นมีหลายแบบ เช่นการแก้ไข iptables แต่สำหรับผู้ใช้ที่ไม่อยากไปทำอะไรซับซ้อนและเสี่ยงต่อการผิดพลาด ดังนั้นเราจึงแนะนำโปรแกรม DenyHosts ที่มีหลักการคือเมื่อมีการค้นพบว่ามีหมายเลขไอพีไหนพยายามโจมตีเครื่องของเรา โปรแกรมนี้ก็จำทำการแบนไอพีนั้นเป็นช่วงเวลาหนึ่ง ซึ่งนานพอที่จะทำให้การโจมนี้นั้นไร้ประโยชน์ไปเลย&nbsp;</p>
<p>การติดตั้งใน Lenny นั้นทำได้ง่ายๆโดย</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> denyhosts</div></div>
</li>
</ol>
<p>วิธีการเหล่านี้อาจแปลกใหม่สำหรับผู้ใช้หลายๆคน แต่สำหรับผู้ไม่ประสงค์ดีนั้นมันแสนจะธรรมดายิ่งกว่าปลอกกล้วย การเรียนรู้เรื่องเหล่านี้จึงสำคัญหลีกเลี่ยงไม่ได้ โดยเฉพาะผู้ที่ต้องดูแลเซิร์ฟเวอร์ของตัวเองแบบถูๆไถๆ เช่นตัวผมเอง</p>
]]></content:encoded>
			<wfw:commentRss>http://longspine.com/how-to/securing-ssh-in-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

