subversion svn

subversion

如何在Fedora 5 安装subversion Apache 2.2-----How to setup SVN using HTTPS on FC5

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

<Location /svn>
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
</Location>

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.

Regards

posted on 2006-09-11 22:21 subversion 阅读(1009) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。