Linux Server SVN deployment scenario

Source: Internet
Author: User

SVN Server Deployment Scenario

The following are the specific steps:

1, install SVN, because the source installation will have version compatibility issues, so the direct use of yum installation

Check to see if there is an svn, or uninstall it first

# Rpm-qa |grepsubversion

Subversion-1.6.11-10.el6_5.x86_64

Uninstall the original

# Yum Remove Subversion

Then install

#yum-y Install Subversion

Determine if the installation was successful

# svnserve–version

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6C/BD/wKiom1VRWyrREo3iAAHVJd3Gt60204.jpg "title=" 1.png " alt= "Wkiom1vrwyrreo3iaahvjd3gt60204.jpg"/>

The above information shows that the installation was successful!

2. Establish SVN Library

# mkdir-p/data/svn/repos

# svnadmin create/data/svn/repos/

after executing the above command, we automatically set up several files under repos, namely conf, Db,format,hooks, locks, README.txt.

3. Configuration SVN

 go to the folder created aboveconfNext, configure,There are several files in theAuthz, passwd, svnserve.confwhichAuthzis permission control, you can set which users can access which directories, passwdis to set the user and password, Svnserveis setSVNrelated operations.

# cd/data/svn/repos/conf/

3.1 First Configure password, add SVN Users and passwords, and add the following under the [Users] node

User1=password1

User2=password2

User3=password3

User4=password4

3.2 Set permissions again Authz

# Vim./authz

[/]

User1=rw

User2=rw

User3=rw

User4=rw

3.3 last set svnserv.conf

# vim./svnserve.conf

anon-access= None # makes non-authorized users inaccessible

auth-access= Write # enables authorized users to have writing permissions

password-db= Password # user password file

authz-db= Authz # access control file

Realm =project Name # authentication namespace,Subversion is displayed in the authentication prompt, and is used as a keyword for credential caching.

The default configuration is used. All of the above statements must be shelf written , the left cannot be blank , or an error will occur.

so far, SVN is built and ready to use!

4. Open SVN 3690 Port in the firewall :

#/sbin/iptables-a input-i eth0-p TCP--dport 3690-j ACCEPT

#/sbin/service iptables Save

Or

# Vi/etc/sysconfig/iptables

-A input-m state--state new-m tcp-p TCP--dport 3690-j ACCEPT

# serviceiptables Restart


5 . Start and close of SVN service

Start command:

#svnserve-D-r/opt/svn/repos--listen-host 192.168.1.16--listen-port 6666

where - d specifies the SVN startup mode, which means to start in daemon mode, so that SVN runs in the background,-R Specifies the root directory of the server ,-- Listen-host Specifies the server IP (used when theserver is multi- IP ),--listen-port the specified port (with SVN Open on another port at runtime SVN service use)

For a single code warehouse, start directly with the following command

#svnserve-D-r/opt/svn/repos

# lsof-i:3690

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6C/BD/wKiom1VRW1vjZiIEAACVrUQpKC0662.jpg "title=" 2.png " alt= "Wkiom1vrw1vjziieaacvruqpkc0662.jpg"/>

Stop SVN server:killall svnserve or kill-9 PID


6. Connect SVN

recommended to use TortoiseSVN, it's best to get used to it when you connect. Port Access

SVN Connection Address is

svn://192.168.1.16:3690

After the connection can upload the local files, effectively manage your code.

Note:

There are two ways to store svn:BDB and FSFS, currently using the FSFS mode, which is usually stored in the \db\revs folder, There are a bunch of files named after the version number, such as:0,1,2,3,4 ... , that's it.

SVN First compressed the 0 version of the state into 1 files, and then each version of the update on the changes to the part of a compressed file, each time is to add an incremental package, and finally on the server can see the file name from 0 Start a series of files to the final version


This article from "Linux Enthusiasts" blog, declined reprint!

Linux Server SVN deployment scenario

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.