Built based on the linux (centos) svn environment, centossvn
1. Install svn
Yum intall subversion
2. view the installation location
Rpm-ql subversion
3. Check whether svn is successfully installed. View help
Svn -- help.
4. Create the svn version library directory
Mkdir-p/var/svn/svnrepos
5. Create a version Library
Svnadmin create/var/svn/svnrepos
After the command is executed, the following files are generated in this directory:
6. Enter the conf directory for configuration
The authz file is a permission control file.
Passwd is the account password file
Svnserve. conf SVN service configuration file
(1) Add a user:
Vi passwd
Add the user and password to the [users] block. Format: account = Password
(2) Configure permissions for user dan
Vi authz
Add the following code at the end:
[/] # Svn is a path-based permission assignment. Here/indicates the svn root directory.
Dan = rw
Dan, the root directory of the version Library, has read and write permissions. w has only read permissions.
You can also group users and assign permissions to them.
(3) modify the svnserve. conf file
Vi svnserve. conf
Open the following comments:
Anon-access = read # anonymous user readable
Auth-access = write # authorized users can write
Password-db = passwd # Which file is used as the account file
Authz-db = authz # Which file is used as the permission File
Realm = taotao # Name of the authentication space, directory of the version library, which is also the name specified when the permission is configured
7. Start svn
Enter the/usr/bin directory (the svnserve Startup File is here)
Svnserve-help
Svnserve-d-r/var/svn/svnrepos specify the svn root directory when starting svn
(-D Indicates running in the background, and-r indicates data directory)
8. Restart
Stop the process before restarting
Killall svnserve or kill-9 svnserve (not recommended)
Svnserve-d-r/var/svn/svnrepos