Install and configure SVN in UbuntuServer10.10

Source: Internet
Author: User
Environment: Ubuntu10.10Vartualbox4.02UbuntuServer10.10-32bit Step 1: Install the apache2libapache2-svnsubversionsudoapt-getinstallapache2sudoapt-getinstallsubversionsudoapt-getinstalllibapache2-svn Environment: Ubuntu 10.10 Vartualbox4.02 Ubuntu Server 10.10-32bit

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:
======================================

DAV svn
SVNPath/home/svn/myproject
AuthType Basic
AuthName "project subversion repository"
AuthUserFile/etc/subversion/passwd

Require valid-user


If you need to verify the user password every time you log on And Comment out two lines
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 -- 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 field: Myproject subversion repository
User name: test
Password for "test:
Add/var/www/index.html
-----------------------------------------------------------------------
Note! Your password, for the authentication domain:
Myproject subversion repository
Only files on disks can be stored in plain text! If possible, consider configuring your system to make Subversion
You can save the encrypted password. See the documentation for details.
You can set the option "store-plaintext-passwords" to "yes" or "no" in "/home/icedot/. subversion/servers ",
To avoid this warning again.
-----------------------------------------------------------------------
Save Unencrypted Password (yes/no )?
Enter 'yes' or 'no': yes

The submitted version is 1.

========================================================== =
Finally, access via TortoiseSVN and web pages in windows.
========================================================== =
Errors that have occurred during the test
An error occurred when checking out the version Library:
Sudo svn co http: // 192.168.0.5/home/svn/project
Svn: method OPTIONS failed on "http: // 192.168.0.5/home/svn/myproject": 200 OK (http: // 192.168.0.5)

This error has been found on the internet for a long time, and there is no reference to it. The vague perception may be that the user name and permissions are incorrect and will be confirmed later.
Sudo svn co file: // localhost/home/svn/project
Svn: The ra_local session cannot be opened for the URL.
Svn: Unable to open the version library "file: // localhost/home/svn/projcet"
This error should be the same as the previous one. The user's permissions are more problematic and will be confirmed after the trial.

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.