安装SVN的学习

1.服务端安装

[root@localhost ~]# yum install subversion -y

创建版本库

[root@localhost ~]# mkdir -p /data/svnroot/myproject
[root@localhost ~]# svnadmin create /data/svnroot/myproject
[root@localhost ~]# cd !$
cd /data/svnroot/myproject
[root@localhost myproject]# 

编辑配置文件

[root@localhost]#cd conf/
vi authz

[groups]
添加admins =lsk,user1
在最后添加
[/] (根路径指相对路径)
@admins=rw (admins的用户组的权限)
*=r (除了admins用户组所有都拥有可读权限)

[myproject :/]

user1 =rw
设置用户密码
[root@localhost conf]# vi passwd
[users]
添加lsk=lsk000
user1=user1000
user2=user2000
[root@localhost conf]# vi svnserver.conf
在 [general]下添加
anon-access = none (匿名用户,没有权限)
auth-access = write(授权用户拥有写的权限)
password-db = passwd
authz-db = authz
realm = /data/svnroot/myproject(生效路径)
启动
[root@localhost conf]# svnserve -d -r /data/svnroot/ (-d后台启动,-r指定目录)
拉取项目

[root@localhost opt]# svn checkout svn://192.168.100.20/myproject --username=lsk
Authentication realm: <svn://192.168.100.20:3690> /data/svnroot/myproject
Password for 'lsk': 
Authentication realm: <svn://192.168.100.20:3690> /data/svnroot/myproject
Username: lsk
Password for 'lsk': 

-----------------------------------------------------------------------
ATTENTION!  Your password for authentication realm:

   <svn://192.168.100.20:3690> /data/svnroot/myproject

can only be stored to disk unencrypted!  You are advised to configure
your system so that Subversion can store passwords encrypted, if
possible.  See the documentation for details.

You can avoid future appearances of this warning by setting the value
of the 'store-plaintext-passwords' option to either 'yes' or 'no' in
 '/root/.subversion/servers'.
-----------------------------------------------------------------------
Store password unencrypted (yes/no)? yes
Checked out revision 0.

可以看到当前目录下的文件

[root@localhost opt]# ls
centos  myproject

查看

[root@localhost myproject]# ll -a
total 0
drwxr-xr-x. 3 root root 17 Mar  2 04:39 .
drwxr-xr-x. 4 root root 35 Mar  2 04:39 ..
drwxr-xr-x. 4 root root 70 Mar  2 04:39 .svn
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值