1. preparations are available in CentOS5 or Fedora8. httpd and subversion are installed by default. To access svn through the web, apache mod_dav_svn and mod_authz_svn modules are also required. If they are not loaded, reinstall them. 2. create a repository mkdir/home/svnreposvnadmincreate -- fs-typefsfs/home/svnrepo/ecshopsvnadmincreate
1. Preparations
In CentOS5 or Fedora 8, httpd and subversion are installed by default. apache mod_dav_svn and mod_authz_svn modules are also required to access svn through the web. If they are not loaded, reinstall them;
2. Create a repository
Mkdir/home/svnrepo
Svnadmin create -- fs-type fsfs/home/svnrepo/ecshop
Svnadmin create -- fs-type fsfs/home/svnrepo/discuz6
Chmod 700/home/svnrepo
3. Add a user
// Create the MD5 encrypted password file authfile,-c: create,-m: Encrypted with MD5
Htpasswd-c-m/home/svnrepo/authfile pujing
// Add a second user
Htpasswd-m/home/svnrepo/authfile bushi
4. Permission assignment
# Vi/home/svnrepo/authz. conf
[Ecshop:/]
Bushi = r
Pujing = rw
[Discuz6:/]
Bushi =
Pujing = r
# [/]
# * = R
# [Groups]
# Svn1-developers = bushi, pujing
# Svn2-developers = bushi
# [Svn1:/]
# @ Svn1-developers = rw
5. Configure apache
# Vi/etc/httpd/conf/httpd. conf
Add the last or last part of Loadmodule
DAV svn
SVNParentPath/home/svnrepo/
AuthzSVNAccessFile/home/svnrepo/authz. conf
AuthType Basic
AuthName "svn repository"
AuthUserFile/home/svnrepo/authfile
Require valid-user
# Service httpd restart
6. import the file to the version Repository
Svn import-m "the first import"/var/www/html/ecshop file: // home/svnrepo/ecshop
7. Access
Http: // 192.168.1.139/svn/ecshop
8. commit to the version library and update the web test environment
# Cd/home/svnrepo/ecshop/hooks
# Cp post-commit.tmpl post-commit // remove. tmpl.
# Chmod 755 post-commit
# Vi post-commit
// Add three lines at the end of the post-commit File
SVN =/usr/bin/svn
WEB =/home/website/ecshop
$ SVN update -- username pujing -- password 123456 $ WEB
9. Others.