Subversion is an open-source version control system. The following describes how to install and configure Subversion in Ubuntu: 1. environment UbuntuLinux (11.x) + apache2 + Subversion (1.6.12) II. configuration 1. apt-get install svnkenchen @ ubuntu :~ $ Sudoapt-getinstallsubversionsubversion-tools
Subversion is an open-source version control system. The following describes how to install and configure it in Ubuntu:
I. Environment
Ubuntu Linux (11.x) + apache2 + Subversion (1.6.12)
Ii. Configuration
1. apt-get install svn
Kenchen @ ubuntu :~ $ Sudo apt-get install subversion-tools
2. apt-get install apache2
Kenchen @ ubuntu :~ $ Sudo apt-get install apache2 libapache2-svn
3. Create the svn directory (/home/svn) and configure the directory owner and permission to (www-data)
Kenchen @ ubuntu :~ $ Sudo mkdir/home/svn
Kenchen @ ubuntu :~ $ Sudo chmod www-data: www-data-R/home/svn/
Kenchen @ ubuntu :~ $ Sudo chmod 770-R/home/svn/
4. Create the svn user password configuration file:/etc/apache2/dav_svn.passwd
Kenchen @ ubuntu :~ $ Sudo htpasswd-c/etc/apache2/dav_svn.passwd kenchen
5. Create the svn directory permission configuration file:/etc/apache2/dav_svn.authz
Kenchen @ ubuntu :~ $ Sudo vi/etc/apache2/dav_svn.authz
# Define a group
[Groups]
Admin = kenche
Tests = pet
# Define the access permission for the root directory of the Repository
[Devroot:/] # configure the devroot permission of the version Library
* = # Access by all users is prohibited by default
@ Admin = rw # The admin group has read and write permissions.
Pet = r # user pet has read permission
6. Configure/etc/apache2/mod-enabled/dav_svn.conf
Kenchen @ ubuntu :~ $ Sudo vi/etc/apache2/mod-enabled/dav_svn.conf
DAV svn # Enabled
SVNParentPath/home/svn # Set the svn repository path
AuthType Basic # enable apache Basic verification
AuthName "Subversion Repository" # Set the verification box title
AuthUserFile/etc/apache2/dav_svn.passwd # specify the file name to verify the user
AuthzSVNAccessFile/etc/apache2/dav_svn.authz # enable directory-level authorization
Require valid-user
7. Create a svn repository (devroot)
Kenchen @ ubuntu :~ $ Su-www-data
Kenchen @ ubuntu :~ $ Svnadmin create/home/svn/devroot
8. The configuration is complete. Restart The apache2 service.
Kenchen @ ubuntu :~ $ Sudo apache2ctl restart
9. Now you can enter http: // 127.0.0.1/svn/devroot/in the browser to access