UbuntuServer12.04 install SVN and migrate VirtualSVN data

Source: Internet
Author: User
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.