SVN multi-version library configuration problems

Source: Internet
Author: User
Tags collabnet

When I first came into contact with SVN, I had been troubled by its multi-version library configuration problems for a long time because I didn't know about it. I still couldn't find the perfect solution, I accidentally configured Svn in Linux today and found that it is supported by specifying the global configuration file through the -- config-file parameter. Write down this article to correct the previous incorrect configuration (mainly in Windows) and share it with you.

The processing in Linux and Windows is basically the same. First, let's look at the help information of svnserve in Linux:

[root@localhost ~]# svnserve --helpusage: svnserve [-d | -i | -t | -X] [options]Valid options:  -d [--daemon]            : daemon mode  -i [--inetd]             : inetd mode  -t [--tunnel]            : tunnel mode  -X [--listen-once]       : listen-once mode (useful for debugging)  -r [--root] ARG          : root of directory to serve  -R [--read-only]         : force read only, overriding repository config file  --config-file ARG        : read configuration from file ARG  --listen-port ARG        : listen port                             [mode: daemon, listen-once]  --listen-host ARG        : listen hostname or IP address                             [mode: daemon, listen-once]  -T [--threads]           : use threads instead of fork [mode: daemon]  --foreground             : run in foreground (useful for debugging)                             [mode: daemon]  --log-file ARG           : svnserve log file  --pid-file ARG           : write server process ID to file ARG                             [mode: daemon, listen-once]  --tunnel-user ARG        : tunnel username (default is current uid's name)                             [mode: tunnel]  -h [--help]              : display this help  --version                : show program version information

Generally, the svn service is started, and only the root directory of the SVN version library is specified, as follows:

svnserve -d -r /data/svn

Create multiple version Libraries under/data/SVN:

cd /data/svnsvnadmin create repos1svnadmin create repos2

Configure the conf/svnserve. conf, CONF/passwd, and CONF/authz files in the repos1 and repos2 versions in sequence.

The problem arises, because most of the time, the same user needs to use the same account and password to access different version libraries, and the permission configuration is not easy to handle, previously, the solution for others was in svnserve. when passwd and authz are specified in Conf, the relative path is used to indicate the same file. This is a feasible method, but when adding a version library, you have to change the svnserve. conf file, which is inconvenient.

After carefully reading the help information of svnserve, you will find a -- config-file parameter, which is used to specify svnserve. when it comes to the conf path, it is clear that you only need to specify the -- config-file parameter when starting the svn service, all permissions are assigned by the specified svnserve. conf control, and svnserve under the conf directory of each version library. CONF configuration will be ignored. The specific startup parameters are as follows:

svnserve -d -r /data/svn --config-file /data/svn/svnserve.conf

If the RPM package is installed, the svn service is automatically installed. You only need to configure the/etc/sysconfig/svnserve file:

#vim /etc/sysconfig/svnserveOPTIONS="-r /data/svn --config-file /data/svn/svnserve.conf"

In Windows, the Subversion server of collabnet is used. It is installed in the service. The format of the specified ImagePath is: "D: \ Program Files (x86) \ collabnet \ Subversion server \ svnserve.exe "-- service-R" e: \ svn_repository "-- listen-port" 3690 ", the -- config-file parameter is not specified, as a result, new users who are new to SVN will be entangled in the configuration of Multi-version libraries. Now, just go to the Registry to change the ImagePath parameter of the svn service and append the -- config-file parameter:

"d:\Program Files (x86)\CollabNet\Subversion Server\svnserve.exe" --service -r "e:\svn_repository" --listen-port "3690" --config-file "e:\svn_repository\conf\svnserve.conf"

For the paths used in the preceding steps, convert them to their respective paths.

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.