[Project Management] install the svn server on centos VPS

Source: Internet
Author: User

Generally, the centos system already has the svn tool. You can choose to use it directly. If no installation is available, you need to install it step by step from the download.

The following are the general steps. The test is successful for your reference. There is no integration with Apache.

 

1. Download related software

[Root @ arui opt] # wgethttp: // subversion.tigris.org/downloads/subversion-1.6.1.tar.gz

[Root @ arui opt] # wgethttp: // subversion.tigris.org/downloads/subversion-deps-1.6.1.tar.gz

 

Ii. installation and configuration

1. decompress the two packages in the same directory:

[Root @ arui opt] # tar -zxvfsubversion-1.6.1.tar.gz

[Root @ arui opt] # tar -zxvfsubversion-deps-1.6.1.tar.gz

 

2. Compilation and installation:

[Root @ arui opt] # cd subversion-1.6.1.

[Root @ arui subversion-1.6.1] #./configure -- prefix =/usr/local/SVN/

[Root @ arui subversion-1.6.1] # Make & make install

If make fails, the compilation environment may be missing. For details, see the error message.

 

3. Add svn-related commands to environment variables:

[Root @ arui subversion-1.6.1] # echo "Export Path = $ path:/usr/local/SVN/bin/">/etc/profile

[Root @ arui subversion-1.6.1] # source/etc/profile

After successful completion, you can enter svn-related commands for confirmation.

[Root @ arui subversion-1.6.1] # svnversion

3. Create a SVN Repository

1. Create the svn root directory:

[Root @ arui subversion-1.6.1] # mkdir-P/data/SVN/

The/data/SVN/directory is created here.

 

2. Create a test warehouse:

[Root @ arui subversion-1.6.1] # mkdir-P/data/SVN/project/

[Root @ arui subversion-1.6.1] # svnadmincreate/data/SVN/project/

After creation, you can see many svn-related files in the/data/SVN/project/directory. If the command cannot be found, try svnadmin create (multiple spaces in the middle ).

3. modify the configuration file:

[Root @ arui subversion-1.6.1] # cd/data/SVN/project/CONF/

Go to the conf directory and edit the svnserve. conf, authz, and passwd files. For more information, see the following.

1) edit the svnserve. conf file

[Root @ arui conf] # vi svnserve. conf

[General]

Anon-access = none

Auth-access = write

Password-DB = passwd

Authz-DB = authz

Realm = project

 

2) edit the authz File

[Root @ arui conf] # vi authz

[Project:/]

Arui = RW

# Add a user named arui to the project repository with the read/write permission.

 

3) edit the passwd file

[Root @ arui conf] # vi passwd

Arui = 123456

# Set the password of the arui user to 123456

 

4. Start the svn Server:

1. Start the svn service and specify the svn root directory:

[Root @ arui opt] # svnserve-d-r/data/SVN/

 

2. Check whether the service is started properly:

[Root @ arui opt] # netstat-tunlp | grep SVN

TCP 0 0 0.0.0.0: 3690 0.0.0.0: * listen8646/svnserve

Indicates that the server has started properly.

You can also telnet to port 3690 of localhost to check whether telnet is successful.

 

V. Client Connection Verification:

Use the svn client to connect to SVN: // VPs IP Address/Project. Enter the username and password 123456 as prompted. If the connection succeeds, the connection is successful.

If the connection fails, it may be that port 3690 of the vsp server is not open. In this case, use Telnet to test. If it is not open, you need to set iptable on VPs to remove the port restriction.

[Root @ arui opt] # vi/etc/sysconfig/iptables

Add:

-A output-p tcp-m tcp -- dport 3690-jaccept

---------------------------------------------------------------------------

Http://blog.csdn.net/arui319

The Android Application Development solution has been published. You are welcome to purchase and read it.

This article can be reproduced, but please keep the above author information.

Thank you.

---------------------------------------------------------------------------

 

 

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.