Linux Build SVN server

Source: Internet
Author: User
Tags auth root access collabnet

1. SVN Server Installation operating system: Redhat Linux AS4
Get SVN Install package
Download http://subversion.tigris.org/downloads/subversion-1.4.0.tar.gz and http://subversion.tigris.org/downloads/ Subversion-deps-1.4.0.tar.gz.
Compile svn to log in as the root user.
Upload subversion-1.4.0.tar.gz and subversion-deps-1.4.0.tar.gz to the server.
Tar xfvz subversion-1.4.0.tar.gz
Tar xfvz subversion-deps-1.4.0.tar.gz
CD subversion-1.4.0
./configure--PREFIX=/USR/LOCAL/SVN--without-berkeley-db
Make clean
Make
Make install
Vi/etc/profile, in/etc/profile last added:
Path= $PATH:/usr/local/svn #注意这里不能有空格 that is PATH = $PATH:/usr/local/svn
Export PATH
SVN test svnserve–version
If shown below, SVN installation succeeds:
Svnserve, Version 1.4.0 (r21228)
Compiled OCT 2006, 10:18:56copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).
The following repository back-end (FS) modules is available:
* Fs_fs:module for working with a plain file (FSFS) repository.
#若出现-bash:svn:command not found requires a restart of the Execute command: reboot
2.SVN Configuration Build SVN repository directory to build multiple:
Mkdir-p/www/svn/konggu
Mkdir-p/www/svn/xinfang
Build SVN repository Svnadmin Create/www/svn/konggu
Svnadmin Create/www/svn/xinfang
Vi/www/svn/konggu/conf/svnserve.conf
Content modified to:
[General]
Anon-access = None
auth-access = Write
Password-db = pwd
Authz-db = Authz
Realm = Konggu


Vi/www/svn/xinfang/conf/svnserve.conf
Content modified to:
[General]
Anon-access = None
auth-access = Write
Password-db = pwd
Authz-db = Authz
Realm = Xinfang
3. Add Users
#为了简化配置, a total of 1 user profiles are available for 2 repositories. If necessary, you can also separate.
Note: Changes to the user profile take effect immediately and do not have to restart SVN.
Modify the passwd file under the Conf folder in the Konggu and Xinfang directories
Add LIPENGPENG=LPP at the end
4. Modify Permissions
Attention:
* The user name that appears in the permissions profile must already be defined in the user profile.
* Changes to the permissions profile take effect immediately and do not have to restart SVN.
User group format:
[Groups]
< user group name > = < user 1>,< user 2>
Of these, 1 user groups can contain 1 or more users, separated by commas between users.
Repository directory format:
[< Repository >:/project/catalog]
@< user Group Name > = < permissions >
< user name > = < permissions >
Where the box number can be written in several ways:
/, which indicates the root directory and the following. The root directory is specified at svnserve startup and we specify/opt/svndata. This means that the permissions are set for all repositories.
repos1:/, which indicates that permissions are set on version library 1
REPOS2:/ABC, which indicates that permissions are set on the ABC project in version Library 2
REPOS2:/ABC/AAA, which represents the AAA directory setting permissions on the ABC project in version 2
A permission principal can be a user group, user, or *, and the user group is preceded by @,* to represent all users. Permissions can be W, R, WR, and NULL, and NULL indicates no permissions.
Example:
[Groups]
admin = Alan
[/]
@admin = RW
[REPOS1:/ABC/AAA]
King = RW
[Repos2:/pass]
King =
5. Start SVN to build the user Useradd svn (svn username) to start SVN
passwd SVN
Set a password for (user svn) as prompted
#使用useradd命令所建立的账号, is actually saved in the/etc/passwd text file
Allow user svn access to Repository Chown-r SVN:SVN/WWW/SVN
Start svn su-svn-c "svnserve-d--listen-port 9999-r/www/svn"
which
SU-SVN means to start svn as user svn
-d means running in daemon (background run)
–listen-port 9999 means using 9999 ports, which you can replace with the ports you need. Note, however, that using a port under 1024 requires root access
-R/WWW/SVN specifies that the root directory is/WWW/SVN
6. Update the test
Checkout address: Svn://192.168.109.152:9999/konggu User name LIPENGPENG/LPP






1. Create an instance
Svnadmin Create/www/svn/ershoufang
2. Deleting an instance
Rm-rf/www/svn/ershoufang
3. Create a user
#/usr/local/http2/bin/htpasswd-c/www/svn/konggu/conf/passwd Tiandongzhi
#报错: The file/www/svn/konggu/conf/passwd does not appear to be a valid htpasswd file.









Linux Build SVN server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.