centos7搭建svn服务器及客户端设置

centos7貌似预装了svn服务(有待确认),因此我们直接启动该服务即可

一、svn服务端配置(服务器IP假设为192.168.100.1)

步骤1:创建存放代码库目录

mkdir -p /var/svn

步骤2:启动svn服务

svnserve -d -r /var/svn

步骤3:创建代码库something

[root@model ~]# cd /var/svn
[root@model svn]#
[root@model svn]#
[root@model svn]# svnadmin create something
[root@model svn]#
[root@model svn]#
[root@model svn]# cd something
[root@model something]#
[root@model something]#
[root@model something]# ls
conf db format hooks locks README.txt
[root@model something]#
[root@model something]#
[root@model something]# cd conf
[root@model conf]#
[root@model conf]#
[root@model conf]# ls
authz passwd svnserve.conf
[root@model conf]#
[root@model conf]#

步骤4:配置svnserve.conf文件

[root@model conf]#
[root@model conf]# vi 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.apache.org/ for more information.

[general]
### The anon-access and auth-access options control access to the
### repository for unauthenticated (a.k.a. anonymous) users and
### authenticated users, respectively.
### Valid values are "write", "read", and "none".
### Setting the value to "none" prohibits both reading and writing;
### "read" allows read-only access, and "write" allows complete
### read/write access to the repository.
### The sample settings below are the defaults and specify that anonymous
### users have read-only access to the repository, while authenticated
### users have read and write access to the repository.
# anon-access = read
# auth-access = write 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

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

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

#此选项指定的库的认证领域
raalm = /var/svn/something

The force-username-case option causes svnserve to case-normalize

usernames before comparing them against the authorization rules in the

authz-db file configured above. Valid values are "upper" (to upper-

case the usernames), "lower" (to lowercase the usernames), and

"none" (to compare usernames as-is without case conversion, which

is the default behavior).

force-username-case = none

