你的位置:首页 > 操作系统

[操作系统]Linux Apache SVN


yum install mod_dav_svn subversion  httpd

mkdir /var/www/svn
svnadmin create /var/www/svn/puppet
cd /var/www/svn/
chown -R apache.apache puppet
cp puppet/authz ./
htpasswd -c passwd lanxiong
vim authz
[groups]
admin=lanxiong,sawyer
[/]
#[/] 相当于/var/www/svn这个目录,赋予权限给用户组
@admin=rw

httpd subversion.conf
<Location /repos>
    DAV svn
    SVNParentPath /var/www/svn
    AuthType Basic
    AuthName "Authorization SVN"
    AuthzSVNAccessFile "/var/www/svn/authz"
    AuthUserFile "/var/www/svn/passwd"
    Require valid-user
</Location>
httpd restart

[root@ps puppet]# svn ci -m "skdkfads"
Sending        lanxiong
Transmitting file data .
Committed revision 13.

Warning: post-commit hook failed (exit code 1) with output:
svn: E155004: Working copy '/etc/puppetlabs/code/environments/dev/modules/puppet' locked.
svn: E155004: '/etc/puppetlabs/code/environments/dev/modules/puppet' is already locked.
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
### 目录改为 chown -R apache.apache  xxx