ubuntu14.04+svn

1.安装软件
apt-get install subversion

2.创建SVN库,最好使用root用户,否则其他的用户会引发一些权限问题
mkdir /home/svn

3.创建svn仓库
svnadmin create /home/svn/project 此时project下面会多出几个文件

4.进行读写授权
chmod -R 777 /home/svn/project   否则在代码提交的时候会出现commit failed !can't open file '/home/fruits/svn/projects/code/testsvn/db/txn-current-lock'!

5.进入到svn的配置目录cd conf
root@ubuntu-14:/home/svn/project# cd conf 

6.添加用户
root@ubuntu-14:/home/svn/project/conf# vim authz
[aliases]
[groups] #用户分组
# harry_and_sally=harry,sally
# harry_sally_and_joe=harry,sally,&joe
admin=name1,name2    
test=testname
[/] #组赋予读写权限的设置
@admin=rw
@test=r
还可以设置具体的目录权限
[/projectname/目录/子目录]

7.设置用户密码
root@ubuntu-14:/home/svn/project/conf# vim passwd

[users]
# harry = harryssecret
# sally = sallyssecret
name1=123456
name2=123456

testname=123456


8.配置访问权限
root@ubuntu-14:/home/svn/project/conf# vim svnserve.conf
 
[general]
### The anon-access and auth-access options control access to the
### repository for unauthenticated (a.k.a. anonymous) users and
### authenticated users, respectively.
### Valid values are "write", "read", and "none".
### Setting the value to "none" prohibits both reading and writing;
### "read" allows read-only access, and "write" allows complete
### read/write access to the repository.
### The sample settings below are the defaults and specify that anonymous
### users have read-only access to the repository, while authenticated
### users have read and write access to the repository.
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
### directory containing this file. The specified path may be a
### repository relative URL (^/) or an absolute file:// URL to a text
### file in a Subversion repository. 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

相关操作命令

停止Subversion服务器

killall svnserve

启动Subversion服务器 对于单个代码仓库,启动命令:
svnserve -d -r /home/svn --listen-host 10.19.3.103 
其中-d表示在后台运行,-r指定服务器的根目录,这样访问服务器时就可以直接 用svn://服务器ip+/project来访问了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值