Although it's simple to build SVN on windows, it's not very efficient, of course, compared to Linux. However, it's very cumbersome to build SVN on Linux, so today's article is a step-by-step lesson on how to build svn on CentOS.
The installation steps are as follows:
1. Yum Install Subversion
2, input rpm-ql subversion to view the installation location, as shown below:
We know that SVN generated several binaries in the bin directory.
Enter SVN--help to see how SVN is used, as shown in the following figure.
3. Create SVN version Library directory
Copy Code code as follows:
4. Create a version library
Copy Code code as follows:
Svnadmin Create/var/svn/svnrepos
After this command is executed, the following files are generated in the/var/svn/svnrepos directory
5, into the Conf directory (the SVN version of the library configuration file)
Authz file is a permission control file
passwd is the account password file
Svnserve.conf SVN service configuration file
6, set the account password
VI passwd
Add users and passwords in the [users] block, format: account = password, such as Dan=dan
7, set permissions
VI Authz
Add the following code at the end:
Copy Code code as follows:
This means that the root of the repository Dan has read and write access to it, and W has only Read permissions.
8. Modify svnserve.conf File
VI svnserve.conf
Open the following several comments:
Anon-access = Read #匿名用户可读
auth-access = Write #授权用户可写
Password-db = passwd #使用哪个文件作为账号文件
Authz-db = Authz #使用哪个文件作为权限文件
Realm =/var/svn/svnrepos # authentication space name, version Library directory
9, start the SVN version of the Library
Svnserve-d-r/var/svn/svnrepos
10. Test on Windows
Create a new test folder, and right click the SVN checkout below (to install TORTOISESVN in advance):
Fill out the SVN address, as shown in the following figure:
Enter the password, as shown in the following figure: