Simple installation of SVN server in Linux

Source: Internet
Author: User

Simple installation of SVN server in Linux
Install

Installing yum is very simple:

yum install subversion
Configure to create a repository

Here we are/homeCreatesvnRepository (repository), all the code will be placed under this, after the creation is successful, there are several more folders under svn.

[root@localhost /]# cd /home[root@localhost home]# mkdir svn[root@localhost home]# svnadmin create /home/svn[root@localhost home]# ls svnconf  db  format  hooks  locks  README.txt

Let's take a special note here.confFolder, which stores the configuration file

[root@localhost home]# cd svn/conf[root@localhost conf]# lsauthz  passwd  svnserve.conf

Where:

  • Authz is a permission Control File
  • Passwd is the account password file
  • Svnserve. conf is the SVN service configuration file

Next, modify these three files in sequence.

Configure passwd
[root@localhost conf]# vi passwd [users]test1=123456test2=123456

In the above example, we created two users, one test1 and the other test2.

Configure authz
[root@localhost conf]# vi authz [/]liuxianan=rwtest1=rtest2=r*=

The meaning of the above configuration is,liuxiananPair/home/svn/All files have the read and write permissions,testOnly read-only permission. Other users do not have any permission. the last row*=Important.

Extended: Use user groups

I usually don't need this, but record it.

Or this file:

[root@localhost conf]# vi authz[groups]group1 = liuxianangroup2 = test1,test2[/]@group1 = rw@group2 = r* =

In the preceding configuration, two groups are created. Users in group 1 are readable and writable, and users in group 2 are read-only.

Format description:

Version library directory format:
[<Version library>:/project/directory]
@ <User group name >=< permission>
<User name >=< permission>

Configure svnserve. conf
[Root @ localhost conf] # vi svnserve. conf open the following five comments: anon-access = read # anonymous user-readable auth-access = write # authorized user-writable password-db = passwd # Which file is used as the account file authz-db = authz # Which file is used as the permission file realm =/home/svn # Name of the authentication space, version library directory

2. Note:

  • Change the realm in the last row to your svn directory.
  • Do not leave spaces before opening comments. Otherwise, problems may occur (I did not test it online)

Start and Stop
[Root @ localhost conf] # svnserve-d-r/home/svn (start) [root @ localhost conf] # killall svnserve (STOP)

In the preceding startup command,-dIndicates the daemon process,-rIndicates execution in the background. You can also stop a process by killing it:

[root@localhost conf]# ps -ef|grep svnserveroot      4908     1  0 21:32 ?        00:00:00 svnserve -d -r /home/svnroot      4949  4822  0 22:05 pts/0    00:00:00 grep svnserve[root@localhost conf]# kill -9 4908

The final summary is as follows:

Client Connection

TortoiseSVN is used here. Enter the addressSvn: // your IP addressThe connection is successful without accidentally entering the user name and password.

The default port is 3690. If you have modified the port, add the port number.

Summary

In general, if you do not need to configure all the permissions for your own use, the installation configuration is relatively simple and not as troublesome as the internet says, I completed one-time online operation.

Extension: yum installation path

Take svn as an example:

# rpm -qa | grep subversionsubversion-1.6.11-15.el6_7.x86_64# rpm -ql subversion-1.6.11-15.el6_7.x86_64.../usr/share/doc/subversion-1.6.11/usr/share/doc/subversion-1.6.11/BUGS/usr/share/doc/subversion-1.6.11/CHANGES...

Note:

  • Run the rpm-qa command to query all installed rpm packages.
  • Rpm-qi describes how to query a specific package.
  • Rpm-ql: list all files of a specific package

The default installation paths of rpm:

/Etc some directory for setting file placement/usr/bin some executable files/usr/lib64 some programs use dynamic function libraries/usr/share/doc some basic software user manuals and help document/usr/share/man some man page files

Set up SVN server SVN in Ubuntu 14.04 ://

CentOS 6.2 SVN setup (YUM installation)

Deploy Apache + SVN in CentOS 6.5

Build an SVN server using Apache + SVN

Set up and use the SVN server in Windows + reset the password on the client

Install SVN in Ubuntu Server 12.04 and migrate Virtual SVN data

Build SVN service and migration method on Ubuntu Server

Subversion (SVN) Details: click here
Subversion (SVN): click here

This article permanently updates the link 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.