To build the svn service and effectively manage code, you can perform the following three steps.
1. Installation
# Yum install Subversion
Determine whether the installation is successful
# Subversion-V
Svnserve, version 1.6.11 (r93411)
The above prompt indicates that the installation is successful.
If the prompt is as follows:-Bash: Subversion: Command not found
Found:
[[Email protected] # svnserve -- version
Svnserve, version 1.6.11 (r93411)
Compiled Apr 11 2013, 16:13:51
Copyright (c) 2000-2009 collabnet.
Subversion is open source software, see http://subversion.tigris.org/
This product has DES 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 the svn software, you also need to create a SVN database.
# Mkdir/opt/SVN/Repos
# Svnadmin create/opt/SVN/Repos
After executing the preceding command, multiple files are automatically created under repos, including Conf, DB, format, hooks, locks, and readme.txt.
2. Configuration
The above operation is very simple, just a few commands, the following operation is not difficult.
Go to the conf folder generated above and configure the following files: authz, passwd, svnserve. conf
Among them, authz is permission control, which users can access which directories, passwd is used to set users and passwords, and svnserve is used to set svn-related operations.
2.1 set passwd first
[Users]
# Harry = harryssecret
# Sally = sallyssecret
Hello = 123
Username = Password
In this way, the hello user and 123 password are created.
2.2 set the permission authz again
[/]
Hello = RW
This means that the hello user has read and write permissions on all directories, but it can also be limited.
If you use it on your own, read and write it directly.
2.3 Finally set snvserv. conf
Anon-access = none # Make unauthorized users inaccessible
Auth-access = write # grant the authorized user the write permission
Password-DB = Password
Authz-DB = authz # access control file
Realm =/opt/SVN/repos # authenticate the namespace. The Subversion is displayed in the authentication prompt and serves as the key word cached by the credential.
Use the default configuration. The above statements must be written in the top level, and no space is left. Otherwise, an error will occur.
Now, with the above configuration, you can use SVN.
3. Connection
Start SVN: svnserve-d-r/opt/SVN/Repos
If SVN is already running, you can run it on another port.
Svnserve-d-r/opt/SVN/repos -- listen-port 3391
In this way, the same server can run multiple svnservers.
Okay. After the startup is successful, you can use it.
Tortoisesvn is recommended, and the connection address is SVN: // your server address (if the specified port needs to be added: port number)
After the connection, you can upload local files to effectively manage your code.
This article is from the "Sean" blog, please be sure to keep this source http://chengfuxing.blog.51cto.com/5168625/1551122
Build SVN server using centos