1. Install SVN
Yum Intall Subversion
2. View the installation location
RPM-QL Subversion
3. Verify that SVN is installed successfully and see Help
SVN--help, see the expression success.
4. Create the SVN repository directory
Mkdir–p/var/svn/svnrepos
5. Create a version library
Svnadmin Create/var/svn/svnrepos
After the command executes, the following files are generated in this directory
6. Enter the Conf directory for configuration
Authz file is a permission control file
passwd is the account password file
Svnserve.conf SVN service configuration file
(1) Add User:
VI passwd
Add users and passwords in the [users] block, format: Account number = password
(2) Configure permissions for user Dan
VI Authz
Add the following code at the end:
[/] # SVN is a path-based permission assignment, here/represents the SVN root directory
Dan=rw
It means that the repository's root directory Dan has read and write permissions, and W only reads permissions.
You can also group users, and then assign permissions to groups
(3) Modify the svnserve.conf file
VI svnserve.conf
Open a few notes below:
Anon-access = Read #匿名用户可读
auth-access = Write #授权用户可写
Password-db = passwd #使用哪个文件作为账号文件
Authz-db = Authz #使用哪个文件作为权限文件
Realm = Taotao # certified space name, repository directory, configure permissions with the specified name is also this
7. Start SVN
Enter the/usr/bin directory (svnserve boot file here)
Svnserve–help View Help
Svnserve–d–r/var/svn/svnrepos to specify SVN root when starting SVN
(where –d is running in the background,-r means the data directory)
8. Restart
End process before restarting
Killall Svnserve or kill-9 svnserve (not recommended)
Svnserve–d–r/var/svn/svnrepos
SVN environment building based on Linux (CentOS)