SVN 伺服器安裝

2021-08-31 17:15:07 字數 1858 閱讀 4095

二.提供四個批處理命令:

1)建立svn服務的批處理命令:

sc create svnserve binpath= "d:\subversion\bin\svnserve.exe --service -r d:\versionlib\myproject" displayname= "svnserve" depend= tcpip start= auto 

sc start svnserve

2)暫停svn服務的批處理命令:

net stop svnserve

3)開啟svn服務的批處理命令:

net start svnserve

4)刪除svn服務的批處理命令:

sc delete svnserve

三.伺服器端配製

1.找到d:\svnroot檔案下的conf目錄,對svnserver.conf,passwd,author進行配置

svnserve.conf

[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 = read

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 conf directory.

### uncomment the line below to use the default password file.

password-db = passwd

含義是:

未驗證使用者無任何許可權 (如果把none修改為read就是給予讀許可權)

已驗證使用者給予寫許可權 (當然也能讀)

密碼資料存放到passwd檔案中

passwd

[users]

#harry = harryssecret

#sally = sallyssecret

admin=admin111

lvzy=lvzy111

含義是:

增加了 admin這個使用者,密碼為admin111

增加了lvzy這個使用者,密碼為lvzy111

author

[groups]

# harry_and_sally = harry,sally

進行使用者組的配製

比如:

lantian=admin,lvzy

含義是將admin,lvzy加入到組lantian中去

# [repository:/baz/fuz]

# @harry_and_sally = rw

# * = r

進行檔案許可權的設定

比如存在libs這個檔案,而我只希望 admin乙個人可以讀寫,lvzy有讀許可權,未授權的無法訪問,則可以這樣寫

[/libs]

admin=rw

lvzy=r

*=none

注:*表示匿名使用者

SVN伺服器安裝

1.安裝 root izip2h4xqhdpikz yum y install subversion 2.建立svn版本庫 mkdir p opt svn repos svn1 建立目錄 svnadmin create opt svn repos svn1 建立svn版本庫 進入上面生成的資料夾co...

svn伺服器安裝

tar zxvf subversion 1.6.11.tar.gz tar zxvf subversion deps 1.6.11.tar.gz cd home install subversion 1.6.11 configure prefix opt svn without berkeley d...

linux安裝svn伺服器

1 解壓 tar xvf subversion 1.6.7.tar.bz2 tar xvf subversion deps 1.6.7.tar.bz2 3 編譯 bin資料夾執行命令 make 4 安裝 bin資料夾執行命令 make install 6 測試安裝是否成功 svnserve vers...