前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >svn搭建

svn搭建

作者头像
dogfei
发布2020-07-31 11:10:35
7650
发布2020-07-31 11:10:35
举报
文章被收录于专栏:devops探索

svn搭建步骤

环境:centos7.4

方式:使用yum方式

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90

1、yum -y install subversion 2、查看版本 svnversion --version 3、查看默认版本库 cat /etc/sysconfig/svnserve # OPTIONS is used to pass command-line arguments to svnserve. # # Specify the repository location in -r parameter: OPTIONS="-r /var/svn" 可以看到默认是在/var/svn目录下,我们可以修改成自己需要的。 4、建立版本库 svnadmin create /var/svn/project 我们创建好之后,默认该目录下会自动创建几个目录: [root@xs_test_bk project]# ll total 28 drwxr-xr-x 2 root root 4096 Apr 19 11:18 conf drwxr-sr-x 6 root root 4096 Apr 19 11:48 db -r--r--r-- 1 root root 2 Apr 18 18:21 format drwxr-xr-x 2 root root 4096 Apr 18 18:21 hooks drwxr-xr-x 2 root root 4096 Apr 18 18:21 locks -rw-r--r-- 1 root root 229 Apr 18 18:21 README.txt drwxr-xr-x 2 root root 4096 Apr 18 18:45 xscode 5、配置 1)添加用户 vim conf/passwd [users] # harry = harryssecret # sally = sallyssecret admin = xs@0418 qiantao = qiantao@0307 xuehua = xuehua jyp = yuanpeng0224 等号左边是用户名,右边是密码 2)设置权限 vim conf/authz [root@xs_test_bk conf]# cat 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 xs = admin,qiantao,xuehua # [/foo/bar] # harry = rw # &joe = r # * = [project:/] admin = rw qiantao = rw xuehua = rw jyp = rw # [repository:/baz/fuz] # @harry_and_sally = rw # * = r 这里我们也可以创建一个组,将用户全都放到组里,例如: [groups] # harry_and_sally = harry,sally # harry_sally_and_joe = harry,sally,&joe xs = admin,qiantao,xuehua [project:/] @xs = rw 3)编辑svnserve.conf配置文件 添加以下内容 [general] anon-access = none auth-access = write password-db = passwd authz-db = authz realm = project 6、启动 systemctl enable svnserve.service 添加开机启动 systemctl start svnserve.service

至此搭建工作完成,需要注意的是svn默认监听端口3690,我们需要在防火墙里放通,如果使用的是云主机,还需要在控制台安全组处放通该端口。

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2018-04-19,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
对象存储
对象存储(Cloud Object Storage,COS)是由腾讯云推出的无目录层次结构、无数据格式限制,可容纳海量数据且支持 HTTP/HTTPS 协议访问的分布式存储服务。腾讯云 COS 的存储桶空间无容量上限,无需分区管理,适用于 CDN 数据分发、数据万象处理或大数据计算与分析的数据湖等多种场景。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档