`

Ubuntu 安装 SVN

阅读更多

一、搭建 Subversion 服务器

 

1、首先需要安装 subversion 这个软件:
sudo apt-get install subversion

安装好之后使用命令查看:

which svn

显示:/usr/bin/svn

 

2、在 /home/svn 下建立一个 库,名称为 SvnRepos:
svnadmin create /home/svn/SvnRepos

 

3、然后把 /soft 目录下的内容导入到这个 SvnRepos 中:
svn import -m "" /fsoft  file:///home/svn/SvnRepos

保证svn库中有数据,进行测试.

 

4、给这个 SvnRepos 建立一个 svn 自带的 svnserve:
svnserve -d -r /home/svn/SvnRepos

 

5、最后给这个svn库使用启动命令:

svnserve -d --listen-port 8089 -r /home/svn/SvnRepos

注意:后面启动系统后给这个svn库启动的时候就用此命令。

客户端就可以进行资源库的访问(现在这里还不行,因为还没有配置用户和权限),访问路径为svn://XXX.XXX.XXX.XXX:8089。

 

 

二、配置 Subversion 的用户和权限

 

1、首先需要配置这个文件/home/svn/SvnRepos/conf/svnserve.conf:

### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository.  (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)

### Visit http://subversion.tigris.org/ for more information.

[general]
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
realm = SvnRepos

 2、配置文件/home/svn/SvnRepos/conf/passwd:

### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.

[users]
harry = harryssecret
sally = sallyssecret
admin = admin

 3、配置文件/home/svn/SvnRepos/conf/authz:

### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### A match can be inverted by prefixing the rule with '~'. Rules can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').

[aliases]
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average

[groups]
harry_and_sally = harry,sally

[/]
harry = rw
# &joe = r
admin = rw
* = rw

关于Svn的精细权限控制,后续。 

注意:

      a. 没一行的配置文件的字符都需顶格写,不能留有空格。

      b. 原有编码在搭建过程中,编码暂时不要替换。

 

三、使用Eclipse工具进行访问,检出

把Eclps定位到svn的界面,新建-->资源库位置-->"URL"填写svn://192.168.40.83:8089-->就可以看见下图界面:

 

 

 

在搭建的过程中抱了很多的错误,解决的时候现在没有怎么注意了。如果有什么问题,可以帖在下面,本帖注意点就更新一下。

 

  • 大小: 20.6 KB
1
0
分享到:
评论
2 楼 yangpeihai 2012-08-23  
同一楼,怎么解决,楼主,谢谢
1 楼 greatwqs 2011-06-09  
如果启动svn成功,那么必定能访问:http://192.168.40.83:8089/
我得到的数据为:
( success ( 2 2 ( ) ( edit-pipeline svndiff1 absent-entries commit-revprops depth log-revprops partial-replay ) ) )

相关推荐

Global site tag (gtag.js) - Google Analytics