Build SVN service, effective management code
First step: Install
#yum Install Subversion
Determine if the installation was successful
#subversion-V
Svnserve, Version 1.6.11 (r934486)
The above prompts show that the installation was successful.
If prompted as follows:-bash:subversion:command not found
Find discovery:
[root@]# svnserve–version
Svnserve, Version 1.6.11 (r934486)
Compiled APR 11 2013, 16:13:51
Copyright (C) 2000-2009 collabnet.
Subversion is open source software, 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.
With SVN software, you need to build SVN libraries.
#mkdir/opt/svn/repos
#svnadmin Create/opt/svn/repos
After the execution of the above command, automatically set up a number of files under Repos, respectively, conf, Db,format,hooks, locks, README.txt.
Step Two: Configure
The above operation is very simple, a few commands are done, the following operation is not difficult.
Into the above generated folder conf, to configure, there are the following several files Authz, passwd, svnserve.conf
Where Authz is permission control, you can set which users can access which directories, passwd is set up the user and password, Svnserve is set up SVN-related operations.
1) First set passwd
[Users]
# Harry = Harryssecret
# sally = Sallyssecret
Hello=123
User name = password
So we set up the Hello user, 123 password
2) and then set the permissions Authz
[/]
hello= RW
This means that the Hello user has read and write access to all of the directories, and can be qualified as well.
If it is for your own use, you can read and write directly.
3) finally set snvserv.conf
Anon-access = none # makes unauthorized users inaccessible
auth-access = Write # Enables authorized users to have writing permission
password-db = password
authz-db = authz # access Control file
Realm =/opt/svn/repos # authentication namespace, Subversion will be displayed in the authentication prompt, and as a key to the voucher cache.
The default configuration is used. The above statement must be written below, the left can not leave blank, or you will be wrong.
Well, with the above configuration, your svn will be OK.
4) Link
Start svn:svnserve-d-r/opt/svn/repos
If SVN is already running, you can switch to a different port to run
svnserve-d-r/opt/svn/repos–listen-port 3391
This allows the same server to run multiple svnserver
OK, once the startup is successful, you can use it.
TortoiseSVN is recommended, and the connection is: Svn://your server address (if you specify a port to add ports: Port number)
, you can upload local files and effectively manage your code.
Killall svnserve//Stop