Chinaunix首页 | 论坛 | 博客
  • 博客访问: 322954
  • 博文数量: 25
  • 博客积分: 3090
  • 博客等级: 中校
  • 技术积分: 1305
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-27 17:59
文章分类

全部博文(25)

文章存档

2012年(1)

2011年(1)

2010年(4)

2009年(5)

2008年(14)

我的朋友

分类:

2008-04-27 22:28:15

How to setup SVN using HTTPS on FC5

I got my latest SVN 1.3.2 working on FC5 with Apache 2.2.0 over SSL,
so decided to just share the same with all.
Here we go,

1) To install SVN do
yum install subversion.

2) To create a SSL certificate for Apache do -
Step one - create the key and request:
openssl req -new > new.cert.csr

Step two - remove the passphrase from the key (optional):
openssl rsa -in privkey.pem -out new.cert.key

Step three - convert request into signed cert:
openssl x509 -in new.cert.csr -out new.cert.cert -req -signkey new.cert.key -days 1024
place the keys to following locations & edit the /etc/httpd/conf.d/ssl.conf as follows -

SSLCertificateFile /etc/pki/tls/certs/new.cert.cert
SSLCertificateKeyFile /etc/pki/tls/private/new.cert.key

Test the certificate.

3) create /home/subversion/repository & /home/subversion/permissions

chown -R apache:apache /home/subversion/repository
svnadmin create /home/subversion/repository
svn import /tmp/project1 file:///home/subversion/repository/project1 -m "initial import"
svn checkout file:///home/subversion/repository/project1 project1

4) Edit httpd.conf as follows

LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule dav_module modules/mod_dav.so
LoadModule authz_svn_module modules/mod_authz_svn.so


DAV svn
SVNPath /home/subversion/repository/
# our access control policy
AuthzSVNAccessFile /home/subversion/permissions/svnauthorz.conf
#how to authenticate the users
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /var/www/.htpasswd
# only authenticated users access the SVN
Require valid-user
SSLRequireSSL


use following command to create users for authentication
htpasswd /var/www/.htpasswd john
& put following style entry in svnauthorz.conf
[/]
john = rw
liza = r


thats it, restart the httpd service & your SVN is ready to use for developers.
阅读(852) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~