如何在CentOS 6.3中安装和配置SVN服务器

2022-11-14 0 218



如何在CentOS 6.3中安装和配置SVN服务器

Subversion是一个版本控制系统。与RCS和CVS相比,Subversion使用分支管理系统。它旨在取代CVS。网络上的大多数免费版本控制服务都是基于Subversion的。

Subversion的版本库可以通过网络访问,从而使用户可以在不同的电脑上进行操作。从某种程度上来说,允许用户在各自的空间里修改和管理同一组数据可以促进团队协作。因为修改不再是单线进行(单线进行也就是必须一个一个进行),开发进度会进展迅速。此外,由于所有的工作都已版本化,也就不必担心由于错误的更改而影响软件质量—如果出现不正确的更改,只要撤销那一次更改操作即可。某些版本控制系统本身也是软件配置管理系统(SCM),这种系统经过精巧的设计,专门用来管理源代码树,并且具备许多与软件开发有关的特性——比如对编程语言的支持或者提供程序构建工具。不过Subversion并不是这样的系统,它是一个通用系统,可以管理任何类型的文件集。

 

查看当前环境是否有安装SVN服务

 

# rpm -qa subversion

 

使用yum命令进行SVN服务的安装

 

yum -y install subversion

 

创建SVN文件夹

 

mkdir -p /opt/svn/repos/svn1

 

创建SVN版本库

 

svnadmin create /opt/svn/repos/svn1

 

修改SVN配置文件

 

# vim /opt/svn/repos/svn1/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 = passwd

### 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 = authz

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

 

如何在CentOS 6.3中安装和配置SVN服务器

 

首页提交需求联系我们

CentOS 6.3环境下SVN服务器的安装与配置

时间:2017-11-01 来源:风信官网 点击: 388次

 

Subversion是一个版本控制系统,相对于的RCS、CVS,采用了分支管理系统,它的设计目标就是取代CVS。互联网上免费的版本控制服务多基于Subversion。

 

Subversion的版本库可以通过网络访问,从而使用户可以在不同的电脑上进行操作。从某种程度上来说,允许用户在各自的空间里修改和管理同一组数据可以促进团队协作。因为修改不再是单线进行(单线进行也就是必须一个一个进行),开发进度会进展迅速。此外,由于所有的工作都已版本化,也就不必担心由于错误的更改而影响软件质量—如果出现不正确的更改,只要撤销那一次更改操作即可。某些版本控制系统本身也是软件配置管理系统(SCM),这种系统经过精巧的设计,专门用来管理源代码树,并且具备许多与软件开发有关的特性——比如对编程语言的支持或者提供程序构建工具。不过Subversion并不是这样的系统,它是一个通用系统,可以管理任何类型的文件集。

 

查看当前环境是否有安装SVN服务

 

# rpm -qa subversion

 

使用yum命令进行SVN服务的安装

 

yum -y install subversion

 

创建SVN文件夹

 

mkdir -p /opt/svn/repos/svn1

 

创建SVN版本库

 

svnadmin create /opt/svn/repos/svn1

 

修改SVN配置文件

 

# vim /opt/svn/repos/svn1/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 = passwd

### 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 = authz

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

 

1-1G101114621.png

 

创建svn用户和权限分配

 

passwd 此文件配置用户账号和密码

 

# vim /opt/svn/repos/svn1/conf/passwd

 

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

 

username = userpassword

 

username为用户名 userpassword为用户密码

如何在CentOS 6.3中安装和配置SVN服务器

 

authz 此文件配置用户权限

如何在CentOS 6.3中安装和配置SVN服务器

 

启动SVN进程

 

svnserve -d -r /opt/svn/repos #注意目录,不包含svn1

 

查看进程

 

netstat –apn | grep svnserve

 

ps aux | grep svnserve #查看服务是否启动

 

测试SVN服务器是否正常连接,默认情况下SVN服务器开启3690

 

svn://192.168.1.1/svn1

 

如果CentOS服务器有开启防火墙和selinux状态,请进行关闭

 

将3690端口规则添加到防火墙

 

# service iptables status //查看防火墙状态

 

vi /etc/sysconfig/iptables

 

-A INPUT -p tcp -m tcp –dport 3690 -j ACCEPT

 

# service iptables stop //关闭防火墙

# service iptables start //开启防火墙

 

# vim /etc/selinux/config //配置selinux状态

 

1. 本站所有资源来源于用户上传和网络,因此不包含技术服务请大家谅解!如有侵权请邮件联系客服!cheeksyu@vip.qq.com
2. 本站不保证所提供下载的资源的准确性、安全性和完整性,资源仅供下载学习之用!如有链接无法下载、失效或广告,请联系客服处理!
3. 您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容资源!如用于商业或者非法用途,与本站无关,一切后果请用户自负!
4. 如果您也有好的资源或教程,您可以投稿发布,成功分享后有积分奖励和额外收入!
5.严禁将资源用于任何违法犯罪行为,不得违反国家法律,否则责任自负,一切法律责任与本站无关

源码下载

发表评论
暂无评论