Linux上Svn环境搭建

一般情况下,Linux都是自带SVN环境的。

查看svn是否安装了

[14:50:28][root@VM60 ~]# rpm -aq subversion
[14:50:30]subversion-1.6.11-9.el6_4.x86_64

[14:52:01][root@VM60 ~]# whereis svn
[14:52:01]svn: /usr/bin/svn /usr/share/man/man1/svn.1.gz


[14:55:59][root@VM60 ~]# svnserve --version
[14:55:59]svnserve, version 1.6.11 (r934486)
[14:55:59]   compiled Apr  2 2013, 08:56:54


创建存放代码的svn文件夹

[15:21:34][root@VM60 opt]# mkdir -p svn/data
[15:21:53][root@VM60 opt]# mkdir -p svn/svnpasswd


启动svnserve

[15:22:15][root@VM60 opt]# svnserve -d -r svn/data/

启动svn的命令用svnserve -d -r安装路径
-d表示svnserve.exe作为服务程序运行在后台;-r表示将svn的目录当作根目录。


查看是否启动成功

[15:23:33][root@VM60 opt]# ps -ef|grep svn|grep -v grep
[15:23:33]root     24891     1  0 07:19 ?        00:00:00 svnserve -d -r svn/data/

[16:25:14][root@VM60 ~]# netstat -lnt|grep 3690
[16:25:14]tcp        0      0 0.0.0.0:3690                0.0.0.0:*                   LISTEN      


创建项目库

[15:27:03][root@VM60 opt]# svnadmin create svn/data/qualityMonitor



[15:27:13][root@VM60 ~]# cd /opt/svn/data/
[15:27:14][root@VM60 data]# ll
[15:27:14]total 4
[15:27:14]drwxr-xr-x 6 root root 4096 Nov 17 07:24 qualityMonitor



[15:27:16][root@VM60 data]# cd qualityMonitor/
[15:27:17][root@VM60 qualityMonitor]# ll
[15:27:17]total 24
[15:27:17]drwxr-xr-x 2 root root 4096 Nov 17 07:24 conf
[15:27:17]drwxr-sr-x 6 root root 4096 Nov 17 07:24 db
[15:27:17]-r--r--r-- 1 root root    2 Nov 17 07:24 format
[15:27:17]drwxr-xr-x 2 root root 4096 Nov 17 07:24 hooks
[15:27:17]drwxr-xr-x 2 root root 4096 Nov 17 07:24 locks
[15:27:17]-rw-r--r-- 1 root root  229 Nov 17 07:24 README.txt



[15:27:42][root@VM60 qualityMonitor]# cd conf/
[15:27:42][root@VM60 conf]# ll
[15:27:42]total 12
[15:27:42]-rw-r--r-- 1 root root 1080 Nov 17 07:24 authz
[15:27:42]-rw-r--r-- 1 root root  309 Nov 17 07:24 passwd
[15:27:42]-rw-r--r-- 1 root root 2279 Nov 17 07:24 svnserve.conf


编辑配置文件

