已安装:
安装文档参考: Installaction - Httpd 。
安装文档参考该文档附录: Neon的安装。
从subversion.tigris.org 下载 subversion-1.5.5.tar.bz2安装包。
shell> ./configure \
--prefix=/work/tools/subversion \
--with-apxs=/work/tools/apache2/bin/apxs \
--with-apr=/work/tools/apache2 \
--with-apr-util=/work/tools/apache2 \
--with-neon=/usr/local \
--with-ssl
shell> make
shell> make install
shell> vi /etc/profile
SVN_HOME=/work/tools/subversion
PATH=$SVN_HOME/bin:$PATH
export $PATH
shell> source /etc/profile
shell> mkdir -p /work/repositories
shell> svnadmin create --fs-type fsfs /work/repositories/repo1
shell> cd /work/tools/apache2
shell> vi conf/httpd.conf
<Location /svn> DAV svn SVNListParentPath on SVNParentPath /work/repositories AuthType Basic AuthName "Hillmover Code Repositories" AuthUserFile svnpasswd AuthzSVNAccessFile svnaccess Require valid-user </Location>
shell> bin/htpass -c svnpasswd scm
New password: xxxx
Re-type new password: xxxx
shell> bin/htpass svnpasswd hillmover
New password: xxxx
Re-type new password: xxxx
shell> bin/htpass svnpasswd anotherDev1
...
shell> bin/htpass svnpasswd guest
...
shell> vi svnaccess
[groups] admin = scm dev = hillmover, anotherDev1 # Default access rule for ALL repositories # Everyone cannot access, admins can read/write. [/] * = @admin = rw # Allow developers complete access to their project repos [repo1:/] @dev = rw
shell> service httpd restart
Case 1:
摘要:用户hillmover可以读写代码库repo1。 步骤: 1. User opens the web browser(IE/Firefox), go to page: http://localhost/svn/repo1/ 2. Web browser pop-ups a dialog for authentication 3. User inputs 'hillmover '/'password' 期望结果: 1. Web browser displays the contents of repo1.
Case 2:
摘要:用户guest不可以读/写代码库repo1。 步骤: 1. User opens the web browser(IE/Firefox), go to page: http://localhost/svn/repo1/ 2. Web browser pop-ups a dialog for authentication 3. User inputs 'guest '/'password' 期望结果: 1. Web browser displays a warning about failed authentication, and no any contents of repo1 are displayed.