[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

"svnserve.conf" 71L, 3173C written

步骤5:配置passwd文件

[root@model conf]# vi 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

user = 123456 ~

~

"passwd" 11L, 326C written

步骤6:配置authz文件

[root@model conf]#
[root@model conf]# vi authz
### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to:
### - a single user,
### - a group of users defined in a special [groups] section,
### - an alias defined in a special [aliases] section,
### - all authenticated users, using the '$authenticated' token,
### - only anonymous users, using the '$anonymous' token,
### - anyone, using the '*' wildcard.
###
### A match can be inverted by prefixing the rule with '~'. Rules can
### grant read ('r') access, read-write ('rw') access, or no access
### (''). [aliases]

joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average

[groups]

harry_and_sally = harry,sally

harry_sally_and_joe = harry,sally,&joe

admin = user

[/foo/bar]

harry = rw

&joe = r

* =

[/]
user = rw

# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r

[something:/]
@admin = rw
~
~
~
~
~
~
"authz" 35L, 1093C written

此处的意思是用户usr_0对目录[/](代码库something的根目录)下的所有文件,具有读(r)和写(w)的权限

步骤7:关闭防火墙及防火墙开机自启动

systemctl stop firewalld.service
systemctl disable firewalld.service

至此,svn服务端配置完毕

二、svn客户端配置(客户端IP假设为192.168.100.2)

步骤1:关闭防火墙

[root@localhost svn]#
[root@localhost svn]# systemctl stop firewalld.service
[root@localhost svn]#
[root@localhost svn]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
[root@localhost svn]#

步骤2:创建客户端svn上提取文件存放目录

[root@localhost /]#
[root@localhost /]# mkdir /svn
[root@localhost /]#
[root@localhost /]#

步骤3:登录svn服务器并检出something库中的文件

[root@localhost svn]#
[root@localhost svn]#
[root@localhost svn]# svn co --username user --password 123456 svn://192.168.100.1/something -----------------------------------------------------------------------

注意! 你的密码,对于认证域: <svn://192.168.100.1:3690> /var/svn/something



只能明文保存在磁盘上! 如果可能的话,请考虑配置你的系统,让 Subversion

可以保存加密后的密码。请参阅文档以获得详细信息。 你可以通过在“/root/.subversion/servers”中设置选项“store-plaintext-passwords”为“yes”或“no”,

来避免再次出现此警告。

-----------------------------------------------------------------------

保存未加密的密码(yes/no)?n

A something/package

A something/package/apache-maven-3.5.0-bin.tar.gz

A something/package/mysql-5.6.37-linux-glibc2.12-x86_64.tar.gz

A something/package/jdk-8u141-linux-x64.gz

A something/package/apache-tomcat-7.0.79.tar.gz

取出版本 6。

[root@localhost svn]#

[root@localhost svn]# ls

something

[root@localhost svn]#

[root@localhost svn]#

更新svn版本库

[root@localhost package]#
[root@localhost package]#
[root@localhost package]# svn up /svn/something
正在升级 '/svn/something':
认证领域: <svn://192.168.100.1:3690> /var/svn/something
“user”的密码: -----------------------------------------------------------------------

注意! 你的密码,对于认证域: <svn://192.168.100.1:3690> /var/svn/something



只能明文保存在磁盘上! 如果可能的话,请考虑配置你的系统,让 Subversion

可以保存加密后的密码。请参阅文档以获得详细信息。 你可以通过在“/root/.subversion/servers”中设置选项“store-plaintext-passwords”为“yes”或“no”,

来避免再次出现此警告。

-----------------------------------------------------------------------

保存未加密的密码(yes/no)?n

D jenkins.war

更新到版本 7。

[root@localhost package]#

[root@localhost package]#

[root@localhost package]#

	</div>
<p class="postfoot">
posted on <span id="post-date">2017-07-30 14:54</span> <a href="http://www.cnblogs.com/simple-man/">简单侠</a> 阅读(<span id="post_view_count">337</span>) 评论(<span id="post_comment_count">0</span>) <a href="https://i.cnblogs.com/EditPosts.aspx?postid=7259160" rel="nofollow">编辑</a> <a href="#" onclick="AddToWz(7259160);return false;">收藏</a>
</p>
</div>

原文:http://www.cnblogs.com/simple-man/p/7259160.html

posted @
2017-10-27 18:22 
jobs-lgy 
阅读(...) 
评论(...) 
编辑 
收藏

centos7搭建svn服务器及客户端设置的更多相关文章

  1. CentOS7 搭建 SVN 服务器

    CentOS7 搭建 SVN 服务器 介绍SVN: SVN是Subversion的简称,是一个开放源代码的版本控制系统,相较于RCS.CVS,它采用了分支管理系统,它的设计目标就是取代CVS.互联网上 ...

  2. centos7 搭建svn服务器&客户端的访问&备份迁移

    当今用于版本控制的软件程序主要的有svn和git,其它软件咱不熟悉,今天记录下搭建svn服务器和svn客户端使用: 使用环境:虚拟机为centos7系统,svn服务器安装在centos7系统平台上,s ...

  3. centos7 搭建svn服务器

    1.安装svn服务器: yum install subversion 2.配置svn服务器: 建立svn版本库根目录及相关目录即svndata及密码权限命令svnpasswd: mkdir -p /a ...

  4. centos7搭建svn服务器并支持http方式访问

    因为公司其他人员需要,需要在服务器上搭建svn服务,途中遇到不少问题,做下记录 第一步,安装svn 默认centos7是已经安装了svn即subversion 检查是否安装 rpm -qa subve ...

  5. CentOS7搭建NTP服务器及客户端同步时间

    一.服务器配置 1.查看服务器.客户端操作系统版本 [root@hadoop101 ~]# cat /etc/redhat-release CentOS Linux release (Core) 2. ...

  6. CentOS7搭建SVN服务器

    首先,你得有个VPS,我用的是搬瓦工. 安装步骤如下:1.yum install subversion2.查看安装版本 svnserve --version   3.创建SVN版本库目录 mkdir ...

  7. centos7下SVN服务器如何搭建

    Centos7 搭建svn服务器 linux(centos)下SVN服务器如何搭建?说到SVN服务器,想必大家都知道,可以是在LINUX下如何搭建SVN服务器呢?那么今天给大家分享一下linux(ce ...

  8. centos7.3给搭建SVN服务器

    centos7.3给搭建SVN服务器 1 安装svnserver yum install subversion 2 查看版本 svnserve --version 3 创建版本库 3.1 运行以下命令 ...

  9. centos7搭建SVN并配置使用http方式访问SVN服务器

    一.检查SVN是否安装 centos7系统自带SVN # rpm -qa subversion [root@localhost ~]# rpm -qa subversion subversion--. ...

随机推荐

  1. [C/C++] 只允许程序运行一个实例

    原理是创建一个内核对象之后 如果再创建一个同名的对象 就会给代码中的GetLastError函数对应的变量修改为 ERROR_ALREADY_EXISTS (但是不影响"创建"对象 ...

  2. mysql int类型字段插入空字符串时自动转为0

    mysql int类型字段插入空字符串时自动转为0 如果不想转的话可以修改配置文件 修改 my.ini 文件. # Set the SQL mode to strictsql-mode=”STRICT ...

  3. 更改yii框架入口文件位置,修改前后端访问路径

    将frontend/web/index.php复制到项目根目录,修改为: <?php defined('YII_DEBUG') or define('YII_DEBUG', true); def ...

  4. Java数组和方法

    1. 数组可以作为方法的参数 package cn.itcast.day05.demo04; /* 数组可以作为方法的参数. 当调用方法的时候,向方法的小括号进行传参,传递进去的其实是数组的地址值. ...

  5. Activiti工作流学习之概述(一)

    一.工作流介绍 我第一次听到这个词,是蒙逼的,再看百度百度,更傻眼了,完全说的不像人话啊,举几个生活中的例子,就明白多了比如:请假.报销等等,如果文字太过抽象,请看图: 二.工作流引擎 Process ...

  6. windows ,linux永久和临时修改pip源

    临时修改(建议)pypi镜像源方法:如果有untrust 报错,可使用https开头的网站,或加上--trusted 例如: pip install pywin32 -i http://mirrors ...

  7. How2j学习java-3下载 ECLIPSE

    1.下载并解压Eclipse 下载并解压到e:/eclipse,目录情况如图所示.注: 这个Eclipse是64位的,应该使用本站提供的JDK(64)位,下载地址:JDK. 如果JDK位数和 Ecli ...

  8. web渗透(转)

    某天比较无聊,听一个朋友推荐httpscan这款工具,于是就下载下来试试. 首先对某学校网段开始进行测试. 1   python httpscan.py **.**.**.0/24 测试时发现有个比较 ...

  9. 模仿.NET框架ArrayList写一个自己的动态数组类MyArrayList,揭示foreach实现原理

    通过.NET反编译工具可以查看到ArrayList内部的代码,发现ArrayList并非由链表实现,而是由一个不断扩容的数组对象组成. 下面模仿ArrayList写一个自己的MyArrayList. ...

  10. ES6:字面量的增强写法

    以前对象字面量的写法: 属性的增强写法: ES6中可以写成: 方法的增强写法 ES6中可以写成: ~~~~~ END ~~~~~