"SVN" CentOS build SVN server environment

Source: Internet
Author: User

1. Requirements Description

Build the SVN server environment in the CentOS system


2. Construction process

2.1 Yum Install SVN

[Email protected]/]# Yum Install svn

2.2 New directory Store SVN directory

[Email protected]/]# mkdir/usr/svn


2.3 New Test Warehouse Pro

[Email protected]/]# svnadmin create/usr/svn/pro

Go to directory/usr/svn/pro expand directory

Description

Hooks directory: The directory where the hook footstep files are placed

Locks directory: The directory used to place Subversion db lock files and Db_logs lock files to track the clients that access the vault

Format directory: is a text file in which only an integer is placed, indicating the version number of the current vault configuration

Conf directory: This is the warehouse configuration file (warehouse user access account, permissions)


2.4 Go to Folder conf, configure related information

Expand Folder conf, with the following files

The contents of the above three files are as follows: (The pink Mark section is modified)

VI passwd

# # # This file is a example password file for Svnserve.
# # # Its format was 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

Admin =admin1
Qinys = 123456


VI Authz


# # # This file is a example authorization file for Svnserve.
# # # Its format was identical to that of MOD_AUTHZ_SVN authorization
# # files.
# # as shown below each of defines authorizations for the path and
# # # (optional) repository specified by the section name.
# # # The authorizations follow. An authorization line can refer to:
# # #-a single user,
# # #-a group of users defined in a special [groups] sections,
# # #-an alias defined in a special [aliases] section,
# # #-All authenticated users, using the ' $authenticated ' token,
# # #-Only anonymous users, using the ' $anonymous ' token,
# # #-anyone, using the ' * ' wildcard.
###
# # # A match can is inverted by prefixing the rule with ' ~ '. Rules can
# # # Grant Read (' R ') access, read-write (' RW ') access, or no access
### (‘‘).

[Aliases]
# Joe =/c=xz/st=dessert/l=snake City/o=snake oil, ltd./ou=research Institute/cn=joe Average

[Groups]
# harry_and_sally = harry,sally
# Harry_sally_and_joe = Harry,sally,&joe

# [/foo/bar]
# Harry = RW
# &joe = R
# * =

# [Repository:/baz/fuz]
# @harry_and_sally = RW
# * = R
admin = admin1
user = Qinys
[/]
@admin = RW
@user = RW
*=

The following is a description:

admin = admin1 Create the Admin group, team member: Admin1

user = Qinys Create user group, users member: Qinys

[/] give root permissions, in order to facilitate management and control of permissions, you can refine the permissions to the corresponding directory in the repository

@admin = RW Admin Group has read and write permissions

@user = R User Group only Read permission

*= indicates that in addition to the permissions set above the user group, all other users set the empty permissions, the null permission to prohibit access to this directory, it is important to add.


VI svnserve.conf

# # # The Anon-access and Auth-access options control access to the
# # repository for unauthenticated (a.k.a. anonymous) Users and
# # # Authenticated Users, respectively.
# # # Valid values are "write", "read", and "none".
# # # Setting the value to "none" prohibits both reading and writing;
# # # "read" allows read-only access, and "write" allows complete
# # # Read/write access to the repository.
# # # The sample settings below is the defaults and specify that anonymous
# # # users has read-only access to the repository, while authenticated
# # # users has read and write access to the repository.
anon-access = None #注意前边不要有空格, to be top-up. Anonymous access, which can be read,write,none, is read by default
auth-access = Write #注意前边不要有空格, to top-up enables authorized users to have write permissions

# # # The PASSWORD-DB option controls the location of the password
# # Database file. Unless specify a path starting with A/,
# # # The file ' s location was relative to the directory containing
# # # This configuration file.
# # If SASL is enabled (see below), the This file won't be used.
# # # Uncomment the line below to use the default password file.
password-db = passwd#密码数据库的路径
# # # The AUTHZ-DB option controls the location of the authorization
# # # Rules for path-based access control. Unless you specify a path
# # # Starting with a/, the file's location was relative to the
# # # directory containing this file. If you don ' t specify an
# # # AUTHZ-DB, no path-based access control is done.
# # # Uncomment the line below to use the default authorization file.
authz-db = Authz #访问控制文件
# # # This option specifies the authentication realm of the repository.
# # If repositories have the same authentication realm, they should
# # # has the same password database, and vice versa. The default Realm
# # is repository ' s UUID.
realm = My First Repository #认证命名空间, which is displayed in the authentication prompt
# # # The Force-username-case option causes Svnserve to Case-normalize
# # # Usernames before comparing them against the authorization rules in the
# # # AUTHZ-DB file configured above. Valid values is "upper" (to upper-
# # # case the usernames), ' lower ' (to lowercase the usernames), and
# # # "None" (to compare usernames as-is without case conversion, which
# # is the default behavior).
# force-username-case = None

[SASL]
# # # This option specifies whether your want to use the Cyrus SASL
# # # Library for authentication. Default is false.
# # # This section would be a ignored if svnserve is not a built with Cyrus
# # # SASL support; To check, run ' Svnserve--version ' and look for a line
# # # reading ' Cyrus SASL authentication is available. '
# USE-SASL = True
# # # These options specify the desired strength of the security layer
# # # That's want SASL to provide. 0 means no encryption, 1 means
# # integrity-checking only, values larger than 1 is correlated
# # to the effective key length for encryption (e.g. means 128-bit
# # # Encryption). The values below is the defaults.
# min-encryption = 0
# max-encryption = 256


2.5 Start SVN

[Email protected]/]# svnserve-d-r/usr/svn/


2.6 Viewing the startup situation

Ps-ef | grep SVN

Stop svn, use command:kill–9 20181 20181 for process ID


2.7 Windows Client connections

Client: https://tortoisesvn.net/downloads.html

Download based on local System select version

After the download is complete, install after installation, right click on the D packing directory

Click "OK"


The cause of this problem is caused by fire prevention.


So how do we deal with it? We specify the port for SVN and then open this port in the specified area

Execute the following command

Firewall-cmd--permanent--zone=public--add-port=3690/tcp

Then turn on the fire prevention please and check the status

Systemctl Start Firewalld

Systemctl Status Firewalld

Add 3690 more ports

Firewall-cmd--permanent--zone=public--add-port=3690/tcp

Then restart the firewall.

Firewall-cmd--reload










"SVN" CentOS build SVN server environment

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.