svn server installation steps

1. Configure yum and check the subversion installation package
1、yum list |grep subversion
2、yum -y install subversion
3. svnserve --version press Enter to display the version description that the installation is successful
 
2. Create svn repository
1、 mkdir -p /mnt/data/svn
2. svnadmin create /mnt/data/svn/moon moon is the name of the repository
 
Three, svnserve configuration file overview
svnserve.conf -- svn service configuration file, which is in the conf directory of the repository directory.
passwd -- user name and password file, the file name is specified in the file svnserve.conf, the default is in the same directory.
authz -- authority configuration file, the file name is also specified in the file svnserve.conf, the default is the same directory.
 
a). The configuration file svnserver.conf file for configuring the svn service
      vi /mnt/data/svn/moon/conf/svnserve.conf
[general]
anon-access = none
auth-access = write
password-db =  /mnt/data/svn/moon/conf/passwd
authz-db = /mnt/data/svn/moon/conf/authz
realm = Moon Repository #This is a reminder
keep
b). Add two access users and passwords
      vi  /mnt/data/svn/moon/conf/passwd
[users]
kyle = 123456
test1 = 123456
keep
Note: Modifications to the user configuration file take effect immediately without restarting the svn service. 
 
c). Configure the authorization file for the new user
     vi / mnt / data / svn / moon / conf / authz
[groups]
admin = kyle
moonDev = test1
[/]
@admin = rw
@moonDev = r
keep
Format description:
Repository directory format: 
[<Repository>:/Project/Directory] 
@<user group name> = <permission> 
<username> = <permissions>
/ means to set permissions on all subdirectories under the root directory (ie /mnt/data/svn/moon directory);
[/abc] Indicates setting permissions on abc items in the database;
Create an admin group, group members include xiaoran.shen and test1
Create a user group with only test2 members;
The admin group has read and write permissions to the directory;
A single user test2 has read and write permissions;
*= means that except for the permission user group set above, all other users have empty permissions. Empty permissions indicate that access to this directory is prohibited, which is very important and must be added.
Note: Modifications to the rights configuration file take effect immediately without restarting svn. 
 
Fourth, start the svn service
      svnserve -d -r /mnt/data/svn/
 
Note: Do not use the system-provided /etc/init.d/svnserve start to start, because the system default startup script does not use the -r /mnt/data/svn/ parameter to specify a resource. In this case, when the svn service is started, the client connection will prompt an error like "svn: No repository found in 'svn://ip/moon' ".
The default svn server port is 3690.
 
Five, kill the svn service:
ps -ef | grep svn
root      4642     1  0 16:08 ?        00:00:00 svnserve -d -r /mnt/data/svn/
root      4692  3676  0 16:13 pts/2    00:00:00 grep svn
kill -9 4642

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326332552&siteId=291194637