SVN client :http://tortoisesvn.net/downloads.html
Tips: If you are using Centeos or RedHat, use the
Yum command, and other Debian, Ubuntu, and so on
apt-get
. Yum is used here
.
use RPM package management to check if SVN already exists.
Step1:
Check [[Email protected]_sys:~] # Rpm-qa Subversion
Tips: If the information is not listed, it means the system does not have SVN installed, then install it.
Step2:
Search [email protected]_sys:~]# Yum search Subversion Tips: First download the Yum Remote Server package list to find the associated package name for subversion (note: The package must match your current system).
since my Linux is a 64-bit operating system, I found a package that matches my name: subversion.x86_64
Step3:
installation [email protected]_sys:~]# yum install subversion.x86_64 Tips: This is done by automatically downloading the SVN package and installing it into the system-specific directory. Prompt input: Y can be encountered.
STEP4: Test success or not
[email protected]_sys:~]# svnserve--version Tips: Verify that the installation version is successful.
Step5:
Creating an SVN version repository
[email protected]_sys:~]# mkdir-p/DATA/SVN
[email protected]_sys:~]# Svnadmin/data/svn/myrepo Tips:
/data/svn (SVN storage directory) can be arbitrarily specified by you,
Myrepo is a repository of SVN, you can also be arbitrarily named, here my name is Myrepo.
Step6:
View the configuration file and set
[email protected]_sys:/data/svn/myrepo/conf]# pwd /data/svn/myrepo/conf [[email protected]_sys:/data/svn/myrepo/conf]# ls Authz passwd svnserve.confthree description of the file: ↓
svnserve
. conf: SVN service configuration file
passwd
: User name password file
authz : Privilege profile
svnserve.conf
file configuration mainly has the following
5
items:
anon-access: Controls the permissions of non-authenticated users to access the repository.
auth-access: Controls the permissions of the authentication user to access the repository.
password-db: Specifies the user name password file name.
authz-db: Specifies the permission profile file name through which path-based access control can be implemented.
Realm: Specifies the authentication domain for the repository, which is the name of the authentication domain that is prompted at logon. If the authentication domain of the two repositories is the same, it is recommended to use the same username password data file
Tips: The above five assignments are commented by default in the file, and when you start the SVN service, be sure to remove the comments from the top four configurations (anon-access, auth-access, Password-db, authz-db).
passwd
file configuration:
[Users]
# Harry = Harryssecret
# sally = Sallyssecret
would = 123456
test = 654321Tips:will represents the user name, 123456 is the password of the will user, and test is the same. The
following configuration is included in the Authz file:
[Groups]
admin = would
Tests = Test
[/] * = @admin = RW
@tests = r
Tips: We put users in groups to make them easy to use and manage. Here, 'll and test are placed in the Admin group and the tests group, respectively.
here
[/
] corresponds to all the warehouses in the/data/svn/directory, only the users in the Admin group can read and write, the users in the tests group only have Read permissions, others do not have permissions.
To
start and stop the SVN service
:
1. Start the SVN
service [email protected]_sys:/data/svn/myrepo/conf]# svnserve-d-r/data /SVN
-D indicates running in the background.
-R Specifies that the SVN root directory is /data/svn
2. Stop the SVN service
[[email protected]_sys:~ ] # ps-aux | grep svn
[[Email protected]_sys:~] # kill-9 Process ID