Install svn in yum under linux

1 yum install subversion install
2 svnserve --version to check whether the installation succeeded
RPM -qa Subversion
yum the Remove Subversion
3 mkdir -p / Home / svn / svn repository Project to create a file directory
4 svnadmin create / home / svn / project / create a project
1. Enter the conf directory and you will see 3 configuration files

    进入上面生成的文件夹conf下,进行配置, 有以下几个文件authz,passwd,svnserve.conf。其中authz 是权限控制,可以设置哪些用户可以访问哪些目录,passwd是设置用户和密码的,svnserve是设置svn相关的操作,生成的文件中都有英文注释说明。

2. Configure svnserv.conf

vim svnserv.conf

[general]
anon-access = none # Make unauthorized users inaccessible
auth-access = write # Make authorized users have write permissions
password-db = password # User password file
authz-db = authz # Access control file
realm = /home/ svn/project # Authentication namespace, subversion will be displayed in the authentication prompt and used as a key for credential cache.

With the default configuration, the above statements must be written in the top box, and no spaces can be left on the left, otherwise an error will occur.

3. Configure passwd (format: account = password)

This file is an example password file for svnserve.

Its format is similar to that of svnserve.conf. As shown in the

example below it contains one section labelled [users].

The name and password for each user follow, one account per line.

[users]

harry = harryssecret

sally = sallyssecret

username = 123456
4. Configure authz permissions

Add the following code at the end

[/]
username = rw

r: read, w: write

Note: There are more detailed permissions configuration, not to write here, you can check the SVN document.

5. Start the SVN service

svnserve -d -r /home/svn

Note: The default port is 3690. Please check whether this port allows outbound and inbound before checking out the submit operation. If not allowed, please set up a good firewall.
If you cannot access it at startup, please restart the server. If there is an error, please check the configuration information in time.

Guess you like

Origin blog.csdn.net/personal_csdn/article/details/103033936