1. Introduction
What you want to build on CentOS is an HTTP access-based SVN Server.
2. Software Preparation
Install related software
Where Mod_dav_svn is a module of Apache server access to SVN
After the installation is complete, you can see if the installation was successful by the following command
Httpd-version
Svnserve–version
-----> Mod_authz_svn.so mod_dav_svn.so
3. Build the SVN server repository
Build the SVN repository with the following command
Mkdir/var/www/svn
Svnadmin Create/var/www/svn/workspace
Ls/var/www/svn/workspace
---> conf db format hooks Locks README.txt
Chown-r APACHE.APACHE/VAR/WWW/SVN
4. Configure SVN Server
Create user file passwd, and establish user admin and guest
touch/var/www/svn/passwd
HTPASSWD/VAR/WWW/SVN/PASSWD Admin
HTPASSWD/VAR/WWW/SVN/PASSWD Guest
Create a permissions file Authz
Cp/var/www/svn/workspace/conf/authz/var/www/svn/authz
Modify the/var/www/svn/authz so that it contains the following content
[/]
admin = RW
Guest = R
5. Configure httpd
Create a file/etc/httpd/conf.d/subversion.conf with the following content
loadmodule dav_svn_module modules/mod_dav_svn.soloadmodule authz_svn_module modules/mod_authz_svn .so<location/svn> DAV svn svnpath/var/www/svn svnlistparentpath on authtype Basic authname
"Authorization SVN" authuserfile/var/www/svn/passwd Authzsvnaccessfile/var/www/svn/authz Require Valid-user</location>
6. Start the service
If you have a firewall turned on, you need to turn on httpd access
Firewall-cmd--permanent--add-service=http
Firewall-cmd--permanent--add-service=https
Firewall-cmd--reload
By viewing the file/usr/lib/systemd/system/svnserve.service, you know that the Svnserver configuration file is/etc/sysconfig/svnserve
Modify/etc/sysconfig/svnserve
options= "-R/VAR/SVN" ======> options= "-R/VAR/WWW/SVN"
Enable the service with the following command
Systemctl Start Svnserve.service
Systemctl Start Httpd.service
Make it boot from the command
Systemctl Enable Svnserve.service
Systemctl Enable Httpd.service
7. Other configurations
The previously established SVN in the access first to httpd authentication, and then again SVN authentication, I expect HTTP for IP filtering, SVN requires user password authentication
Reference
<centos6.5 Build APACHE+SVN Environment >
<CENTOS7: Build svn + Apache server >
<install SVN Server on Fedora 23/22, Centos/rhel 7.2/6.7/5.11>
Build svn Server under CentOS