<?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>后院&#124;kevin’s backyard &#187; subversion</title>
	<atom:link href="http://kevin.9511.net/archives/tag/subversion/feed" rel="self" type="application/rss+xml" />
	<link>http://kevin.9511.net</link>
	<description>立志做一个混事业型男人</description>
	<lastBuildDate>Fri, 30 Apr 2010 16:55:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>nginx 和 subversion</title>
		<link>http://kevin.9511.net/archives/179.html</link>
		<comments>http://kevin.9511.net/archives/179.html#comments</comments>
		<pubDate>Tue, 31 Mar 2009 18:42:34 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[技术备案]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://kevin.9511.net/archives/179.html</guid>
		<description><![CDATA[实在厌倦了apache的臃肿，打算彻底投奔nginx的怀抱了。
编译，安装，迁移，一切都很顺利 ，最后一步在迁移svn的时候卡住了。
把nginx作为subversion的前端webserver居然目前没有解决方案……
搞了一个晚上，最终还是采取了proxy的办法，把发向nginx的svn请求转到apache上去了 ，哎。
为啥nginx没有这方面的解决方案，也大概查了个水落石出。因为这方面中文资料实在是少，让我费了颇多的周折，
现在就明明白白的说一下吧。
在nginx.net的Mailing list里，nginx的作者Igor Sysoev说了，支持SVN需要有三个东西
 1) full WebDAV support,
2) DeltaV support,
3) SVN repo format support.
而在nginx里的NginxHttpDavModule，仅仅对以上三项中的第一项WebDAV有了初步的支持(目前来看Igor Sysoev并没有升级的想法)，对于几个高级的WebDAV操作（比如OPTIONS、PROPFIND）并不支持，而这些操作，恰恰是SVN所必须的。而剩下的两项，更是一点支持都没。
所以，就目前来说，想单纯的nginx+subversion，基本上是不可能的。
在刚开始研究这个问题的时候，并不知道除了WebDAV还必须要有其他两个东西。所以满世界找nginx上WebDAV的解决方案，以为搞定这个，就万事大吉了。别说，还真让我在一个老外的博客上给找着一个。这家伙的方法很巧妙，他用通过查阅WebDAV的RFC文档，将绝大多数NginxHttpDavModule不支持的操作用PHP代码实现了，并且通过配置nginx，根据header信息把这些请求重定向到了这个PHP程序。这是这篇博客的地址，有志于自己动手解决这个问题的人，可以参考一下：）
最后感叹一下，为什么计算机方面的问题，总是能在国外的网站和MaillingList找到答案呢？是中国人都不会么？还是这些问题只有我这一个中国人遇到了？
]]></description>
			<content:encoded><![CDATA[<p>实在厌倦了apache的臃肿，打算彻底投奔nginx的怀抱了。<br />
编译，安装，迁移，一切都很顺利 ，最后一步在迁移svn的时候卡住了。<br />
把nginx作为subversion的前端webserver居然目前没有解决方案……</p>
<p>搞了一个晚上，最终还是采取了proxy的办法，把发向nginx的svn请求转到apache上去了 ，哎。<br />
为啥nginx没有这方面的解决方案，也大概查了个水落石出。因为这方面中文资料实在是少，让我费了颇多的周折，<br />
现在就明明白白的说一下吧。</p>
<p>在nginx.net的<a href="http://marc.info/?l=nginx" title="MARC archive" target="_blank">Mailing list</a>里，nginx的作者Igor Sysoev说了，支持SVN需要有三个东西</p>
<blockquote><p> 1) full WebDAV support,<br />
2) DeltaV support,<br />
3) SVN repo format support.</p></blockquote>
<p>而在nginx里的NginxHttpDavModule，仅仅对以上三项中的第一项WebDAV有了初步的支持(目前来看Igor Sysoev并没有升级的想法)，对于几个高级的WebDAV操作（比如OPTIONS、PROPFIND）并不支持，而这些操作，恰恰是SVN所必须的。而剩下的两项，更是一点支持都没。</p>
<p><strong>所以，就目前来说，想单纯的nginx+subversion，基本上是不可能的。</strong></p>
<p>在刚开始研究这个问题的时候，并不知道除了WebDAV还必须要有其他两个东西。所以满世界找nginx上WebDAV的解决方案，以为搞定这个，就万事大吉了。别说，还真让我在一个老外的博客上给找着一个。这家伙的方法很巧妙，他用通过查阅<a href="http://www.ietf.org/rfc/rfc2518.txt" title="RFC2518">WebDAV的RFC文档</a>，将绝大多数NginxHttpDavModule不支持的操作用PHP代码实现了，并且通过配置nginx，根据header信息把这些请求重定向到了这个PHP程序。<a href="http://blog.agoragames.com/2009/03/20/webdav-nginx-play-nice/">这是这篇博客的地址</a>，有志于自己动手解决这个问题的人，可以参考一下：）</p>
<p>最后感叹一下，为什么计算机方面的问题，总是能在国外的网站和MaillingList找到答案呢？是中国人都不会么？还是这些问题只有我这一个中国人遇到了？</p>
]]></content:encoded>
			<wfw:commentRss>http://kevin.9511.net/archives/179.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install subversion-1.5.2 on Linux</title>
		<link>http://kevin.9511.net/archives/178.html</link>
		<comments>http://kevin.9511.net/archives/178.html#comments</comments>
		<pubDate>Tue, 31 Mar 2009 06:14:04 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[技术备案]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://kevin.9511.net/archives/178.html</guid>
		<description><![CDATA[1，Install Apache,APR and APR-util(http://apr.apache.org/)
 #tar -zxf apr-1.3.3.tar.gz
#cd apr-1.3.3
#./configure
#make
#make install
 #tar -zxf apr-util-1.3.4.tar.gz
#cd apr-util-1.3.4
#./configure &#8211;with-apr=/usr/local/apr/
#make
#make install
编译apache，加如下参数
 &#8211;enable-dav &#8211;with-apr=/usr/local/apr/bin/apr-1-config &#8211;with-apr-util=/usr/local/apr/bin/apu-1-config
2. Install Neon(http://www.webdav.org/neon/)
neon is an HTTP and WebDAV client library, with a C interface.
 #tar -zxf neon-0.28.3.tar.gz
#cd neon-0.28.3
#./configure &#8211;prefix=/usr/local/neon
#make
#make install
3. Install Subversion (http://subversion.tigris.org/)
 #tar -zxf subversion-1.5.2.tar.gz
#cd subversion-1.5.2
#./configure &#8211;prefix=/usr/local/subversion &#8211;with-apxs=/usr/local/apache2/bin/apxs &#8211;with-apr=/usr/local/apr &#8211;with-apr-util=/usr/local/apr &#8211;with-neon=/usr/local/neon
#make
#make install
编译过程中，发生如下错误
/usr/bin/ld: cannot find -lexpat
collect2: ld returned [...]]]></description>
			<content:encoded><![CDATA[<p><strong>1，Install Apache,APR and APR-util</strong>(http://apr.apache.org/)</p>
<blockquote><p> #tar -zxf apr-1.3.3.tar.gz<br />
#cd apr-1.3.3<br />
#./configure<br />
#make<br />
#make install</p></blockquote>
<blockquote><p> #tar -zxf apr-util-1.3.4.tar.gz<br />
#cd apr-util-1.3.4<br />
#./configure &#8211;with-apr=/usr/local/apr/<br />
#make<br />
#make install</p></blockquote>
<p>编译apache，加如下参数</p>
<blockquote><p> &#8211;enable-dav &#8211;with-apr=/usr/local/apr/bin/apr-1-config &#8211;with-apr-util=/usr/local/apr/bin/apu-1-config</p></blockquote>
<p><strong>2. Install Neon</strong>(http://www.webdav.org/neon/)<br />
neon is an HTTP and WebDAV client library, with a C interface.</p>
<blockquote><p> #tar -zxf neon-0.28.3.tar.gz<br />
#cd neon-0.28.3<br />
#./configure &#8211;prefix=/usr/local/neon<br />
#make<br />
#make install</p></blockquote>
<p><strong>3. Install Subversion</strong> (http://subversion.tigris.org/)</p>
<blockquote><p> #tar -zxf subversion-1.5.2.tar.gz<br />
#cd subversion-1.5.2<br />
#./configure &#8211;prefix=/usr/local/subversion &#8211;with-apxs=/usr/local/apache2/bin/apxs &#8211;with-apr=/usr/local/apr &#8211;with-apr-util=/usr/local/apr &#8211;with-neon=/usr/local/neon<br />
#make<br />
#make install</p></blockquote>
<p>编译过程中，发生如下错误</p>
<blockquote><p>/usr/bin/ld: cannot find -lexpat<br />
collect2: ld returned 1 exit status</p></blockquote>
<p>确认libexpat已经被载入</p>
<blockquote><p># ldconfig -p|grep expat<br />
libexpat.so.0 (libc6) =&gt; /usr/lib/libexpat.so.0</p></blockquote>
<p>做个链接，并重载libs，最后检查一下</p>
<blockquote><p>#cd /usr/lib<br />
#ln -s libexpat.so.0.5.0 libexpat.so<br />
#ldconfig<br />
#ldconfig -p|grep expat<br />
libexpat.so.0 (libc6) =&gt; /usr/lib/libexpat.so.0<br />
libexpat.so (libc6) =&gt; /usr/lib/libexpat.so</p></blockquote>
<p>继续编译，通过，OY<br />
<strong>4. 配置</strong><br />
打开apache的httpd.conf文件，查找下面两行内容，如果存在，则表示subversion已经安装成功</p>
<blockquote><p>LoadModule dav_svn_module     modules/mod_dav_svn.so<br />
LoadModule authz_svn_module   modules/mod_authz_svn.so</p></blockquote>
<p>建立代码仓库及配置文件</p>
<blockquote><p>#cd /usr/local/subversion/<br />
#mkdir repos<br />
#mkdir www<br />
#touch auth<br />
#cd repos<br />
#svnadmin create myproject</p></blockquote>
<p>通过apache的htpasswd工具创建用户，并按提示输入密码</p>
<blockquote><p>#cd ..<br />
#/usr/local/apache2/bin/htpasswd -c /usr/local/subversion/passwd kevin</p></blockquote>
<p>编辑auth文件，写入以下内容，赋予此用户对于myproject的读写权限（例子很简单，更复杂的权限配置，请自己去查官方文档或google搜索“SVN权限”）</p>
<blockquote><p> [/]<br />
* = rw</p>
<p>[/svn]<br />
* = rw</p>
<p>[/svn/myproject]<br />
lirui=rw</p></blockquote>
<p>配置apache，设置svn的工作目录</p>
<blockquote><p> &lt;Location /svn&gt;<br />
DAV svn<br />
SVNParentPath /usr/local/subversion/repos<br />
AuthType Basic<br />
AuthName &#8220;Subversion repository&#8221;<br />
AuthUserFile /usr/local/subversion/passwd<br />
AuthzSVNAccessFile /usr/local/subversion/auth<br />
Require valid-user<br />
&lt;/Location&gt;</p></blockquote>
<p>重启apache</p>
]]></content:encoded>
			<wfw:commentRss>http://kevin.9511.net/archives/178.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
