虚位以待(AD)
虚位以待(AD)
首页 > 操作系统 > LINUX > linux下安装svn

linux下安装svn
类别:LINUX   作者:码皇   来源:互联网   点击:

我的云服务器的系统是centos 7 1 该方法适合在该系统下执行,其他系统没有尝试过,请注意。首先安装svn服务,1 yum install subversion,2然后检查下安装的版本号 因为版本号不同可能会出现不同的情况, yum install subversion。

我的云服务器的系统是centos 7.1 该方法适合在该系统下执行,其他系统没有尝试过,请注意。

首先安装svn服务

1 # yum install subversion

2然后检查下安装的版本号 因为版本号不同可能会出现不同的情况

# yum install subversion

版本 信息

[root@VM_137_37_centos ~]# svnserve --version

svnserve, version 1.7.14 (r1542130)

compiled Nov 20 2015, 19:25:09

Copyright (C) 2013 The Apache Software Foundation.

This software consists of contributions made by many people; see the NOTICE

file for more information.

Subversion is open source software, see http://subversion.apache.org/

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

* fs_base : Module for working with a Berkeley DB repository.

* fs_fs : Module for working with a plain file (FSFS) repository.

Cyrus SASL authentication is available.

3创建适合的存储svn的仓库

mkdir -p /home/svn/svnrepos

4创建版本库 svnadmin create /home/svn/svnrepos

5然后去到创建的仓库地址创建版本库 cd/home/svn/svnrepos

会有如下内容:

[root@VM_137_37_centos svnrepos]# ls -1

README.txt

conf

db

format

hooks

locks

6 然后进入到conf文件中修改内容 cd conf/

authz文件是权限控制文件

passwd是帐号密码文件

svnserve.conf SVN服务配置文件

7 修改密码

### This file is an example password file for svnserve.

### Its format is similar to that of svnserve.conf. As shown in the

### example below it contains one section labelled [users].

### The name and password for each user follow, one account per line.

[users]

# harry = harryssecret

# sally = sallyssecret

quwenzhe=123456

新增一个用户密码

8修改权限

html] view plaincopy

[/]

quwenzhe=rw

让其有读写的权限 如果有特殊权限要求情趣svn上寻找

9修改svnserve.conf文件 vi svnserve.conf

anon-access = read #匿名用户可读

auth-access = write #授权用户可写

password-db = passwd #使用哪个文件作为账号文件

authz-db = authz #使用哪个文件作为权限文件

realm = /home/svn/svnrepos # 认证空间名,版本库所在目录

注意去掉注释后前面不能有空格 要不然在执行的时候会报错

10启动svn

svnserve -d -r /var/svn/svnrepos(停止SVN命令 killall svnserve)

11然后就可以去windows上测试了

输入svn的地址就好后面的内容可以不输入

 

 

然后点确定会让其输入账户和密码 输入刚才在passwd上设置的就好。

相关热词搜索: