1. 下载svn源码
源码地址:http://subversion.apache.org/download/
我们选择1.7.16版本,因为我windows PC环境下TortoiseSVN的内核是1.7版本的。
2. 下载apr, apr-utils
因为svn 对apr,apr-utils有依赖,所以需要下载源码:
svn co http://svn.apache.org/repos/asf/apr/apr/branches/1.3.x apr
svn co http://svn.apache.org/repos/asf/apr/apr-util/branches/1.3.x apr-util
上面两个库编译顺序有先后,编译方式是
$ cd apr; ./buildconf; ./configure ...; make; make install
$ cd apr-util; ./buildconf; ./configure ...; make; make install其中在./configure的时候,可以通过--prefix指定安装目录
3. 下载sqlite
对sqlite有依赖,需要下载http://www.sqlite.org/sqlite-amalgamation-3.7.6.3.tar.gz,并吧解压出来的sqlite3.c放置到svn源码目录下的子目录sqlite-amalgamation中,如果没有,就建立个子目录。
3.编译svn
./configure --prefix=svn安装目录 --with-apr=指向apr安装目录 --with-apr-util=指向apr-util安装目录
make install
4. 测试
输入命令:svn --version
输入如下:
svn, version 1.7.16 (r1569520)
compiled Mar 20 2014, 16:01:57