1.安装svn
代码语言:javascript复制sudo apt-get install subversion subversion-tools apache2 libapache2-svn apache2-utils
配置svn库:
代码语言:javascript复制sudo mkdir /data/svn/repository
sudo svnadmin create /data/svn/repository/$repo_name
sudo chown -R www-data:www-data /data/svn/repository
2, 设置http
修改vim /etc/apache2/mods-available/dav_svn.conf
ServerName <IP> <Location /svn/repos> DAV svn SVNPath /home/svn/repos AuthType Basic AuthName "project subversion repository" AuthUserFile /etc/subversion/passwd <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept> </Location>
3. 重启apache
/etc/init.d/apache2 restart