首页 > 技术 > linode vps ubuntu 安装subversion

linode vps ubuntu 安装subversion

2012年5月14日 发表评论 阅读评论

root@li385-186:/home# sudo apt-get install subversion

root@li385-186:/home# sudo apt-get install libapache2-svn

root@li385-186:/home# cd /home/

root@li385-186:/home# mkdir svn

root@li385-186:/home# chown root:www-data svn -R

root@li385-186:/home# chmod u+s svn -R

root@li385-186:/home# chmod g+s svn -R

root@li385-186:/home# chmod 770 svn -R

root@li385-186:/home/svn# svnadmin create hct

root@li385-186:/home/svn# chmod g+ws hct -R

root@li385-186:/home/svn# vi /etc/apache2/mods-enabled/dav_svn.conf
加入以下内容


DAV svn
SVNPath /home/svn/hct
AuthType Basic
AuthName "hct Subversion Repository"
AuthUserFile /etc/subversion/passwd
AuthzSVNAccessFile /etc/subversion/access
#
Require valid-user
#

添加用户:
root@li385-186:/home/svn# sudo htpasswd -c /etc/subversion/passwd hct
New password:
Re-type new password:
Adding password for user hct
root@li385-186:/home/svn# vi /etc/subversion/access
加入内容

[groups]
admin = chenhe
# Default access rule for ALL repositories
# Everyone can read, admins can write, Dan German is excluded.
[/]
* = r
@admin = rw
# Allow developers complete access to their project repos
[hct:/]
@admin = rw

重启apache即可

root@li385-186:/home/svn# /etc/init.d/apache2 restart

现在建立了hct repository 和 hct开发者需要密码访问hct repository

分类: 技术 标签: ,
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.