SVN with Apache under Centos6.6

1. Install svn and Apache
yum install -y httpd httpd-devel subversion mod_dav_svn
2. Make sure the svn module has been installed: mod_dav_svn          
#cd /etc/httpd/modules           
#ls | grep svn
mod_authz_svn.so
mod_dav_svn.so
3. Confirm that it has been installed svn
#svn- -version
4.SVN configuration
Go to the /etc/httpd/conf.d directory to open the subversion.conf configuration file with vim to modify the options.
The configuration of the module must ensure that the following two sentences exist in the configuration file, otherwise you cannot access the svn warehouse
LoadModuledav_svn_module modules/mod_dav_svn.so
LoadModuleauthz_svn_module modules/mod_authz_svn.so
5. Svn warehouse configuration
# mkdir -p /home/svn
# cd /home/svn
# svnadmin create myapp
# chown -R apache .apache myapp $apache is the default user for the httped service
# vi /etc/httpd/conf.d/subversion.conf Add the following configuration
LoadModuledav_svn_module modules/mod_dav_svn.so
LoadModuleauthz_svn_module modules/mod_authz_svn.so
<Location /svn>
DAV svn SVNParentPath
/svn repository directory
SVNListParentPath on Use multi-repository
AuthType Basic
AuthName " Authorization Realm"
AuthUserFile /home/svn/svn/httpdpasswd User file used by
AuthzSVNAccessFile /home/svn/authz User configuration used by
Require valid-user Users need to be authenticated to log in
</Location>
6. Establish Apathce accessible user information
# htpasswd -c /var/svn/passwd Justin //Create a httpd user, the first time you use it, you need to use the -c option
# servicehttpd restart
7. Create user information that can access svn
There is a passwd file under the created SVN warehouse myapp/conf/passwd. By editing the file, create user information, and configure the user password passwd.
8. Permission control authz
configuration There are An authz file, configure user permissions
9. Start svn
svnserve -d -r /home/svn/myapp
ps aux | grep svn

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327068788&siteId=291194637