Install the subversion and the corresponding apache module, assuming we have installed the server, to participate in Server Installation section $ sudoapt-getinstallsubversion $ sudoapt-getinstalllibapache2-svn to create a version library, and add a group of subversion, add the user to the group because the default apache Group user in Ubuntu is www-data $ sudoaddgroup.
Install the subversion and the corresponding apache module. Assume that the server has been installed.
$ Sudo apt-get install subversion
$ Sudo apt-get install libapache2-svn
Create a version library, add a group of subversions, and add users to the group, because the default apache Group user in Ubuntu is www-data.
$ Sudo addgroup subversion
$ Sudo usermod-G subversion-a www-data
Create svn version Library
$ Sudo mkdir/home/svn
$ Cd/home/svn
Create an SVN File Repository
$ Sudo svnadmin create/home/svn/myproject
Grant the group members the following permissions to all new files added to the File Repository:
$ Sudo chmod-R g + rws myproject
$ Sudo chown-R root: subversion myproject
Access Method
File: // directly access the file repository on the local hard disk
Http: // use the WebDAV protocol to access Apache 2 Web servers that support Subversion.
Https: // similar to http: //, supports SSL encryption
Svn: // access the svnserve server through the built-in protocol
Svn + ssh: // similar to svn: //, supports the SSH Channel
You can perform this operation when testing on the server.
$ Svn co file: // home/svn/myproject
Or
$ Svn co file: // localhost/home/svn/myproject
If so, you can perform remote operations to achieve collaborative development. You must add the following code snippets to your/etc/apache2/mod-available/dav_svn.conf file, which can also be used in http. conf.
DAV svn
SVNPath/home/svn/myproject
AuthType Basic
AuthName "test"
AuthUserFile/etc/subversion/passwd
Require valid-user
Next, you need to create the/etc/subversion/passwd file, which contains the details of user authorization. To add a user, run the following command:
Sudo htpasswd-c/etc/subversion/passwd user_name
Then you can use the following command to access $ svn co http: // hostname/svn/myproject -- username user_name. On windows, you can install the subversion client for testing. After importing the project, you can use svn log to check whether user_name has done anything. So far, a svn server for collaborative development has been successfully built.
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2