SVN Server使用1.5版,下載網址http://subversion.tigris.org/getting.html#windows
Tortoise SVN使用1.5版
一開始當然是安裝囉....一直下一步、下一步^ ^|||
切到DOS視窗....建立儲存庫.test1是自行指定的儲存庫名稱
svnadmin create c:\test1
其實這個指令就是要求SVN建立一個新專案的檔案庫
建立完成後test1資料夾裏會有個conf的資料夾,conf資料夾裏會有三個檔案..分別是
svnserve.conf
passwd
authz
先修改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=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
### 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 conf
### directory. 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=Search repository
### 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=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
### 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 conf
### directory. 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=Search repository
anon-access=read
這行的意思是..如果使用者匿名登入SVN應該如何處理!選項有"write", "read","none"...應該很好理解...
auth-access=write
這行的意思是..如果使用者登入後SVN應該如何處理!選項同樣有"write", "read","none"...
password-db=passwd
這行的意思是..使用者的帳號、密碼是放在passwd這個檔,檔案內容等下會說明...
authz-db=authz
這行的意思是..使用者的權限是放authz這個檔,檔案內容等下會說明....
這裡如果不設定的話,那麼上面的 password-db 設定是不會動作的
另外
realm =
Search repository指的是
詢問密碼時,說明用的文字
再來修改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
### 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
很直覺的,想要什麼帳號就打上去吧.....
最後是authz這個檔,這個檔裏面有些內容我還不是很清楚,所以參考了網路上的一些設定...
# 設定群組
[groups]
Admin = user1,user2
User = user3
# 設定根目錄權限 (必要)
[/]
@Admin = rw
* = r
# 設定檔案庫權限
[/test]
@Admin = rw
@User = r
* =
最後設定完後就要建一個Windows的服務...
sc create SVNService binpath= "C:\Program Files\Subversion\bin\svnserve.exe --service -r E:\SVNRepos" displayname= "SVNService" depend= Tcpip start= auto
binpath請指定svn server的安裝目錄
後面的那個E:\SVNRepos指的是剛才建的目錄..
建立完成後就會在控制台->系統管理工具->服務看到一個SVNService
啓動方式可直接透過控制台的服務啓動,也可輸入net start SVNService就可啓動了!
如果想要刪除這個Service可輸入sc delete SVNService
剩下的..再慢慢加唄...
原廠網站
SVN的原廠網址http://subversion.tigris.org/
TortoiseSVN的原廠網址http://tortoisesvn.net/
Eclipse對於SVN的pluginhttp://subclipse.tigris.org/
幾個還不錯的網站
SubSversion中文網站(簡體)
Rory's Blog SVN在Windows下的安装手记
網站製作學習誌
OpenStudio Weblog
IBM所寫的Subvesion和Eclipse
沒有留言:
張貼留言