[15:31:27][root@VM60 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.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/svnpasswd/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 =/opt/svn/svnpasswd/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


[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



[15:45:55][root@VM60 conf]# cp authz passwd /opt/svn/svnpasswd
[15:54:57][root@VM60 conf]# cd /opt/svn/svnpasswd/


修改掉权限,安全措施

[15:46:04][root@VM60 svnpasswd]# chmod 700 *
[15:46:06][root@VM60 svnpasswd]# ll
[15:46:06]total 8
[15:46:06]-rwx------ 1 root root 1080 Nov 17 07:43 authz
[15:46:06]-rwx------ 1 root root  309 Nov 17 07:43 passwd


配置用户名密码

[15:46:45][root@VM60 svnpasswd]# 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下面添加用户名密码

[users]
# harry = harryssecret
# sally = sallyssecret


liwen.xu=liwen.xu
ting.chen=ting.chen
erhuan.deng=erhuan.deng
miaogen.zeng=miaogen.zeng


配置项目用户权限

[15:50:07][root@VM60 svnpasswd]# 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
dev=liwen.xu,ting.chen,erhuan.deng,miaogen.zeng




# [/foo/bar]
# harry = rw
# &joe = r
# * =


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

设置项目用户权限。格式必须这样写。

[qualityMonitor:/]
@dev=rw


重启SVNserve

[15:57:43][root@VM60 opt]# pkill svnserve


[15:57:57][root@VM60 opt]# svnserve -d -r svn/data/

[16:25:14][root@VM60 ~]# netstat -lnt|grep 3690
[16:25:14]tcp        0      0 0.0.0.0:3690                0.0.0.0:*       


  如果修改了  passwd和authz 文件不需要重启,修改了svnserve.conf  必须重启才能生效。


在Linux防火墙中添加3690端口可以通过。

先查看防火墙是否开着,如果关闭的,就不用配置了

service iptables status


编辑/etc/sysconfig/iptables
-A INPUT -p tcp -m tcp --dport 3690  -j ACCEPT
保存在前面部分
再重启:
service iptables restart





本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/538205.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

android主流技术框架,android开发现在流行什么IDE和开发框架?

慕仙森idea, AS (android studio), adt, 其中 AS 是google 非常推荐的.看官网就知道了. 框架的话: xutils , andbase , volley等等,还有比较流行的UI界面效果,个性化控件等等.  关于 IDE 的优劣势. 个人认为:各有各的好处.  对于以前 Java 的开发人员来说(我就是的,嘿嘿) ,…

联想拯救者y7000加内存条_关于2020款联想拯救者Y7000、R7000和Y7000P,r7000p选哪个好?看这里就对了...

朋友咨询:作为传媒行业,经常用到ps,pr,lr,ae,au,flash,3d max,edius等这些软件,8000以内的预算,那么2020款联想拯救者Y7000、R7000和Y7000P&#…

Hivesql里的limit使用误区

select * from HIVE_D_MT_UU_H_SPARK limit 1000;读取前1000行。需求:在hive表前1000行里,过滤出不重复的refid,imsi。错误的写法:select distinct refid,imsi from HIVE_D_MT_UU_H_SPARK limit 1000;会去读取全表,把0~1000行的不…

android 释放bitmap fragment,,为什么重复Replace Fragment会内存泄漏

如图&#xff0c;当点击下面的两个按钮时&#xff0c;REPALCE上面的Fragmnet&#xff0c;共两个&#xff0c;反复切换时发生了内存泄漏这是Fragment的代码&#xff1a;public class Fragment2 extends Fragment {private List lb new ArrayList<>();NullableOverridepub…

Improved GAN

https://www.bilibili.com/video/av9770302/?p16 从之前讲的basic gan延伸到unified framework&#xff0c;到WGAN 再到通过WGAN进行Generation和Transformation 复习一下GAN&#xff0c; 首先我们有一个目标&#xff0c;target分布&#xff0c;Pdata&#xff0c; 蓝色部分表示…

cython加密代码python_利用Cython对python代码进行加密

利用Cython对python代码进行加密Cython是属于PYTHON的超集&#xff0c;他首先会将PYTHON代码转化成C语言代码&#xff0c;然后通过c编译器生成可执行文件。优势&#xff1a;资源丰富&#xff0c;适合快速开发。翻译成C后速度比较快&#xff0c;在windows环境中用cython加密后的…

Linux ftp 命令

[deepenvd26wyjl01 ~]$ ftp IP地址 Connected to 10.xxxx.191 (10.xxxx191). 220-FileZilla Server 0.9.53 beta 220-written by Tim Kosse (tim.kossefilezilla-project.org) 220 Please visit https://filezilla-project.org/ Name (10.xxxx.191:deepen): yzcloud 331 Passwo…

android viewpager 间隔,viewpager 系统兼容 clipChildren 页卡间距

此效果在4.4以下有个bug&#xff0c;两边的会有遮盖&#xff0c;但是一滑动就没事了。。。此时需要给viewpager设置onpagerchangedListener 刷新父布局invalidateviewpager.setPagerMargin();//设置页卡间隔viewpager.setOffscreenPageLimit(); 设置缓存数量viewpager的父布局…

python web验证码_python web框架Flask——手机短信验证码

下列代码都是以自己的项目实例讲述的&#xff0c;相关的文本内容很少&#xff0c;主要说明全在代码注释中。我是使用阿里云云通信的短信服务&#xff0c;第一次使用会摸不着头绪&#xff0c;这里我们需要做些准备工作&#xff1a;1、登陆自己的账号进入阿里云官网&#xff0c;没…

机器学习:样本集、验证集(开发集)、测试集

样本集、验证集&#xff08;开发集&#xff09;、测试集。 Ripley, B.D&#xff08;1996&#xff09;在他的经典专著Pattern Recognition and Neural Networks中给出了这三个词的定义。 Training set: A set of examples used for learning, which is to fit the parameters [i…

Linux ftp传送问题 WARNING! 258831 bare linefeeds received in ASCII mode

WARNING! 258831 bare linefeeds received in ASCII mode 原因是传输时ftp的传输类型不一致。 在上传的时候&#xff0c;选择传输类型为 二进制 在Linux上用ftp命令get的时候&#xff0c;也要设置二进制 ftp> binary // 设置传输方式为binary

html输入支付密码样式,基于JS实现类似支付宝支付密码输入框

基于JS实现类似支付宝支付密码输入框2019-01-06编程之家https://www.jb51.cc编程之家收集整理的这篇文章主要介绍了基于JS实现类似支付宝支付密码输入框&#xff0c;编程之家小编觉得挺不错的&#xff0c;现在分享给大家&#xff0c;也给大家做个参考。本文实现的是一个类似支付…

海康+萤石云+云存储多少钱一个月_400万极清画质 萤石C6Wi智能家居摄像机

作为全球最大安防企业海康威视旗下子品牌&#xff0c;萤石以“家庭安防”切入智能家居市场&#xff0c;萤石C6Wi作为一款融合目前市面上云台摄像头最新设计和最全功能的产品&#xff0c;其外观设计获得多项国际大奖&#xff0c;支持2K分辨率(25601440)及4倍变焦拍摄、微光全彩、…

unzip 报错error [clas.zip]:  missing 1844 bytes in zipfile

error [clas.zip]: missing 1844 bytes in zipfile 解决方法&#xff1a; http://blog.csdn.net/zengmingen/article/details/78604574

Vue+axios统一接口管理

通过axios请求接口已经很简单了&#xff0c;但最近在做一个vue项目&#xff0c;想着把axios请求再封装一下&#xff0c;这样api就可以只在一处配置成方法&#xff0c;在使用的时候直接调用这个方法。 但咱们不用每个接口都定义成一个啰嗦的axios请求方法&#xff0c;既然是想简…

html网页 table布局实例,HTML用Table表格对网页布局

HTML是用于开发网页的“超文本标记语言”&#xff0c;今天我们一起来学习一下HTMLCSS网页布局中Table布局方式。常见的网页布局用CSS而言一般有经典行布局、经典列布局、双飞翼布局、圣杯布局等。今天小编教大家用Table表格布局。大家先来欣赏几个网页&#xff1a;这几个网页布…

vue设置输入框输入长度_Vue实现input宽度随文字长度自适应操作

业务需求&#xff0c;输入文字&#xff0c;后面的元要紧随其后&#xff0c;奈何input默认是有宽度&#xff0c;我想要达到&#xff0c;输入文字&#xff0c;动态改变input的宽度,试了很多方法&#xff0c;目前自己琢磨一种&#xff0c;有遇到问题的可以参考一下&#xff0c;直接…

JDBC 连接Hive 简单样例(开启Kerberos)

今天在移动的云平台上通过jdbc连接hive&#xff0c;发现云平台使用了 kerberos的认证。与宁波实验环境不同。 发现一文解决了问题&#xff0c;转载如下&#xff1a; 原文地址&#xff1a;http://blog.csdn.net/zengmingen/article/details/78605086 -----------------------…

新年快乐轮播特效html,基于owl-carousel的卡片水平轮播展示特效

这是一款基于owl-carousel的卡片水平轮播展示特效。该卡片轮播展示特效可以通过前后导航按钮来切换卡片&#xff0c;它是响应式设计&#xff0c;在手机等小屏幕设备上&#xff0c;会自动调节为只展示一个卡片。使用方法在页面中引入bootstrap.css和style.css文件&#xff0c;以…

parameter缩略语_“参数”的英文缩写有吗?

展开全部“参数”的英文e69da5e887aa3231313335323631343130323136353331333365643662缩写是“parm”。1.音标&#xff1a;[ prɑ:m ]2.具体含义&#xff1a;参数3.双语例句&#xff1a;It involves the same parameter as that involved in the enhancement factor for coagul…