Linux build svn server

  
        

1. Install svn server side

yum install subversion Download and install svn server side from image download if you execute "svnadmin create /usr/local/svn/sunny" prompt error: "command not found" , put this sentence "mount /dev/cdrom /media/cdrom/" words in this sentence "yum install subversion" before

cd /usr/local///Enter the directory, ready to create svn Directory

mkdir svn //Create a svn directory

chmod -R 777 svn //Modify directory permissions to 777

svnadmin create /usr/local/svn/sunny //Create a svn version of the repository sunny (sunny can just pick up the name) to this step! ! ! !

cd svn/sunny/conf //Enter the configuration file directory under the sunny version of the repository

The following three configuration files under this directory need to be modified

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


# anon-access = read

# auth- Access = write

# password-db = passwd

//The four lines, the ## and the space before it are removed (note that you want to remove the top box, do not leave extra spaces), change

anon-access = none //change to none

auth-access = write

password-db = passwd

realm = sunny //Change to your own repository

Save

(2)vi authz //file, create svn group and group user permissions

[group]

sunny = gep,wce //Create a sunny group and specify two users gep and wce

[/] //Done permissions in the root directory

@sunny = rw //sunny group user permissions for reading and writing

* = r //Other users only have read access

Save and exit

(3) vi passwd //Create or modify user password

[users]

gep = 123456 //The password of the user named gep is 123456

wce = 123456 //The password of the user whose name is wce is 123456

Save and exit

Start svn:

svnserve -d -r /usr/local/svn///Start here with multiple repositories. If it is a single repository, you can svnserve -d -r /usr/local/svn/Sunny

Add a line

Then set the self-starting

vi /etc/rc.local Open the self-starting file to add

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

So far, you can check out the file from the server.

svn command:

netstat -tnl

Copyright © Windows knowledge All Rights Reserved