Install and configure SVN under Ubuntu server10.10

Source: Internet
Author: User
Step 1: Install apache2 libapache2-svn Subversion
Sudo apt-Get install apache2
Sudo apt-Get install Subversion
Sudo apt-Get install libapache2-svn

Follow the prompts after installation
Run '/etc/init. d/apache2 restart' to activate new configuration!
Restart apache2
Step 2: Create the svn library and Project
Sudo mkdir/home/SVN // Create a SVN Library
Sudo svnadmin create/home/SVN/Project // Create a project
Step 3: Create a group and add members
Sudo addgroup Subversion // Create a group named subversion as the directory that owns the Repository
System prompt: Adding group "Subversion" (GID 1001 )...
Complete.
Sudo usermod-G subversion-a WWW-Data // Add yourself and the "www-Data" (Apache user) to the group members
View: More/etc/group | grep Subversion
System prompt:Subversion: X: 1001: www-Data
Step 3: Modify project Permissions
Sudo chown-r root: Subversion/home/SVN/Project
Sudo chmod-r g + RWS/home/SVN/Project // Grant the group members the corresponding permissions on all files added to the file warehouse.
View the permissions, users, and group information of the txn-current-lock file.
Ls-L/home/SVN/myproject/DB/txn-current-Lock
System prompt: -RW-rwsr -- 1 root subversion 0/home/SVN/project/DB/txn-current-Lock
Step 4: access the database through commands
Sudo SVN Co file: // lodalhost/home/SVN/Project // The first method, used to know the host name
Sudo SVN Co file: // home/SVN/Project // The second method is used when you are not sure about the host's life. File :/// , Three slashes
System prompt : Version 0 is retrieved. .
The version can be retrieved, indicating that the svn server is running normally. Visit WebDAV in the next interview.
Step 5: Configure apache2
Modify/etc/apache2/mod-available/dav_svn.conf
Sudo Vim/etc/apache2/mod-available/dav_svn.conf
Add the following Code :
======================================
<Location/SVN/Project>
Dav SVN
Svnpath/home/SVN/myproject
Authtype basic
Authname "project subversion repository"
Authuserfile/etc/subversion/passwd
<Limitaskt get PROPFIND Options Report>
Require valid-user
</Limit10000t>
</Location>
If you need to verify the user password each time you log on, comment out the two lines <limitverification t get PROPFIND Options Report> and </limit#t>.
Restart apache2 after adding the code
======================================
Step 6: Create the/etc/subversion/passwd file, which contains the details of user authorization.
Add User

Sudo htpasswd-C/etc/subversion/passwd [user_name] // The first time you add a user to use the "-c" parameter, you will not need to add it again.
Access a File Repository
SVN Co http: // hostname/SVN/Project project -- username [username]

OK! This time, I accessed the version library through the web page. Next I will interview you to import the version library.
Import version Library
Import the content under/var/www/to the version number:
Sudo SVN import-M "first import"/var/WWW http: // 192.168.0.5/SVN/Project
==========================================================
system prompt:
Certification field: myproject subversion repository
"root" Password:
Certification domain: myproject subversion repository
User Name: test
"test" Password:
added/var/www/index.html
-----------------------------------------------------------------------
note! Your password, for the authentication domain:
myproject subversion repository
can only be stored on the disk in plain text! If possible, configure your system so that subversion
can save the encrypted password. See the documentation for details.
you can go to "/home/icedot /. in subversion/servers, set "store-plaintext-passwords" to "yes" or "no".
.
-----------------------------------------------------------------------
Save the Unencrypted Password (Yes/No )?
enter 'yes' or 'no': Yes

the submitted version is 1.
================================================= =====< br> Finally, access the website through tortoisesvn and web pages in windows, successful.
================================================= =====< br> errors that have occurred during the test
check out version library error:
sudo SVN Co http: // 192.168.0.5/home/SVN/project
SVN: The Options method fails with "http: // 192.168.0.5/home/SVN/myproject ": 200 OK (http: // 192.168.0.5)
this error was found on the internet for a long time, and there was nothing to learn from. What I vaguely felt was that the user name and permissions were incorrect, to be confirmed later
sudo SVN Co file: // localhost/home/SVN/project
SVN: cannot open ra_local session for URL
SVN: cannot open version library "file: // localhost/home/SVN/projcet "
the error message must be the same as the previous one, with a higher level of permission, confirm after the test

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.