apt-get install subversion libapache2-svn apache2
addgroup subversion
usermod -G subversion -a www-data
useradd svn
usermod -G subversion -a svn
mkdir -p /opt/svn/repository
cd /opt/svn/repository
svnadmin create proj1
chown -R svn:subversion proj1
cd proj1/conf/
vi svnserve.conf
末尾添加
anon=none
auth=write
passwd-db=passwd
vi /opt/svn/repository/proj1/conf/passwd
添加账户:lichengyuan=123456
vi /etc/apache2/mods-enabled/dav_svn.conf
末尾添加
<Location /svn/proj1>
DAV svn
SVNPath /opt/svn/repository/proj1
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /opt/svn/repository/proj1/conf/passwd
Require valid-user
<IfModule mod_authz_svn.c>
AuthzSVNAccessFile /etc/apache2/dav_svn.authz
</IfModule>
</Location>
htpasswd -c /opt/svn/repository/proj1/conf/passwd lichengyuan
vi /etc/apache2/dav_svn.authz
[groups]
admin=lichengyuan
other=liuwenjia
[proj1:/]
@admin=rw
@other=r
service apache2 restart
问题1:Can't open file '/opt/svn/repository/mahua/db/txn-current-lock': Permission
解决方法:/opt/svn/repository/下执行
chmod -R g+w ./*