Installation and configuration of SVN server, SVN server configuration _php Tutorial

Source: Internet
Author: User
Tags server installation and configuration svn update

SVN server Setup and configuration, SVN server configuration


1. Install svn server-side software

Download and install SVN Server Softwarefrom a mirror server or yum Source:Yum Install subversion

MKDIR/USR/LOCAL/SVN// Create svn installation directory

Chmod-r 777 SVN// Modify directory permissions to 777

Svnadmin Create/usr/local/svn/sunny// Create an svn version repository Sunny (Sunny can be customized )

cd/usr/local/svn/sunny/conf// Enter the configuration file directory under the sunny Repository

Below to modify the three configuration files in this directory

(1) vi svnserve.conf// Configure repository information and user files and user password file path, repository path,

# anon-access = Read

# auth-access = Write

# password-db = passwd

these four lines, preceded by the # number and the space is removed ( Note to remove # to shelf write , Do not leave any extra space )and become

Anon-access = none// anonymous access, changed to none

auth-access = Write

Password-db = passwd

Realm = sunny// change to your own repository name

Save exit

(2) vi Authz// files , creating permissions for SVN Group and group users

[Group]

Sunny = GEP,WCE// Create a sunny Group and specify two users GEP and WCE

[/]// define permissions under the root directory

@sunny = RW//sunny Group User rights are read and write

* = r// other users have read access only

Save exit

(3) VI passwd// Create or modify user passwords

[Users]

GEP = 123456//user named GEP password is 123456

WCE = 123456//...

Save exit

To start the SVN server :

This is started in a multi-repository way

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

If a single version of the library can add a row

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

Then you set the self-start

' Open the Self-boot file to add

/usr/bin/svnserve-d-r/usr/local/svn/

At this end, you can check out files from the server .

SVN command:

NETSTAT-TNL |grep:3690 See if svn starts

Installation is successful!

PS aux |grep svn Find all svn -initiated processes

Kill-9 2505 kills 2505 This found svn process

SVN checkout Svn://172.19.5.2/sunny/data0/htdocs/blog// Check out a repository file to the specified directory

SVN up// update file

Automatic Updates

join in the vi/usr/local/svn/sunny/hooks/post-commit

#!/bin/sh

# Set some variables

Svn=/usr/bin/svn

WEB=/HOME/TESTSVN # directories to update

Export Lang=en_us. UTF-8

$SVN update $WEB--username xxx--password xxx

where svn= to the right of the SVN command location generally defaults to /usr/bin/svn

web= right to your actual Web directory

Give executable permission

chmod 777/usr/local/svn/sunny/hooks/post-commit

Installation Complete

=========================================================================

Other operations

#svn commit-m " notes " xxx.php// Submit File

SVN ci-m ' AAA ' test.php// Submit file

#svn Add File// new files 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 cleanup// clean up the current directory

SVN switch--relocate svn://192.168.1.253 svn://172.19.10.250// relocate svn repository address

SVN repository starting mode, now svn has sunny,test two repository

1: Single-version library starter svnserve-d-r/usr/local/svn/sunny

2: Multi-version Library starter svnserve-d-r/usr/local/svn

The difference is the start of the svn command in the startup parameter - r specified directory.

To restrict different user permissions for different repository operations, modify the authz file in the conf directory in the repository

To configure the sunny repository as an example

VI Authz

[Groups]

Teacher = Sunny,sunny1

[sunny:/]// Specify repository and directory permissions

@teacher = RW//teacher Group User rights are read and write

* = r// other users have read access only

Save exit

VI passwd Set the user's account number and password in the group

[Users]

Sunny = 123456

Sunny1 = 123456

http://www.bkjia.com/PHPjc/1135473.html www.bkjia.com true http://www.bkjia.com/PHPjc/1135473.html techarticle SVN server installation and configuration, SVN server configuration 1. Install SVN server-side software to download and install SVN server software from a mirror server or from a yum Source: Yum install subversion mkdi ...

  • 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.