linux svn 服务器 安装,linux 下svn服务器安装与配置

svn安装准备工作

# 检查服务器是否安装svn

rpm -qa subversion

# 卸载svn

yum remove subversion

安装svn

yum install subversion // yum方式安装SVN

mkdir -p /opt/svn/tutiantian.com/ // 创建SVN库

svnadmin create /opt/svn/tutiantian.com/ // SVN库文件分别是conf, db,format,hooks, locks, README.txt。

SVN目录结构 /opt/svn

auths.conf ---------------- SVN用户权限配置文件( 公用 )

passwd.conf --------------- SVN密码配置文件( 公用 )

svn.log ------------------- SVN日志文件

svn.pid ------------------- SVN PID文件

tutiantian.com ------------ SVN版本库文件夹

一、公用文件auths.conf配置

[groups]

g_admin = qizheng_admin

g_development = xzdesk

[tutiantian.com:/]

* =

@g_development = rw

g_admin = rw

[blog.tutiantian.com:/]

* =

@g_development = rw

g_admin = rw

[lib.com:/]

* =

@g_admin = rw

二、公用文件passwd.conf配置

[users]

xzdesk = woshishui

qizheng_admin = admin_123

三、版本库svnserve.conf 配置

# 打开文件修改

vim tutiantian.com/conf/svnserve.conf

### This file controls the configuration of the svnserve daemon, if you

### use it to allow access to this repository. (If you only allow

### access through http: and/or file: URLs, then this file is

### irrelevant.)

### Visit http://subversion.tigris.org/ for more information.

[general]

### These options control access to the repository for unauthenticated

### and authenticated users. Valid values are "write", "read",

### and "none". The sample settings below are the defaults.

anon-access = none

auth-access = write

### The password-db option controls the location of the password

### database file. Unless you specify a path starting with a /,

### the file's location is relative to the directory containing

### this configuration file.

### If SASL is enabled (see below), this file will NOT be used.

### Uncomment the line below to use the default password file.

password-db = /opt/svn/passwd.conf

### The authz-db option controls the location of the authorization

### rules for path-based access control. Unless you specify a path

### starting with a /, the file's location is relative to the the

### directory containing this file. If you don't specify an

### authz-db, no path-based access control is done.

### Uncomment the line below to use the default authorization file.

authz-db = /opt/svn/auths.conf

### This option specifies the authentication realm of the repository.

### If two repositories have the same authentication realm, they should

### have the same password database, and vice versa. The default realm

### is repository's uuid.

realm = My First Repository

[sasl]

### This option specifies whether you want to use the Cyrus SASL

### library for authentication. Default is false.

### This section will be ignored if svnserve is not built with Cyrus

### SASL support; to check, run 'svnserve --version' and look for a line

### reading 'Cyrus SASL authentication is available.'

# use-sasl = true

### These options specify the desired strength of the security layer

### that you want SASL to provide. 0 means no encryption, 1 means

### integrity-checking only, values larger than 1 are correlated

### to the effective key length for encryption (e.g. 128 means 128-bit

### encryption). The values below are the defaults.

# min-encryption = 0

# max-encryption = 256

四、重启SVN测试

# 杀死svn进程

pkill -9 svn

# 用3690端口启动svn

/usr/bin/svnserve -d --listen-port 3690 -r /opt/svn --log-file=/opt/svn/svn.log --pid-file=/opt/svn/svn.pid

# 用3691启动svn

/usr/bin/svnserve -d --listen-port 3691 -r /opt/svn --log-file=/opt/svn/svn.log --pid-file=/opt/svn/svn.pid

五、检出svn版本

svn co svn://127.0.0.1/demo.jt018.com aaaa.demo.com

svn co svn://127.0.0.1:3691/jt018.com aaaa.jt018.com

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值