Ubuntu installation SVN server step tutorial, unzip tusvn

Source: Internet
Author: User

Ubuntu installation SVN server step tutorial, unzip tusvn

Apache Subversion (SVN for short) is an open-source version control system. It uses a branch management system relative to the Cross-node Scripting (RCS) and CVS. Its design goal is to replace CVS. More and more control services on the Internet are transferred from CVS to Subversion.

First, download and install the svn server from the image:

[Plain] view plaincopy

Sudo apt-get install subversion

Go to the directory and prepare to create the svn directory:

[Plain] view plaincopy

Cd/usr/local/

Create an svn directory:

[Plain] view plaincopy

Mkdir svn

Change the directory permission to 777:

[Plain] view plaincopy

Chmod-r777 svn

Create an svn repository named sunny)

[Plain] view plaincopy

Svnadmin create/usr/local/svn/sunny

Go to the configuration file directory of the sunny Repository:

[Plain] view plaincopy

Cd sunny/conf

Modify the three configuration files in this directory.

(1) vi svnserve. conf // configure the version library information, user file and user password file path, and version LIBRARY PATH

[

Set

# Anon-access = read

# Auth-access = write

# Password-db = passwd

// Remove the # And space in front of the four rows and convert them

Anon-access = none // change to none

Auth-access = write

Password-db = passwd

Realm = sunny // change it to your own version Library

Save

(2) vi authz // file, create svn group and group User Permissions

[Group]

Sunny = gep, wce // create a sunny group and create two users gep and wce

[/] // Specify permissions under the root directory

@ Sunny = rw // the sunny group user permission is read/write.

* = R // other users only have read permission

Save and exit

(3) vi passwd // create or modify the User Password

[Users]

Gep = 123456 // the password of the user whose username is gep is 123456

Wce = 123456 //...

Save and exit

Set auto-start

[Plain] view plaincopy

Vi/etc/rc. local // open the self-starting File

The file content is as follows:

[Plain] view plaincopy

#! /Bin/sh

#

# This script will be executed * after * all the other init scripts.

# You can put your own initialization stuff in here if you don't

# Want to do the full Sys V style init stuff.

Touch/var/lock/subsys/local

/Usr/local/webserver/mysql/3306/mysql start

Ulimit-SHn 51200

/Usr/local/webserver/php/sbin/php-fpm start

/Usr/local/webserver/nginx/sbin/nginx

Svnserve-d-r/usr/local/svn/sunny

#/Usr/local/webserver/mysql/bin/mysql-u roo

T-p-S/tmp/mysql. sock

Svn command:

[Plain] view plaincopy

Lsof-I: 3690 check whether svn is started

Ps aux | grep 'svn 'to find all svn-started processes

Kill-9 2505 kill the svn process found in 2505

Svnserve-d-r/usr/local/svn/sunny start svn (you can put this in the/etc/local/rc. local file to enable automatic startup upon startup)

Svn up // update the file

# Svn commit-m "comment" xxx. php // submit a file

Svn ci-m'aaa' test. php // submit a file

# Svn add file // create a file and add it to svn

Svn add *. php // (add all php files in the current directory)

Svn delete test. php // delete test. php

Svn log test. php // view the log information of the test File

Svn co svn: // x. x. // check a version library file to the current directory.

Svn switch -- relocate svn: // x. x svn: // x. x // locate the SVN repository address.

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.