1. First, install the required software. Run the following command on the Unbuntu to install the Subversion, Apache2, and the connection driver module. Sudoapt-getinstallsubversionlibapache2-svnapache22, enable SSL to make it valid: sudoa2enmodsslsudoecho "Listen443" & gt;/etc/apache2/port
1. First, install the required software. Run the following command on the Unbuntu to install the Subversion, Apache2, and the connection driver module.
Sudo apt-get install sub version libapache2-svn apache2
2. Enable SSL to make it valid:
Sudo a2enmod ssl
Sudo echo "Listen 443">/etc/apache2/ports. conf
3. generate an SSL encryption certificate:
Sudo apache2-ssl-certificate
This operation involves a lot of questions based on the command line method, as long as any input, the purpose is to generate a unique Certificate
4. Create a new virtual host in apache to access the content in the svn repository through the web.
Copy an existing apache Virtual Host Configuration File and edit it. The virtual host configuration file name is assumed to be svn:
Cp/etc/apache2/sites-available/default/etc/apache2/sites-available/svn
Edit it:
Vim/etc/apache2/sites-available/svn
Make the following modifications and additions:
Namevirtualhost*: 443
SSLEngine
SSLCertificateFile/etc/apache2/ssl/apache. pem
SSLProtocol all
SSLCipherSuite HIGH: MEDIUM
......
5. Make the VM take effect:
A2ensite svn
/Etc/init. d/apache2 restart
6. Create a SVN Repository file library
Sudo mkdir/var/svn
Sudo svnadmin create/var/svn/newRepo
Sudo chown-R www-data: www-data/var/svn/newRepo
Chmod-R g + ws/var/svn/newRepo
7. Set access permissions for SVN Repository Archives
Sudo htpasswd2-c-m/etc/apache2/dav_svn.passwd Username
This command adds the "user name" to the permission list
8. Modify the WebDAV and SVN configurations to make the permission settings valid.
Add the following content to the/etc/apache2/mod-available/dav_svn.conf file:
DAV svn
SVNParentPath/var/svn
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile/etc/apache2/dav_svn.passwd
Require valid-user
SSLRequireSSL
If anonymous access is not allowed, comment out the following content:
#
#
9. Restart apache!
Sudo/etc/init. d/apache2 restart