1. Install Subversion
yum install subversion# Final Display installed: subversion.x86_64 0:1.6.11-12.el6_6 dependency installed: apr.x86_64 0:1.3.9-5.el6_2 apr-util.x86_64 0:1.3.9-3.el6_0.1 libproxy.x86_64 0:0.3.0-10.el6 libproxy-bin.x86_64 0:0.3.0-10.el6 libproxy-python.x86_64 0:0.3.0-10.el6 neon.x86_64 0:0.29.3-3.el6_4 pakchois.x86_64 0:0.4-3.2.el6 perl-uri.noarch 0:1.40-2.el6 complete! #代表安装成功
2, Determine if the installation was successful
svnserve --versionsvnserve, version 1.6.11 (r934486) compiled Feb 10 2015, 22:08:22Copyright (C) 2000-2009 collabnet.subversion is open source software, see http://subversion.tigris.org/ this product includes software developed by collabnet (http://www. collab.net/). the following repository back-end (FS) modules are available:* fs_base : module for working with a berkeley db repository.* fs_fs : Module for working with a plain file (FSFS) repository. Cyrus sasl authentication is available.
3 . Build SVN repository.
[Email protected] ~]# mkdir-p/opt/svn/repos[[email protected] ~]# svnadmin Create/opt/svn/repos
After executing the above command, establish conf, db,format,hooks, locks, README.txt under repos.
4. Configure SVN
Go to the above generated folder conf, configure it, there are several files Authz, passwd, svnserve.conf
Where Authz is the permission control, you can set which users can access which directories, passwd is to set the user and password, Svnserve is to set up SVN-related operations.
[[email protected] ~]# cd/opt/svn/repos[[email protected] repos]# lltotal 24drwxr-xr-x 2 root root 4096 Feb 06:31 conf Drwxr-sr-x 6 root root 4096 Feb 06:31 db-r--r--r--1 root root 2 Feb 06:31 formatdrwxr-xr-x 2 root root 4096 Feb 06:31 hooksdrwxr-xr-x 2 root root 4096 Feb 06:31 locks-rw-r--r--1 root root 229 Feb 06:31 Readme.txt[[email Pro Tected] repos]#
Enter conf Open passwd
[[Email protected] repos]# CD Conf[[email protected] conf]# lltotal 12-rw-r--r--1 root root, 06:31 authz-rw-r- -r--1 root root 309 Feb 06:31 passwd-rw-r--r--1 root root 2279 Feb 06:31 svnserve.conf[[email protected] conf]# V Im passwd
[users]# Harry = harryssecret# Sally = Sallyssecretningyuqiao=ningyuqiao username = password
Open Authz, set permissions
[/]NINGYUQIAO=RW
This means that Ningyuqiao users have read and write access to all directories.
Set svnserv.conf
Anon-access = none # makes unauthorized users inaccessible auth-access = Write # gives authorized users Write permission password-db = passwdauthz-db = Authz # access control File Realm =/opt/ Svn/repos # Authentication namespace, Subversion is displayed in the authentication prompt and as a keyword for credential caching.
Note: Remove all Chinese, otherwise you will get an error.
Start SVN service
Svnserve-d-r/opt/svn/repos
If you already have SVN running, you can run it on a different port.
svnserve-d-r/opt/svn/repos--listen-port 3391
with TORTOISESVN, the connection address is: SVN: //your Server address (if a port is required to specify ports: port number)
This article is from my blog blog, so be sure to keep this source http://ningyuqiao.blog.51cto.com/5581274/1615063
CentOS Build SVN server Subversion