UbuntuServer12.04 install SVN and migrate VirtualSVN data
Install SVN in Ubuntu Server 12.04 and migrate Virtual SVN data
For details, refer to http://www.linuxidc.com/linux/2013-05/84693.htm.
1. install apache
sudo apt-get install apache2
2. Install svn and the connected database
sudo apt-get install subversionsudo apt-get install libapache2-svn
3. added the svn user group to manage svn and add it to the apache Group of www-data:
sudo addgroup subversionsudo usermod -G subversion -a www-data
4. Create an svn repository file and initialize a repository for testing purposes (used later during migration)
# Generally, you can create a project repository to the/home/svn directory. # assume that the project name is temproj, first create an empty directory $ sudo mkdir/home/svn $ cd/home/svn $ sudo mkdir temproj $ sudo chown-R root: subversion temproj # create as svn project, run the following command $ sudo svnadmin create/home/svn/temproj # to grant the group members the corresponding permissions to all files added to the File Repository: # If the command order is incorrect, an error may be reported. Refer to the official wiki $ sudo chmod-R g + rws temproj.
5. Configure Apache.
# The File $ sudo vi/etc/apache2/mod-available/dav_svn.conf is automatically generated when the libapache2-svn is installed
#/Svn indicates http: // hostname/svn/DAV svn SVNParentPath/home/svn # configure the repository parent directory AuthType Basic AuthName "Tebs Svn Server" AuthUserFile/home/svn/htpasswd # svn user file, to facilitate migration, change the name to the same name as virtual svn. AuthzSVNAccessFile/home/svn/authz # authorize the Access File Require valid-user
Because the authorization module is used, you need to configure the verification module.
sudo vi /etc/apache2/mods-available/dav.load
# Add LoadModule authz_svn_module/usr/lib/apache2/modules/mod_authz_svn.so
6. Copy all the files in the Virtual SVN repository directory and convert the htpasswd and authz file formats to the unix format by using winscp or other tools, upload to the/home/svn directory
7. Copy the generated temproj directory to windows. After copying multiple copies, delete the db directory in the copy.
8. Copy the project's db folder in the Virtual SVN repository directory to the directory generated in step 1. Replace fsfs. conf in temproj \ db \ with the same location in all other directories.
9. Upload the adjusted repository directory to the/home/svn directory.
10. After the upload is complete, collectively change the user group and authorize
cd /home/svnsudo chgrp -R subversion .sudo chmod -R g+rws .
11. Restart apache
sudo service apache2 restart
So far, success...
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2