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

如何在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状态

 

文章来源网络,作者:运维,如若转载,请注明出处:https://shuyeidc.com/wp/115363.html<

(0)
运维的头像运维
上一篇2025-02-18 01:57
下一篇 2025-02-18 01:58

相关推荐

  • 企业安全管理的“六脉神剑”

    当考虑确定计算系统、数据和网络的可用性和完整性控制时,与可考虑潜在机会授权的管理员相比,普通用户拥有更少的特权。系统管理员、执行备份的操作人员、数据库管理员、维修技师甚至帮助台支持…

  • 黑客瞄准Facebook用户出新招

    3月18日,杀毒软件厂商McAfee周三表示,黑客们在网络上投放了大批针对Facebook四亿用户的带病毒垃圾邮件,旨在窃取用户银行密码等机密信息。 McAfee称,邮件提示所有F…

  • 奇安信世界互联网大会发布全新品牌形象

     三国演义》赤壁之战中有一场智斗:诸葛亮乘周瑜与曹仁激战,命赵子龙夺南郡,大捷后取得守将虎符,用虎符调开曹兵,兵不血刃再夺两城。这场智斗中的关键道具——虎符,穿越千年来到…

  • 盘点:2020年最酷的10家网络安全初创公司

    应对明日威胁 近几年涌现了一批出色的网络安全公司,致力于解决各种网络安全问题,从自动遵守复杂的全球隐私法规,到保护应用安全以及将应用从网络中隔离出来,发现黑客最有可能从哪发起攻击。…

  • 准备好建立组织的数字信任了吗?

    随着组织继续其数字化转型之旅,他们需要能够相信其数字资产是安全的。在当今的环境中,这并不容易,因为网络攻击的数量和复杂性不断增加,组织面临着远程工作和内部行为的挑战。数字信任可以使…

发表回复

您的邮箱地址不会被公开。必填项已用 * 标注