The first step is to install the SVN server side
1, direct use of yum installation, commands and the following
[email protected] ~]# Yum install-y Subversion
2. After the installation is successful, you can view the SVN version
[Email protected] ~]# Svnserve--version
3, create the SVN directory, you can specify the directory location according to personal habits
[Email protected] ~]# MKDIR/USR/LOCAL/SVN
4, create the SVN repository Testsvn, the repository name can be taken
[Email protected] ~]# svnadmin CREATE/USR/LOCAL/SVN/TESTSVN
Step two, configure the SVN server side
once the repository is created, the directory will generate 3 configuration files:authz passwd svnserve.conf
svnserve.conf: SVN service configuration file.
passwd: user name password file.
Authz: privilege profile.
1. Open svnserve.conf for configuration
Anon-access: Controls the permissions of non-authenticated users to access the repository.
Auth-access: Controls the permissions of the authentication user to access the repository.
PASSWORD-DB: Specifies the user name password file name.
AUTHZ-DB: Specifies the permission profile file name through which path-based access control can be implemented.
Realm: Specifies the authentication domain for the repository, which is the name of the authentication domain that is prompted at logon. If the authentication domain of the two repositories is the same, it is recommended to use the same username password data file
My configuration is as follows:
2. Configure passwd user name password
In [Users], add the appropriate user name and password, in the format: username = password
My configuration is as follows:
3. Configure Authz permissions
Because I am the test, so only need to configure a simple, to their own account configuration on the read and write permissions, such as
In fact, more formal configuration, there should be different roles of the rights control, posted on the internet to give an example for reference
[groups]admin = John, katedevteam1 = John, Rachel, sallydevteam2 = Kate, peter, Markdocs = Bob, jane, miketraining = zak# This Put different users into different groups, the following in the setting of directory access permissions, the directory to operate on it. # Specify a default access rule for all libraries # Everyone can read, the administrator can write, the dangerous molecule does not have any permissions #[/] corresponds to this root directory [/] * = R@admin = Rwdangerman =# allows developers to fully access their project repository [proj1:/]@ devteam1 = rw[proj2:/] @devteam2 = rw[bigproj:/] @devteam1 = RW@DEVTEAM2 = rw# The document writer has write access to all the docs directories [/trunk/doc] @docs = rw# Full access to the training repository [trainingrepos:/] @training = RW
Step three, start and stop SVN
1. Start
[Email protected] ~]# svnserve-d-R/USR/LOCAL/SVN
-D indicates background run
-r specifies that the root directory is/USR/LOCAL/SVN
[Email protected] ~]# Ps-ef | grep SVN
Root 4566 1 0 11:07? 00:00:00 svnserve-d-r/var/www/svn_rshui
Root 6667 3598 0 17:48 pts/1 00:00:00 grep svn
2. Stop
Ps-aux |grep svnkill-9 Process pid
Linux SVN server-side installation and configuration tutorial