Linux builds SVN service
The installation is skipped directly. . . .
Build a library
After svn is installed, create a new folder (assuming svn) in a suitable place (choose by yourself)
and build two libraries here:
svnadmin create 文件夹名(svn)/库名(test1)
svnadmin create 文件夹名(svn)/库名(test2)
start the service
If you plan to build a library, use it directly. svnserve -d -r /svn/test1/
If you want to build multiple libraries, you can use svnserve -d -r /svn/
it, so that all libraries in the svn folder can be accessed. The
access address is: svn://(本机ip)/(库名)
if there is only one library, svn://(本机ip)
you can directly access it,
but at this time it is still Cannot access the svn library, you need to modify the configuration file first
PS: svnserve -d -r /svn/ --listen-port 端口号
You can specify the port number, the default is 3690
Modify the configuration file
Note that the configuration of each library must be changed, here is one of the libraries as an example
svnserve.conf (please find the following four things and uncomment, remember to delete the space is their top, otherwise an error will be reported, and if the client cannot To watch the log, please modify the value of anon-access to none)
[root@VM_16_11_centos conf]# vim svnserve.conf
[general]
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
#验证空间的名字,请自行命名,还没发现其具体用处
realm = mdy
passwd: (user's management configuration, there are two users mdy and test1)
[root@VM_16_11_centos conf]# vim passwd
[users]
# harry = harryssecret
# sally = sallyssecret
mdy = mdy
test1 = test1
authz : (user's permission configuration, here focuses on the configuration of access paths)
[repository:/], which are the library name and the access path, there may be multiple folders in a library, you can limit the user's access by specifying the path access, / means that all files can be accessed
[root@VM_16_11_centos conf]# vim authz
[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
# * =
[mdy:/]
mdy = rw
test1 = r
[mdy:/test]
test1 = rw
After the above configuration file is modified, svn can be used normally.