Ubuntu SVN installation documentary

Source: Internet
Author: User
Tags svn client fully qualified domain name
1. Run the command to install SVN server and apache: $ sudoapt-getinstallsubversion $ sudoapt-getinstalllibapache2-svn $ error occurred during sudoapt-getinstallapache2 Installation failed: unable to initiate connection with 8000: 80 (0.0.31.64)-connect (22: invalidargument) cannot download h

1. Run the following command to install the SVN server and apache:
$ Sudo apt-get install subversion
$ Sudo apt-get install libapache2-svn
$ Sudo apt-get install apache2

The following error occurs during installation:
Unable to initiate connection with 8000: 80 (0.0.31.64)-connect (22: Invalid argument)
Unable to download http://cn.archive.Ubuntu.com/ubuntu/pool/main/a/apache2/apache2-mpm-worker_2.2.14-5ubuntu8.3_i386.deb unable to initiate connection with 8000: 80 (0.0.31.64)-connect (22: Invalid argument)
Unable to download http://cn.archive.ubuntu.com/ubuntu/pool/main/a/apache2/apache2_2.2.14-5ubuntu8.3_i386.deb unable to initiate connection with 8000: 80 (0.0.31.64)-connect (22: Invalid argument)
Solution: the actual Website access file can be downloaded, so you can manually download the file and put it in the/var/cache/apt/archives directory, enter the installation command again.

2. Create an SVN Repository
Many locations can be placed in the Subversion File Repository, two of which are most commonly used:/usr/local/svn and/home/svn. To make it simple and clear in the following description, we assume that your Subversion File Repository is placed in/home/svn, and your project name is "myproject ".
Likewise, there are many common ways to set access permissions for a File Repository. However, this is also the most common cause of errors during the installation process, so we will provide a detailed description of this. In typical cases, you should create a group named "Subversion" to own the directory where the file warehouse is located. The following is a quick operation description. For more information, see the relevant documentation for details:
Choose system> System Management> users and groups from the Ubuntu menu ";
Switch to the "Group" label;
Click "add group". The group name is "subversion ";
Add yourself and "www-data" (Apache user) to the group members;
Click "OK" to confirm the modification and close the program.
You need to log out and then log on to the subversion group so that you can become a member of the subversion group. Then you can perform the Check in (also known as submitting a file) operation.

Run the following command:
$ Sudo mkdir/home/svn
$ Cd/home/svn
$ Sudo mkdir myproject
$ Sudo chown-R root: subversion myproject
$ Sudo chmod-R g + rws myproject
The last command grants the group members the corresponding permissions on all files added to the file warehouse.
The following command is used to create an SVN File Repository:
$ Sudo svnadmin create/home/svn/myproject


3. Configure WebDAV protocol access (http ://)
To access the SVN File Repository through the WebDAV protocol, you must configure your Apache 2 Web server. You must add the following code snippet to your/etc/apach2/apache2.conf file:

DAV svn
SVNPath/home/svn/myproject
AuthType Basic
AuthName "myproject subversion repository"
AuthUserFile/etc/subversion/passwd
Require valid-user

4. Start apache,
Error message:
Apache2: bad user name $ {APACHE_RUN_USER}
Solution:
1. Open the configuration file of apache2
# Sudo gedit/etc/apache2/apache2.conf
(I should have changed the envvars file, but I don't know why it works)
2. Modify the Default User Name and group
Find $ {APACHE_RUN_USER} and $ {APACHE_RUN_GROUP}
Replace it with your username and group, and save and exit.
Error message:
Httpd.exe: cocould not reliably determine the server's fully qualified domain name, using 192.168.1.111 for ServerName
Solution:
Because DNS is not configured properly. If you do not want to configure DNS, add ServerName localhost: 80 at the beginning of httpd. conf.
Error message:
Port occupied
Solution:
Netstat-lnp | grep 80, obtain the process ID
Kill ID

When you add the preceding content, you must restart the Apache 2 Web server. Enter the following command:
Sudo/etc/init. d/apache2 restart

5. access through the built-in protocol (svn ://)
When you create a SVN File Repository, you can modify/home/svn/myproject/conf/svnserve. conf to configure its access control.
For example, you can cancel the following annotator to set the authorization mechanism:
# [General]
# Password-db = passwd
Now, you can maintain the user list in the "passwd" file. Edit the "passwd" file in the same directory and add new users. Syntax:
Username = password
Now, you can run svnserver locally or remotely through svn: // when SVN is used, you can run svnserve. The syntax is as follows:
$ Svnserve-d -- foreground-r/home/sv
Access Error:
Svn:/home/svn/myproject/conf/svnserve. conf: 20: Option expected
Password-db = passwd cannot contain spaces.

6. Create the first project:
Svn import TescSvn/svn: // username @ localhost/myproject-m "initial import"
TescSvn is a local directory, which must contain three directories: trunk, branches, and tags. the others are empty. "svn: // username @ localhost/myproject" is the directory of the server and the secret name is used.
Then create a 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:
Htpasswd-c/etc/subversion/passwd user_name
It will prompt you to enter the password. When you enter the password, the user will establish it.

Retrieve project:
Svn: // localhost/myproject/home/hueylu/work/TescSvn2/-- username hueylu -- password ***** -- non-interactive

8. a svn client on the interface is recommended.
Esvn
sudo apt-get install esvn

The above configuration is passed in ubuntu10.04

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.