This article describes the steps to build an SVN server under CentOS. Share to everyone for your reference, specific as follows:
1. Install SVN
2. Verify that the installation is successful
3. Create SVN version Library
mkdir svn
svnadmin Create Svn/repo
Note: The repo here is the version library name
4. Configure SVN
After the version library is created, 3 profiles are generated in the Conf directory of this version library:
[Root@singledb conf]# pwd
/root/svn/repo/conf
[root@singledb conf]# ls-authz passwd svnserve.conf
Description
(1) SVNSERVE.CONF:SVN Service comprehensive configuration file.
(2) passwd: username password file.
(3) Authz: Permissions configuration file.
4.1 Modifying passwd files
[Users]
shang=123456
li=123456
Note: Shang is username, 123456 is password
4.2 Configuration can use plaintext password
vi/$HOME/.subversion/servers
#找到以下内容, comments are removed and changed to Yes
Store-plaintext-passwords = yes
4.3 Modifying Authz files
[Groups]
Team=shang,li
[repo:/]
@team =RW
Note: Repo the SVN version library name that was previously established
4.4 Modification Svnserve.conf
[General]
Anon-access = none
auth-access = Write
password-db = passwd
authz-db = Authz
5. Start and Stop SVN
5.1 Start SVN
5.2 Off SVN
Ps-aux |grep SVN
kill-9 Process ID
6. Import Project
$ mkdir MyProject
$ mkdir myproject/trunk
$ mkdir myproject/branches
$ mkdir myproject/tags
SVN import MyProject svn://192.168.5.228/repo/myproject-m "I Import Project"
7. Export Project
SVN Co svn://192.168.5.228/repo/myproject
I hope this article will help you CentOS server management.