Ubuntu install SVN server and configure using http access

Install SVN Server
sudo apt-get update
sudo apt-get install subversion
sudo apt-get install apache2
sudo apt-get install libapache2-svn
Create SVN user group and add www-data group to this group
sudo addgroup subversion
sudo usermod -G subversion -a www-data
Create SVN folder
sudo mkdir /home/svn
Create SVN repository
cd /home/svn
sudo mkdir <repository_name>
sudo c
hown root:subversion <repository_name>
sudo chmod -R g+rws <repository_name>
Configure SVN

configure dav_svn.conf

vim /etc/apache2/mods-available/dav_svn.conf
#open the element "<Location /svn>" And "DAV svn"
#open the element "SVNParentPath" and change the value to /home/svn
#open element "AuthType Basic"
#open element 'AuthName "Subversion Repository'
#open element "AuthUserFile" and change the value to /etc/subversion/dav_svn.passwd
#open element "AuthzSVNAccessFile" and change the value to /etc/subversion/dav_svn.authz

configure dav_svn.passwd add one user jason

sudo htpasswd -c /etc/subversion/dav_svn.passwd jason
#continue to add new user without parameter -c
sudo htpasswd /etc/subversion/dav_svn.passwd salk

configure dav_svn.authz

vim /etc/subversion/dav_svn.authz

#fill below file content
[groups]
administrator=jason,salk

[<repository_name>:/]
@administrator=rw
Restart SVN server and Apache2
killall svnserve
svnserve -d -r /home/svn/
sudo a2enmod authz_svn
sudo /etc/init.d/apache2 restart

Issue List

TitleSolution
Change apache2 portmodify file “/etc/apache2/ports.conf”
Invalid command ‘AuthzSVNAccessFile’, perhaps misspelled or defined by a module not included in the server configurationexecute “sudo a2enmod authz_svn”
Access linkhttp://hostname:port/svn/reposity_name

Reference

在centos环境搭建svn服务器https://www.howtoforge.com/tutorial/how-to-setup-a-svn-server-on-centos-6/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值