CentOS 5.5 Installation svn (Subversion)

Source: Internet
Author: User

Check for installed versions

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

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

#wget http://mirror.centos.org/centos/5/os/i386/CentOS/subversion-javahl-1.6.11-12.el5_10.i386.rpm

# yum Install Subversion-javahl

# Svnserve--version

Code base Creation

SVN repository is also required after the installation
# mkdir-p/opt/svn/repo
# svnadmin Create/opt/svn/repo
After executing the above command, automatically establish the Repo test library, View/opt/svn/repo 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
Cd/opt/svn/repo/conf

User Password passwd configuration

#cd/opt/svn/repos/conf
#vi passwd
Modify passwd to the following:

[Users]
# Harry = Harryssecret
# sally = Sallyssecret

user1=123456

User name = password

So we set up the User1 user, 123456 password

All of the above statements must be shelf written, the left cannot be blank, or an error will occur.

Permissions Control Authz Configuration

# 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
[/] or written [repl:/]

Hello = RW

This means that Hello users have read and write access to all directories under the Repo Test library, but can also be qualified.
If you use it yourself, read it directly.

All of the above statements must be shelf written, the left cannot be blank, or an error will occur.

Service svnserve.conf Configuration

#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/repo

All of the above statements must be shelf written, the left cannot be blank, or an error will occur.

To modify a service file:

#vi/etc/init.d/svnserve

Args= "--daemon--pid-file=${pidfile} $OPTIONS" join "-d-r/opt/svn"

args= "-d-r/opt/svn--daemon--pid-file=${pidfile} $OPTIONS"

Configuring firewall ports

# 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
# Service Iptables Restart

Start the server:

#service Svnserve Start

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/repo

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//start

Test

The SVN service is started and the connection is tested using the client.
Client Connection Address: svn://192.168.1.9
Username/password: user1/123456
Tests the creation of folders and other operations.

CentOS 5.5 Installation svn (Subversion)

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.