Svn (subversion) is a version management tool that has emerged in recent years and is the successor of cvs. Currently, most open-source software uses svn as the code version management software.
The following describes how to install the subversion.
1. Install subversion, Apache, and svn extensions.
If you directly use Centos to install the package in the source, the dependency is automatically resolved.
Yum install subversion httpd mod_dav_svn-y
2. Set startup.
Pass
[Root @ bak var] # chkconfig -- list | grep svn
Svnserve 0: close 1: close 2: Close 3: close 4: Close 5: close 6: Close
[Root @ bak var] #
We can see that svnserve has already appeared.
We can use the following method to set the startup mode.
[Root @ bak var] # chkconfig svnserve on
[Root @ bak var] # chkconfig -- list | grep svn
Svnserve 0: disable 1: disable 2: Enable 3: Enable 4: enable 5: Enable 6: disable
[Root @ bak var] #
After setting, check again. The running levels 2, 3, 4, and 5 are started by default.
This ensures that the svn service is directly started after the server is started.
Set apache in the same way.
[Root @ bak test] # chkconfig httpd on
3. Enable and disable Subversion.
Pass
[Root @ bak var] # service svnserve
Usage:/etc/init. d/svnserve {start | stop | status | restart | condrestart | try-restart | reload | force-reload}
We can see that the/etc/init. d/svnserve script provides the above functions, such as starting, stopping, viewing status, and re-configuring.
We can directly use the following method to manage the svnserve service:
Service svnserve start service
Service svnserve stop service
Apache management is the same as above.
4. Configure svn for http access.
Modify the httpd configuration file/etc/httpd/conf/httpd. conf
The following configuration is directly added at the end of the configuration file:
<Location/svn>
DAV svn
SVNParentPath/var/cvs # sets this directory as the svn directory.
SVNListParentPath on
</Location>