Content: Install software, create a repository, and configure Apache to provide HTTP access and user verification functions
Install necessary software:
yum install httpd mod_dav_svn subversion
Create an SVN Repository:
mkdir -p /srv/svn/svnadmin create /srv/svn/morris
Configure Apache:
# Grant chown-r Apache. apache/srv/SVN/Morris # configure the virtual host Vim/etc/httpd/CONF. d/subversion. conf # ----------------- edit content in VIM ------------ loadmodule dav_svn_module modules/mod_dav_svn.soloadmodule authz_svn_module modules/mod_authz_svn.so <virtualhost *: 80> serveradmin [email protected] # administrator email servername svn.example.com # bound domain name # Note !!!!! The Directory of the log file location must exist. Otherwise, Apache cannot start errorlog/srv/www/logs # customlog/srv/www/svn.example.com/logs/access.log combined # Log File Location # URL: bind the domain name +/Morris to the desired <location/Morris> Dav SVN svnpath/srv/SVN/Morris # repository location authtype basic authname "Subversion repository" # enter the user and the password prompts authuserfile/srv/www/users # User File require valid-user </location> </virtualhost> # ---------------------- Vim content ends ------------ # The role of creating user parameter C is to delete user htpasswd-CM/srv/www/svn.example.com/morris.htpasswd username # Add User htpasswd-M/srv/www/svn.example.com/morris.htpasswd username # restart Apache, in this way, you can see the log if there is an error during startup, facilitating debughttpd-K stophttpd-K start
Reference:
Http://wiki.centos.org/HowTos/Subversion
Https://www.linode.com/docs/applications/development/manage-source-code-versions-with-subversion
Centos installation and configuration Subversion