centos7 has its own svn service, and now it is necessary to create multiple warehouses and implement user read and write functions
Create svn repository
mkdir /home/svn
mkdir /home/svn/conf
mkdir /home/svn/yk1
mkdir /home/svn/yk2
svnadmin create /home/svn/yk1
svnadmin create /home/svn/yk2
Enter the configuration file path /home/svn/yk1/conf of the repository yk1, and copy the authz and passwd files to the /home/svn/conf path
cd /home/svn/yk1/conf
cp authz /home/svn/conf
cp passwd /home/svn/conf
When done, the structure of the svn directory should look like this
Repository configuration file modification
Modify the svnserve.conf file under /home/svn/yk1/conf, where you need to edit:
- anon-access = none disable anonymous user access
- auth-access = write Authorized users have read and write permissions
- password-db = passswd specifies the username and password file, namely the passwd file
- authz-db = authz specifies the authority configuration file, that is, the authz file
- realm = /home/svn/yk1/: Specify the authentication domain, that is, the /home/svn/yk1/ directory
Modify the svnserve.conf file under /home/svn/yk2/conf, the places that need to be edited are the same as above
realm = /home/svn/yk2
svn configuration file modification
Modify the account password, add an admin user, password 123456
cd /home/svn/conf
we passwd
Modify permissions
[grops]
admin=admin
It means to add a group, the group name is admin, including the user name admin
[/]
@admin=rw
It means that all members of the group admin have the rw permission of the root directory
Start the svn service
Note the actual svn service path!
svnserve -d -r /home/svn
Check if the service is started
ps -ef | grep 'svnserve'
Win10 uses svn tool to test
yk1 warehouse address
svn://192.168.38.34/yk1
yk2 warehouse address
svn://192.168.38.34/yk2
Test read, ie pull
Test write, ie push