Prerequisite: To install Apache and SVN server
SVN server-side installation record
http://alwaysyunwei.blog.51cto.com/3224143/1372377
Apache can be installed with Yum
Need to add SVN modules to Apache when consolidating Apache and SVN
[Email protected]_47_128_centos html]# yum install mod_dav_svn mod_auth_mysql [email protected]_47_128_centos modules ]# ls/etc/httpd/modules |grep svnmod_authz_svn.somod_dav_svn.so
This allows you to add SVN modules
Modifying the Apache configuration file
Vim/etc/httpd/conf/httpd.conf
LoadModule dav_svn_module modules/mod_dav_svn.soloadmodule authz_svn_module modules/mod_authz_svn.so<location/ home> DAV SVN svnpath/var/www/html/svna/home</location>
The project path for PS:SVN is
/var/www/html/svna/where home is the project repository content
Configure Restart HTTPD
Test access
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/45/CA/wKiom1PrSCjjq4phAADeZoBEiTg837.jpg "title=" 3.png " alt= "Wkiom1prscjjq4phaadezobeitg837.jpg"/>
Normal access
Now anyone in your repository can access it and have full write permissions. This means that anyone can read, modify, commit, and delete content from the repository anonymously. Obviously, most of the occasions this is not in line with demand. So how to set the permissions, Apache provides the basic permission settings:
[Email protected]_47_128_centos svna]# whereis htpasswd htpasswd:/usr/bin/htpasswd/usr/share/man/man1/ Htpasswd.1.gz[[email protected]_47_128_centos svna]# htpasswd-c/etc/svnpwd/svnpwdfile svnpwduser01htpasswd:cannot Create File/etc/svnpwd/svnpwdfile[[email protected]_47_128_centos svna]# mkdir/etc/svnpwd[[email protected]_47_128_ CentOS svna]# htpasswd-c/etc/svnpwd/svnpwdfile svnpwduser01new password:re-type new password:adding password for user Svnpwduser01[[email Protected]_47_128_centos svna]#
Continue to modify the httpd configuration file and add the following at the point where you just modified
AuthType basicauthname "svn repos" Authuserfile/etc/svnpwd/svnpwdfilerequire Valid-user
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/45/CC/wKioL1PrSdiDcyz6AACumq49vYo325.jpg "title=" 2.png " alt= "Wkiol1prsdidcyz6aacumq49vyo325.jpg"/>
Test access
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/45/CA/wKiom1PrSQaQvUXwAAFD9dBrpY4803.jpg "title=" 4.png " alt= "Wkiom1prsqaqvuxwaafd9dbrpy4803.jpg"/>
This adds the access restrictions
Resources
http://www.ibm.com/developerworks/cn/java/j-lo-apache-subversion/
http://blog.csdn.net/wangjingfei/article/details/5580295
Small ads
http://shop62632578.taobao.com/
This article is from the "Always_yunwei" blog, make sure to keep this source http://alwaysyunwei.blog.51cto.com/3224143/1539619