SVN服务端安装
一、下载安装文件
可执行文件:http://subversion.tigris.org/files/documents/15/44049/Setup-Subversion-1.5.3.msi
二、软件安装
可执行文件安装方法: 当然是双击直接运行Setup-Subversion-1.5.3.msi 咯。简单吧!
三、SVN服务端环境配置
创建资源库: 方法一>>在命令行输入svnadmin create E:\svn_repository,建立工程,svn自动会在该目录下建立若干文件。
资源库配置修改:进入目录" E:\svn_repository"
首先打开文件密码文件"passwd"添加
George.yin = a8.com
再打开权限文件"authz" :
### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to:
### - a single user,
### - a group of users defined in a special [groups] section,
### - an alias defined in a special [aliases] section,
### - all authenticated users, using the '$authenticated' token,
### - only anonymous users, using the '$anonymous' token,
### - anyone, using the '*' wildcard.
###
### 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_sally_and_joe = harry,sally,&joe
admin = george.yin
# [/foo/bar]
# harry = rw
# &joe = r
# * =
# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
[/]
@admin = rw
*=r
最后打开服务配置文件"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]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
anon-access = read
auth-access = write
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control. Unless you specify a path
### starting with a /, the file's location is relative to the the
### directory containing this file. If you don't specify an
### authz-db, no path-based access control is done.
### Uncomment the line below to use the default authorization file.
authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa. The default realm
### is repository's uuid.
# realm = My First Repository
[sasl]
### This option specifies whether you want to use the Cyrus SASL
### library for authentication. Default is false.
### This section will be ignored if svnserve is not built with Cyrus
### SASL support; to check, run 'svnserve --version' and look for a line
### reading 'Cyrus SASL authentication is available.'
# use-sasl = true
### These options specify the desired strength of the security layer
### that you want SASL to provide. 0 means no encryption, 1 means
### integrity-checking only, values larger than 1 are correlated
### to the effective key length for encryption (e.g. 128 means 128-bit
### encryption). The values below are the defaults.
# min-encryption = 0
# max-encryption = 256
启动服务: 在命令行输入:svnserve -d 或者指定参数启动 svnserve -d -r e:\svn
四、SVN在Eclipse中的配置
在空白处右击---新建---资源库位置,在URL选项中写入:svn://localhost/),确定即可 在弹出的对话框中输入用户名和密码(为之前在文件修改的用户名和密码),确定 (在这一步如果出错请参见五、可能遇到的问题1和2
右击建立的资源库位置,新建一个远程文件夹,填入文件夹名,Next—Finish
右击新建的远程文件夹,选 导入 选项,选择导入目标文件的目录,点击确定即可
打开file菜单---New---Others….---SVN---从SVN中出去项目---next---选定资源库位置---Next---选择目标远程文件夹---Next---为项目命名---Finish
五、可能遇到的问题 Svn中文网
遇到eclipse重启的问题解决方法:设置我的电脑》高级》环境变量中的 APR_ICONV_PATH 指向svn-win32-1.5.5.zip zip包解压后的 iconv文件夹。
eclipse中 SVN Repository 视图中添加资源时会出现错误如:svn: No repository found in 'svn://localhost/svn/demo' 这时需要重新启动SVN服务改用这样的命令svnserve -d -r e:\svn\demo 启动时指定具体的路径,另外这样也行svnserve -d -r e:\svn 这时只指定了一个路径添加eclipse中添加时则用'svn://localhost/demo' 就行了。
安装成服务:
sc create svn binpath= "E:\dev\install\subversion\bin\svnserve.exe --service -r E:\svn_repository" displayname= "svnservice" depend= tcpip start= auto
说明:
svn : 这个名字是实质的服务名,displayname是现实名
E:\dev\install\subversion\bin\svnserve.exe为安装目录下的bin\svnserve.exe
--service:注意是两个--,写成-service是会出错的
E:\svn_repository:在安装时(svnadmin create E:\svn_repository)的目录
Displayname:服务显示名