Tags:
create new tag
view all tags
-- Main.donal - 2011-11-29
steps to setup svn server on sl5.3 i366

SvnSetup

参考:http://www.startupcto.com/server-tech/subversion/setting-up-svn

edit /etc/yum.repos.d/sl.repo change baseurl

baseurl=http://mirror.ihep.ac.cn/scientific/53/$basearch/SL

install & config Apache server

yum install mod_dav_svn,mod_ssl

edit /etc/httpd/conf.d/subversion.conf, add:

<Location /svn>
    DAV svn
    SVNParentPath /svn
    AuthzSVNAccessFile /svn/svnaccess
    SSLRequireSSL
    AuthType Basic
    AuthName "SVN Repositorys"
    AuthUserFile /svn/.htpasswd
    Require valid-user
</Location>
ignore this and rm ssl.conf if you don't want https for apache

edit /etc/httpd/conf.d/ssl.conf, add:

SSLCertificateFile /etc/httpd/conf.d/server.crt
SSLCertificateKeyFile /etc/httpd/conf.d/server.key
SSLCertificateChainFile /etc/httpd/conf.d/ca.crt

create server.crt,server.key,ca.crt

cd /tmp/CA
openssl genrsa -des3 -out ca.key 1024 
openssl req -new -x509 -days 3650 -key ca.key -out ca.crt 
openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr
cp /etc/pki/tls/openssl.cnf ca.cnf
vim ca.cnf
>index.txt
echo '01' > serial
openssl ca -config ca.cnf -days 3650 -cert ca.crt -keyfile ca.key -in server.csr -out server.crt
cp server.crt server.key ca.crt /etc/httpd/conf.d/

Config SVN server

mkdir -p /svn/
svnadmin create --fs-type fsfs /svn/bdp
htpasswd -c /svn/.htpasswd Lily 
htpasswd /svn/.htpasswd Mark 

edit /svn/svnaccess

[aliases]
Lily = Lily Wang
Mark = Mark Jobs

[groups]
a_group = Lily ,Mark 

[/]
Lily= rw
* =  

[bdp:/]
@a_group = rw
* = r

import files

mkdir /tmp/bdp
mkdir /tmp/bdp/branches
mkdir /tmp/bdp/tags
mkdir /tmp/bdp/trunk
svn import /tmp/bdp file:///svn/bdp -m "initial import"
find /svn/bdp -type f -exec chmod 660 {} \;
find /svn/bdp -type d -exec chmod 2770 {} \;
chown -R root.apache /svn/bdp

restart apache

/etc/init.d/httpd restart
goto https://localhost/svn/bdp
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2011-12-26 - Donal
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback