本地svn简单配置
程序员文章站
2022-06-04 19:23:58
...
本文只记录配置本地subversion,没有认证,http,ssh等配置
1. 安装subversion服务端
yum install subversion
或源码编译安装
2. 创建svn用户组
root用户
3. 创建svn仓库目录
4. 创建svn仓库
5. 修改权限 conf/svnserve.conf
[general]
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
conf/passwd
[users]
username = password
* = *
conf/authz
[groups]
@developers = username, ...
[/usr/local/svn/repos/test]
@developers = rw
username = r/w/rw
* = r
[test:/usr/local/svn/repos/test]
@developers = rw
username = r/w/rw
* = r
[color=red]注: 修改权限没什么效果,可能配置出错了[/color]
然后就可以使用svn co/ci/diff/stat等命令了
1. 安装subversion服务端
yum install subversion
或源码编译安装
2. 创建svn用户组
root用户
# groupadd developers //增加组developers
# usermod -a -G developers username //将用户username添加到developers中
# id username //查看username是否在developer中
注:如果开多个窗口操作,在username shell 下使用group命令查看当前shell是否在developers组中,不在要重开shell,添加操作才生效,或者还有其它办法,有待发现3. 创建svn仓库目录
# mkdir -p /usr/local/svn/repos/
#chown -R :developers /usr/local/svn/repos //修改所属组
# chmod 775 -R /usr/local/svn/repos //添加developers组写权限
4. 创建svn仓库
# svnadmin create /usr/local/svn/repos/test
5. 修改权限 conf/svnserve.conf
[general]
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
conf/passwd
[users]
username = password
* = *
conf/authz
[groups]
@developers = username, ...
[/usr/local/svn/repos/test]
@developers = rw
username = r/w/rw
* = r
[test:/usr/local/svn/repos/test]
@developers = rw
username = r/w/rw
* = r
[color=red]注: 修改权限没什么效果,可能配置出错了[/color]
然后就可以使用svn co/ci/diff/stat等命令了