1、 先从官网下载
http://subversion.apache.org/packages.html#windows
转到http://www.collab.net/downloads/subversion下载 让注册才下载,有点烦,不过无所谓了
2、安装
傻瓜式安装,目标程序可装在c盘,但是根库目录也默认c盘,想改下路径了改下不然到时候重装系统库就没了……
我改到这里了,安装过程中有两个 D:\svn_repository
重启电脑后才可启动apache……
3、配置
简单设置,暂不研究目录权限等问题,下来慢慢研究哈……开始程序里面的用户手册 svn-book.pdf
打不开了在这找C:\Program Files\CollabNet\Subversion Server\iconv
Chapter 6. Server Configuration
httpd, the Apache HTTP Server
Basic Apache Configuration
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
这两行安装的时候CollabNet已经帮我们,集成工具就是好哈,暂不深入权限问题可以往下看
到Authentication Options 验证选项
Basic authentication基本验证
$ ### First time: use -c to create the file
$ ### Use -m to use MD5 encryption of the password, which is more secure
$ htpasswd -c -m /etc/svn-auth.htpasswd harry
New password: *****
Re-type new password: *****
Adding password for user harry
$ htpasswd -m /etc/svn-auth.htpasswd sally
New password: *******
Re-type new password: *******
Adding password for user sally
$
照猫画虎建立两个用户
cmd cd C:\Program Files\CollabNet\Subversion Server\httpd\bin
htpasswd -c -m D:\svn_repository\users mengxiang
New password: *****
Re-type new password: *****
第一个用户建立后,以后追加用户都不要参数‘-c’,是创建文件的,我们只用在原有里面追加用户就行
htpasswd -m D:\svn_repository\users lixiang
New password: *****
Re-type new password: *****
目录下生成users文件。
ok,接下来pdf到
Next, add some more directives inside the <Location> block to tell Apache how to use the password file:
告诉apache到哪找我们的用户及密码来验证,具体意思自己看用户手册下面有详细解释,
我们改为下面来用把地址改为我们刚创建的用户文件,然后告诉apache我们需要验证
<Location /svn>
DAV svn
SVNParentPath D:\svn_repository
# Authentication: Basic
AuthName "Subversion repository"
AuthType Basic
AuthUserFile D:\svn_repository\users
# Authorization: Authenticated users only
Require valid-user
</Location>
下面还有什么Digest authentication高级验证等等,将用户分组,及对文件目录读写删等权限的配置,改天再研究。现在只为先搭建一个svn环境先
OK,接下来,我们创建我们的库demo
svnadmin crate d:\svn_repository\demo
查看d:\svn_repository有刚创建的demo工程,里面有许多配置文件先不细究哈
好了重启Apache,访问http://localhost/svn/demo 提示输入用户名和密码,输入上面创建的用户名和密码,进入根目录,
demo - Revision 0: /
到这里基本配置完成,用户都具有读写删权限。
4、傻瓜式安装subclipse
在eclipse里安装插件
Help -> Software Updates -> Available Software-> Add Site -> 输入http://subclipse.tigris.org/update_1.10.x
安装后打开该视图
右击新建--输入资源库位置
http://localhost/svn/demo
输入用户名密码连接库成功