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.pswp.cn/news/538205.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/538205.shtml
英文地址,請注明出處:http://en.pswp.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…