CentOS Build SVN server three steps

Source: Internet
Author: User
Tags collabnet

Installation Instructions

System Environment: CentOS-6.3
Installation method: Yum Install (source installation is prone to version compatibility issues)
Install software: The system automatically downloads SVN software

Check for installed versions

#检查是否安装了低版本的SVN
[Email protected]/]# Rpm-qa Subversion

#卸载旧版本SVN
[email protected] modules]# Yum Remove subversion

Install SVN

[email protected] modules]# Yum install httpd httpd-devel Subversion mod_dav_svn mod_auth_mysql

Confirm that the SVN module is installed

[Email protected]/]# Cd/etc/httpd/modules
[[email protected] modules]# ls | grep SVN
Mod_authz_svn.so
Mod_dav_svn.so

Verifying the installation

Verify that the SVN version information is installed
[Email protected] modules]# Svnserve--version

Svnserve, Version 1.6.11 (r934486)
Compiled in June 23 2012,00:44:03

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

The following repository back-end (FS) modules are available:

* Fs_base: The module can only operate the BDB repository.
* FS_FS: The module works with a text file (FSFS) repository.

Cyrus SASL certification is available.

Code base Creation

SVN repository is also required after the installation
[Email protected] modules]# mkdir-p/opt/svn/repositories
[Email protected] modules]# svnadmin create/opt/svn/repositories
After executing the above command, the repositories library is automatically established, and the View/opt/svn/repositories folder discovery contains Conf, db,format,hooks, locks, README.txt and other files, stating that an SVN repository has been established.

Configuring the Code base

Go to the folder created above conf, configure
[Email protected] modules]# cd/opt/svn/repositories/conf

User Password passwd configuration

[Email protected] password]# cd/opt/svn/repositories/conf
[Email protected] conf]# VI + passwd
Modify passwd to the following:

[Users]
# Harry = Harryssecret
# sally = Sallyssecret
zhoulf=123456 Permissions Control Authz Configuration

[Email protected] conf]# VI + Authz
The goal is to set which users can access which directories, append the following to the Authz file:

#设置 [/] represents all resources in the root directory
[/]
ZHOULF=RW Service svnserve.conf Configuration

[Email protected] conf]# VI + svnserve.conf

Append the following content:

[General]
#匿名访问的权限, can be read,write,none, default is read
Anon-access=none
#使授权用户有写权限
Auth-access=write
#密码数据库的路径
password-db=passwd
#访问控制文件
Authz-db=authz
#认证命名空间, Subversion is displayed in the authentication prompt and is used as a keyword in the credential cache
Realm=/opt/svn/repositories Configuring Firewall ports

[Email protected] conf]# Vi/etc/sysconfig/iptables
Add the following content:
-A input-m state--state new-m tcp-p TCP--dport 3690-j ACCEPT
Restart firewall after saving
[Email protected] conf]# service iptables restart

Start SVN

Svnserve-d-r/opt/svn/repositories

View SVN process

[Email protected] 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

[Email protected] conf]# Netstat-ln |grep 3690
TCP 0 0 0.0.0.0:3690 0.0.0.0:* LISTEN

Stop restarting SVN

[[email protected] password]# killall svnserve//Stop
[[email protected] password]# svnserve-d-r/opt/svn/repositories//start

Test

The SVN service is started and the connection is tested using the client.
Client Connection Address: svn://192.168.15.231
Username/password: zhoulf/123456


Source: >  

CentOS Build SVN server three steps

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.