您的位置:首页 > 其它

svn服务器搭建与配置

2018-09-07 10:11 225 查看
1、SVN服务介绍
SVN是一款非常优秀的版本管理工具,与CVS管理工具一样,SVN 是一种跨平台的开源的版本控制系统,它会备份并记录每个文件每一次的修改更新变动
官方网站:http://subversion.tigris.orghttp://subvsion.apache.orgSVN客户端:http://tortoisesvn.netSVN中文网站:http://www.iusesvn.comSVN版本控制系统的工作流程:1:在中央库上创建或主干复制一个分支2:从中央库check out下这个分支的代码3:然后进行修改,提交更新代码
Is this ok [y/N]: yDownloading Packages:subversion-1.6.11-15.el6_7.x86_64.rpm | 2.3 MB 00:00 Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning TransactionWarning: RPMDB altered outside of yum. Installing : subversion-1.6.11-15.el6_7.x86_64 1/1 Verifying : subversion-1.6.11-15.el6_7.x86_64 1/1 Installed: subversion.x86_64 0:1.6.11-15.el6_7 Complete!
启动SVN[root@centos6 ~]# svnserve -d -r /application/svndata/
[root@centos6 ~]# ps -ef|grep svnroot 2077 1 0 15:25 ? 00:00:00 svnserve -d -r /application/svndata/root 2079 2022 0 15:25 pts/0 00:00:00 grep svn
检查端口[root@centos6 ~]# lsof -i :3690COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME[root@centos6 ~]# cd /application/svndata/docs/conf/

[root@centos6 conf]# lltotal 12-rw-r--r--. 1 root root 1080 Nov 26 15:36 authz-rw-r--r--. 1 root root 309 Nov 26 15:36 passwd-rw-r--r--. 1 root root
5b4
2279 Nov 26 15:36 svnserve.conf
[root@centos6 conf]# cp svnserve.conf svnserve.conf.bak生产环境备份很重要!!!!!!
进行详细配置 [root@centos6 conf]# vi svnserv.confanon-access = none //禁止匿名访问auth-access = write //认证后有读的权限password-db = /application/svnpasswd/passwd //指定密码文件authz-db = /appplication/svnpasswd/authz //指定权限认证文件### 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 = sallyssecrettest = 123456test1 = 123456
配置用户权限[root@centos6 svnpasswd]# vi authz[docs:/] 主目录权限test = rwtest1 = rw
[docs:/file] 一级目录权限test = rtest1 = rw注:权限里配置的用户一定要在用户配置文件里存在的 配置完成后,无须重启,立即生效备注: 修改passwd和authz文件不需要重启svn服务,
而修改svnserve.conf则需要重启svn服务。
4、SVN客户端操作
WIN平台操作下载SVN客户端软件 进行安装本地客户端新建一个文件svndata
右键文件夹——SVN check outurl处输入svn://192.168.1.235/docs点击OK新建一个文件,然后右键SVNDATA文件——svn commit

更新与列出文件列表[root@centos6 ~]# svn update svn://192.168.1.235/docs/ --username=test --password=123456Skipped 'svn://192.168.1.235/docs'[root@centos6 ~]# svn list svn://192.168.1.235/docs/ --username=test --password=123456 svn123.txttest.txt安装与配置过程结束
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  svn 服务器 搭建