Linux Install Configure SVN standalone server steps to share _linux

Source: Internet
Author: User
Tags auth mkdir svn ssh collabnet

file:///

Direct version library access (local disk).

http://

By configuring the WebDAV Protocol of the Subversion Apache server.

https://

and http:// similar, but include SSL encryption.

svn://

svnservea protocol that is customized through a service.

svn+ssh://

With svn:// similar but via SSH encapsulation


SVN stores version data in 2 different ways: BDBAnd Fsfs。 Because the BDB method may lock the data when the server is interrupted, it is safer to fsfs the way.
1. SVN Server Installation operating system: Redhat Linux AS4
Get the SVN installation package
Download http://subversion.tigris.org/downloads/subversion-1.4.0.tar.gzAnd http://subversion.tigris.org/downloads/subversion-deps-1.4.0.tar.gz。
Compile SVN to RootUser Login.
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=/opt/svn–without-berkeley-db–with-zlib
(Note: in SvnserveTo run without Apache compilation parameters. To FsfsFormat Store version library, do not compile berkeley-db)
Make clean
Make
Make install
Vi/etc/profile, at the end of/etc/profile joined:
Path= $PATH:/opt/svn/bin
Export PATH
SVN test svnserve–version
If the following appears, SVN installation succeeds:
Svnserve, Version 1.4.0 (r21228)
Compiled OCT 2006, 10:18:56copyright (C) 2000-2006 collabnet.
Subversion is open source software, http://subversion.tigris.org/
This product includes software developed by CollabNet ( http://www.Collab.Net/).
The following repository back-end (FS) modules are available:
* Fs_fs:module for working with a plain file (FSFS) repository.
2. SVN configuration builds SVN version library directory to build multiple:
Mkdir-p/OPT/SVNDATA/REPOS1
Mkdir-p/opt/svndata/repos2
Set up SVN version library svnadmin CREATE/OPT/SVNDATA/REPOS1
Svnadmin Create/opt/svndata/repos2
Modify SVN version Library profile version Library 1:
Vi/opt/svndata/repos1/conf/svnserve.conf
Content modified to:
[General]
Anon-access = None
auth-access = Write
Password-db =/opt/svn/conf/pwd.conf
Authz-db =/opt/svn/conf/authz.conf
Realm = Repos1
Version Library 2:
Vi/opt/svndata/repos2/conf/svnserve.conf
Content modified to:
[General]
Anon-access = None
auth-access = Write
Password-db =/opt/svn/conf/pwd.conf
Authz-db =/opt/svn/conf/authz.conf
Realm = Repos2
That is, except realm = Repos2, the other configuration files are identical to the version Library 1 profile. If there are more versions of the library, and so forth.
Configure the SVN user vi/opt/svn/conf/pwd.conf that is allowed to access
To simplify the configuration, the 2 version libraries share 1 user profiles. If necessary, can also be separated.
Note: Changes to user profiles take effect immediately and do not need to reboot SVN
The file format is as follows:
[Users]
< user 1> = < password 1>
< user 2> = < password 2>
Of these, [users] are required. The following lists the users who will access SVN, one line per user. Example:
[Users]
Alan = password
King = Hello
Configure SVN user access permissions vi/opt/svn/conf/authz.conf
To simplify configuration, the 3 version libraries share 1 rights profile/opt/svn/conf/pwd.conf. If necessary, can also be separated. The user group and version Library directory permissions are defined in the file.
Note:
* 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 need to reboot 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.
Version Library catalog format:
[< Version Library >:/project/directory]
@< user Group Name > = < permissions >
< user name > = < permissions >
Some of the box numbers can be written in several ways:
/, representing the root directory and below. The root directory is specified when the Svnserve is started, and we specify/opt/svndata. This way,/means to set permissions on all versions of the library.
repos1:/, to set permissions on version library 1
REPOS2:/ABC, to set permissions on the ABC project in version Library 2
REPOS2:/ABC/AAA, to set the AAA directory permissions for the ABC project in version Library 2
A permission principal can be a user group, user, or *, and the user group adds @,* to the front to represent all users. Permissions can be W, R, WR, and NULL, and NULL means no permissions.
Example:
[Groups]
admin = Alan
[/]
@admin = RW
[REPOS1:/ABC/AAA]
King = RW
[Repos2:/pass]
King =
SVN configuration complete, delete unwanted files Rm/opt/svndata/repos1/conf/authz
rm/opt/svndata/repos1/conf/passwd
Rm/opt/svndata/repos2/conf/authz
rm/opt/svndata/repos2/conf/passwd
3. Start SVN set up to start SVN user Useradd svn
passwd SVN
Follow the prompts to set the password for the user svn
Allow user svn access to version library Chown-r Svn:svn/opt/svndata
Chown-r Svn:svn/opt/data
Start Svnsu-svn-c "svnserve-d--listen-port 9999-r/opt/svndata"
which
SU-SVN says to start SVN as the user svn
-D indicates running in daemon (background run)
–listen-port 9999 means using 9999 ports, you can replace them with the port you need. Note, however, that using ports under 1024 requires root permissions
-r/opt/svndata specifies that the root directory is/opt/svndata
Check:
Ps-ef|grep Svnserve
If it appears as follows, the start is successful:
SVN 6941 1 0 15:07? 00:00:00 Svnserve-d–listen-port 9999-r/opt/svndata
There are many ways to access SVN over the web, see Configure WEBSVNOr Configure BssvnbrowserThe method.
Related reference:
http://www.ibm.com/developerworks/cn/opensource/os-subversion/

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.