您的位置:首页 > 其它

svn配置

2016-02-15 21:10 323 查看
Window下配置SVN服务器与客户端如何配置svn服务器:前提条件:
下载最新的svn服务器:
svn-1.4.5-setup.rar
下载最新的svn客户端:
TortoiseSVN-1.4.5.10425-win32-svn-1.4.5.rar
下载配置svn服务成window service自动运行的工具:
SVNService.rar
步骤:
1.下载并安装svn1.4.5-setup.rar假设你安装在:G:\Program Files\Subversion目录下。
2。建立Repository,可以打开命令窗口,输入svnadmin create G:\SVNRoot\Projects\searchz,目录
自己定。
3.配置Repository,进入Repository目录,这里是G:\SVNRoot\Projects\search,你会看到conf目录,进入该目录,你会看到
svnserver.conf和passwd两个文件.
对两个文件作如下修改:
svnserve.conf
[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 conf directory.
### Uncomment the line below to use the default password file.
password-db = passwd

含义是:
未验证用户无任何权限 (如果把none修改为read就是给予读权限)
已验证用户给予写权限 (当然也能读)
密码数据存放到passwd文件中
passwd
[users]
harry = harryssecret
sally = sallyssecret
weip=weip
注意最后passwd中的配置,一个用户以行,如:weip=weip表示用户名为weip,密码为weip的一个用户。 4.启动subversion服务
两种方式启动:
(1).命令方式:svnserve -d -r G:\SVNRoot\Projects默认端口是3690,如果不幸这个端口被别别的程序暂用,可以通过选项 --
listem --port=绑定端口.
(2)subversion服务:默认情况下载window service中视没有的,必须通过svnservice -install -d -r
G:\SVNRoot\Projects,(svnservice必须和svnserve在同一个目录下)

如果找不到svnservice就用
sc create svnservice binpath= "\"D:\Subversion\bin\svnserve.exe\" --service -r D:\svnproject" displayname= "SVNService"
depend= Tcpip
上面在一行。
再用net start svnservice来将其作为服务运行,建议打开控制面板找到SVNService,将其启动类型设置为自动。这样服务器的配置就架构好了。
你现在可以用客户端的TortoiseSVN来访问刚刚配置的服务器了,url格式:
svn://ip地址/Repository名,这里是:svn://127.0.0.1/searchz.
客户端的简单日常操作:
要取得当前的最新版本,SVN updated.
要修改更新到SVN,选择SVN submit即可(谨慎的话先更新到最新版本后再提交).
启动 svn svnserve -d -r f:\svncode --listen-port 7001

正规的上传项目步骤:
1.checkout一个在服务端建好的空目录(目录在repo-browser建立)
2.把子文件夹内容拷贝进去,然后add,commit
这样就和server同步了

eclipse 安装svn插件 http://subclipse.tigris.org/update_1.8.x/ help选择intallNewSoftware,填上网址,就可以一步步做完。

然后可以将需要共享到svn服务器的项目上传。
选中eclipse的项目右键,team--share--svn--结束。
然后提交项目。

svn的使用省略。。。。。。

本文出自 “Java大白的战地” 博客,请务必保留此出处http://8023java.blog.51cto.com/10117207/1742305
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: