Detailed CentOS-6.3 installation configuration svn method _linux

Source: Internet
Author: User
Tags svn centos iptables collabnet

Installation Instructions

System Environment: CentOS-6.3

Installation mode: Yum Install (source code installation is easy to produce version compatibility problem)

Install software: The system automatically downloads SVN software

Check for installed versions

#检查是否安装了低版本的SVN

 [Root@localhost/]# Rpm-qa Subversion

#卸载旧版本SVN

[Root@localhost modules]# Yum Remove Subversion

Install SVN

[Root@localhost modules]# yum install httpd httpd-devel Subversion mod_dav_svn mod_auth_mysql

Verify that the SVN module is installed

[Root@localhost/]# cd/etc/httpd/modules
 [root@localhost modules]# ls | grep svn
 mod_authz_svn.so
 mod_ Dav_svn.so

Verifying installation

Verify that the SVN version information is already installed

[Root@localhost modules]# Svnserve--version
Svnserve, Version 1.6.11 (r934486) is


compiled at June 2012,00:44:03 


Copyright (C) 2000-2009 collabnet. 
Subversion is open source software, see the http://subversion.tigris.org/site. 
 This product contains software developed by CollabNet (http://www.Collab.Net/). The 

following versions of the Library backend (FS) module are available: 

* Fs_base: Modules can only operate BDB version libraries. 
* FS_FS: module works with the text file (FSFS) version Library. 

Cyrus SASL certification is available.

Code base Creation

SVN software needs to be built after the SVN installation is complete

[Root@localhost modules]# mkdir-p/opt/svn/repositories [root@localhost modules]# svnadmin-create/opt/svn/
 Repositories

After executing the above command, automatically set up the repositories library to view the/opt/svn/repositories folder discovery contains the Conf, Db,format,hooks, locks, README.txt and other documents, stating that an SVN library has been established.

Configuring Code Libraries

Go to the generated folder conf, configure

[Root@localhost modules]# cd/opt/svn/repositories/conf

User Password passwd configuration

[Root@localhost password]# cd/opt/svn/repositories/conf
 [root@admin conf]# VI + passwd

Modify the passwd for the following content:

[Users]
 # Harry = Harryssecret
 # sally = Sallyssecret
 

Permissions Control Authz Configuration

[Root@admin conf]# VI + Authz

The goal is to set which users can access which directories and append the following to the Authz file:

#设置 [/] represents all resources under the root directory 
[/]

Service svnserve.conf Configuration

[Root@admin conf]# VI + svnserve.conf

Append the following:

[General]
 #匿名访问的权限, can be read,write,none, default to read
 anon-access=none
 #使授权用户有写权限 
auth-access=write
 #密码数据库的路径 
password-db=passwd
 #访问控制文件 
authz-db=authz
 #认证命名空间, Subversion will be displayed in the authentication prompt, and as a key to the voucher cache 

Configuring firewall ports

[Root@localhost conf]# Vi/etc/sysconfig/iptables

Add the following:

-A input-m state--state new-m tcp-p TCP--dport 3690-j ACCEPT

Reboot firewall after saving

[root@localhost conf]# Service iptables restart

Start SVN

Svnserve-d-r/opt/svn/repositories

View the SVN process

[Root@localhost conf]# ps-ef|grep svn|grep-v grep
 root   12538   1 0 14:40?    00:00:00 svnserve-d-r/opt/svn/repositories

Detecting SVN ports

[Root@localhost conf]# netstat-ln |grep 3690
 tcp    0   0 0.0.0.0:3690        0.0.0.0:*          LISTEN

Stop restarting SVN

[Root@localhost password]# killall svnserve  /Stop 

Test

The SVN service has been started and the connection is tested using the client.

Client Connection Address: svn://192.168.15.231

Username/password: zhoulf/123456

Test creating folders, and so on.

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

Related Article

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.