1. Installing Subversion Server
Subversion server binaries maintained by the Ubuntu Project. Packages include the Subversion client, and tools to create a subversion repository and to make a repository available ove R a network.
Run This command as root:
$ apt-get Install Subversion
From the above you can see that the installation is simple as long as you run the following command:
sudo apt-get install subversion
To verify that the installation is successful, you can use the following command:
SVN help--SVN helps
SVN--version--SVN version
Svnserve--version--SVN Server version
2. Create SVN repository
Mkdir/u02/svn
Svnadmin create/u02/svn/svnname--svnname for repository name
3.SVN Configuration
Once the repository is created, 3 configuration files are generated in this directory:
[Email protected] conf]# pwd
/u02/svn/davesvn/conf
[[email protected] conf]# ls
Authz passwd svnserve.conf
(1) Under the SVNSERVE.CONF:SVN service configuration file.
(2) passwd: User name password file.
(3) Authz: Privilege profile.
svnserve.conf file, the file configuration entry is divided into 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
PASSWD file:
We enable this file in the svnserve.conf file. Then configure the following:
[email protected] conf]# cat passwd
# # # This file is a example password file for Svnserve.
# # # Its format was similar to that of svnserve.conf. As shown in the
# # # example below it contains one section labelled [Users].
# # # The name and password for each user follow, one account per line.
[Users]
# Harry = Harryssecret
# sally = Sallyssecret
Dave = Davepwd
Tianlesoftware = Tianlesoftwarepwd
Authz file:
Find a good example of configuration on the Web:
[Groups]
admin = John, Kate
DEVTEAM1 = John, Rachel, Sally
Devteam2 = Kate, Peter, Mark
Docs = Bob, Jane, Mike
Training = Zak
--here to put different users into different groups, the following in the setting Directory access permissions, the directory to operate on it.
# Specify default access rules for all libraries
# Everyone can read, admin can write, dangerous molecule without any permission
[/]--corresponding to my test:/U02/SVN directory
* = R
@admin = RW
Dangerman =
# allows developers to have full access to their project repository
[proj1:/]
@devteam1 = RW
[proj2:/]
@devteam2 = RW
[bigproj:/]
@devteam1 = RW
@devteam2 = RW
Trevor = RW
# document writers have write access to all docs directories
[/trunk/doc]
@docs = RW
# trainers have full access to the training repository
[trainingrepos:/]
@training = RW
Let's configure our Authz file:
[email protected] conf]# cat Authz
[Groups]
admin = Dave
Dev=tianlesoftware
[davesvn:/]
@admin = RW
@dev = RW
[Email protected] conf]#
4 Starting and Stopping SVN services
(1) Start the SVN service:
[Email protected] conf]# svnserve-d-R/U02/SVN
-D indicates background run
-r specifies that the root directory is/U02/SVN
[Email protected] conf]# Ps-ef | grep SVN
Root 4592 1 0 18:04? 00:00:00 svnserve-d-R/U02/SVN
Root 4594 3709 0 18:04 pts/1 00:00:00 grep svn
(2) To stop the SVN service:
Ps-aux |grep SVN
Kill-9 process Kill
This article transferred from: https://my.oschina.net/jast90/blog/382688
Setup and use of SVN server under Ubuntu