Install SVN under Ubuntu Server 10

Source: Internet
Author: User

There are many articles on the Internet for reference. Installing Svn in Ubuntu is indeed simple.

 

1. Installation

Sudo apt-Get install Subversion

 

2. Create a repository

Sudo mkdir/var/SVN

Sudo svnadmin create/var/SVN

Sudo chmod-r a + w/var/SVN/DB # this is very important. Otherwise, permission issues may occur.

 

3. modify the configuration file (the location of the configuration file varies with the location of the Repository)

Sudo VI/var/SVN/CONF/svnserve. conf

 

# Remove # Before [general]

[General]

# Anonymous access permission, which can be read, write, or none. The default value is read.

Anon-access = none

# Authenticate the user's permissions, which can be read, write, or none. The default value is write.

Auth-access = write

# Remove the path of the password database #

Password-DB = passwd

Note: All rows must have the top level; otherwise, an error is returned. Suggestion: to prevent unnecessary errors, we recommend that you overwrite the original content of the file with the content above.

 

4. Change the password file passwd

Sudo VI/var/SVN/CONF/passwd

[Users]

Svnuser = Password

 

5. Start the service

Svnserve-d-r/var/SVN

 

Svnserve -- Help

Usage: svnserve [-d |-I |-T |-x] [Options]

 

Valid options:

-D [-- daemon]: daemon mode

-I [-- inetd]: inetd Mode

-T [-- tunnel]: tunnel mode

-X [-- listen-once]: Listen-once mode (useful for debugging)

-R [-- root] Arg: Root of directory to serve

-R [-- Read-Only]: force read only, overriding repository Config File

-- Config-file Arg: Read configuration from file ARG

-- Listen-port Arg: Listen Port

[Mode: daemon, listen-Once]

-- Listen-host Arg: Listen hostname or IP address

[Mode: daemon, listen-Once]

-T [-- threads]: Use threads instead of fork [mode: Daemon]

-- Foreground: Run in foreground (useful for debugging)

[Mode: Daemon]

-- Log-file Arg: svnserve Log File

-- PID-file Arg: Write server process ID to file ARG

[Mode: daemon, listen-Once]

-- Tunnel-user Arg: Tunnel username (default is current UID's name)

[Mode: Tunnel]

-H [-- help]: display this help

-- Version: show program version information

OK. You can test it!

 

 

Others

1. Disable SVN:

Killall svnserve

 

2. Multiple IP addresses

Svnserve-d-r/var/SVN -- listen-Host IP

 

3. The default SVN port is 3690.

 

4. Set startup

Sudo VI/etc/init. d/svnd. Sh

The content is as follows:

#! /Bin/bash
# Svnserve startup
Svnserve-d-r/var/SVN

 

Run the script and set it to self-start.

Update-rc.d svnd. Sh defaults

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.