SVN server Setup under Linux

Source: Internet
Author: User

In view of the construction, the reference online a lot of information, online information in useful, but also pit a lot of people

The purpose of this article is to let the successor in the build SVN server no longer make a mistake, no longer by the Internet over the pit Father works entrap, so summarized

/****** Start *********/

System Environment: Centos 6.5

First step: Install Svnserve with the Yum command, as follows:

>yum-y Install Subversion

This command automatically installs the SVN server-related services and dependencies, and the installation completes with the Automatic Stop command running

To view the SVN installation location, you can use the following command:

>RPM-QL Subversion

Step two: Create the Repository directory (this is the directory only, provide a storage location for the repository to be created later)

Choose to create the repository under the Var path, currently in the root directory, once created as follows:

>mkdir/var/svn/svnrepos

Step three: Create the SVN repository

Based on the path established in the second step, create the repository with the following command:

>svnadmin create/var/svn/svnrepos/xxxx (xxxx is your expected repository name, customizable)

After the successful creation, enter the XXX directory

>cd/var/svn/svnrepos/xxxx

To enter the directory, you can see the following file information:

Fourth Step: Configuration modification

Enter the repository directory that has been created, that is, the XXXX created by the previous article

Enter CONF

>cd/var/svn/svnrepos/xxxx/conf

The Conf directory contains three important configuration files, as follows:

Authz: Responsible for account permissions management, control account whether read and write permissions

passwd: User list management for account and password

SVNSERVE.CONF:SVN Server configuration file

The details are as follows: (I hope you strictly follow the following information, do not refer to other information on the network)

Modify the Authz file information as follows:

>vi Authz

At the end of the file content, add the following:

Just add at the end, no need to modify and add anything in the other parts of the file (please ignore groups by my mosaic, it is also a useless record, I forgot to delete it), at the end of the following:

[\]

Account 1 = RW

Account 2 = RW

。。。。。

RW indicates that the account can read and write permissions, note that [] in the slash, must be a backslash, some tutorials that need to add the repository name in parentheses, I directly suggest that this write, so write permission to access greater, to avoid some errors

Modify passwd File information

>vi passwd

account password files do not need to be modified, but also directly append the account and password information to the file, note the format is:

Account Number = password

Example: admin = 123456

Modify Svnserve.conf (important)

VI svnserve.conf

The original file contents are commented out, we only need to remove 4 of the specified content before the comment, as follows:

Most of the network information, will let you authz-db = Authz This strip to remove the comments, after I have been the pit experience many times, this strip removed, although the SVN server can connect, but always will prompt "authentication failed", comments out can be normal

And most of the information will let you fill in realm = My First repository server IP, after testing, filled with no use, so we remove the comments, no need to make any changes

The configuration has been completed and the account information has been added successfully.

Fifth Step: Firewall Open

In most cases, the server installation is complete, after the configuration is complete, unable to connect the SVN server, is a firewall problem, you can follow the following 3 commands one-off

>/sbin/iptables-i input-p TCP--dport 3690-j ACCEPT

>/etc/init.d/iptables Save

>service iptables Restart

Execution results such as:

Six: Start the SVN server

Under Follow directory, execute the following command:

>svnserve-d-r/var/svn/svnrepos

After successful startup, you can use Ps-aux to see if the service started successfully

Seven: Client access to SVN server

On the Windows client, enter the address: SVN://IP Address: 3690/xxxx (IP address for your Linux ip,xxxx created for the previous version of the repository name, 3690 for the SVN default port)

Enter user name and password, enter to access

To this, Linux under the SVN server build summed up, thank you for reading

If this article is helpful to you, please help to promote

(Original, reproduced please specify the source, pirated must investigate)

SVN server Setup under Linux

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.