Procedure
-
As user apache or as root, install the
httpd, mod_dav_svn and subversion
packages.
# yum install httpd mod_dav_svn subversion
-
Create an svn directory.
# mkdir /var/www/svn
-
Create an SVN repository.
# svnadmin create /var/www/svn/repository
-
Create a user name and a password.
# htpasswd -cmb /var/www/svn/passwd admin@company.com admin
-
Change the owner of the directory to apache.
# chown -R apache.apache /var/www/svn
-
Open the SVN configuration file.
# vim /etc/httpd/conf.d/subversion.conf
On CentOS 7, the name of the configuration file is 10-subversion.conf. The configuration file is located under the /etc/httpd/conf.modules.d folder -
Update is as follows:
<Location /svn> DAV svn SVNPath /var/www/svn/repository Require valid-user AuthType basic AuthName "Subversion" AuthUserFile /var/www/svn/passwd </Location>
-
Restart httpd.
# /etc/init.d/httpd start
- If you have SELinux (Security-Enhanced Linux) enabled on your system, see Handling "permission denied" error on SELinux.