如何配置svn服務器:前提條件:
下載最新的svn服務器:
svn-1.4.5-setup.rar
下載最新的svn客戶端:
TortoiseSVN-1.4.5.10425-win32-svn-1.4.5.rar
下載配置svn服務成window service自動運行的工具:
SVNService.rar
步驟:
1.下載并安裝svn1.4.5-setup.rar假設你安裝在:G:\Program Files\Subversion目錄下。
2。建立Repository,可以打開命令窗口,輸入svnadmin create G:\SVNRoot\Projects\searchz,目錄自己定。
3.配置Repository,進入Repository目錄,這里是G:\SVNRoot\Projects\search,你會看到conf目錄,進入該目錄,你會看到
svnserver.conf和passwd兩個文件.
對兩個文件作如下修改:
svnserve.conf
Window下配置SVN服務器與客戶端
[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
weip=weip
注意最后passwd中的配置,一個用戶以行,如:weip=weip表示用戶名為weip,密碼為weip的一個用戶。 4.啟動subversion服務
兩種方式啟動:
(1).命令方式:svnserve -d -r G:\SVNRoot\Projects默認端口是3690,如果不幸這個端口被別別的程序暫用,可以通過選項 --
listem --port=綁定端口.
(2)subversion服務:默認情況下載window service中視沒有的,必須通過svnservice -install -d -r
G:\SVNRoot\Projects,(svnservice必須和svnserve在同一個目錄下)
再用net start svnservice來將其作為服務運行,建議打開控制面板找到SVNService,將其啟動類型設置為自動。這樣服務器的配置就架構好了。
你現在可以用客戶端的TortoiseSVN來訪問剛剛配置的服務器了,url格式:
svn://ip地址/Repository名,這里是:svn://127.0.0.1/searchz.
客戶端的簡單日常操作:
要取得當前的最新版本,SVN updated.
要修改更新到SVN,選擇SVN submit即可(謹慎的話先更新到最新版本后再提交).
posted on 2008-07-29 11:56
Derek.Guo 閱讀(923)
評論(0) 編輯 收藏 所屬分類:
Linux/Unix