標籤:style blog http color os strong 檔案 io
以前用svn只是在服務上發布一個工程,今天需求來了,要求部署兩個,以前沒有發布兩個,只有現琢磨了,不過最後還是成功了,看下文:
為了方便首先切換到svn的bin目錄下,我的是這個
- D:\Program Files\Subversion\bin>
依次在cmd中執行下列命令
- mkdir d:\myproject1
- svnadmin create d:\myproject1\project1
- svnserve -d -r d:\myproject1
在輸入完第二條命令時,修改下D:\myproject1\project1\conf下的三個檔案的內容(只顯示修改過的部分)
authz
- [groups]
- # harryharry_and_sally = harry,sally
- # harryharry_sally_and_joe = harry,sally,&joe
- [/]
- * = rw
- ql = rw
passwd
- [users]
- # harry = harryssecret
- # sally = sallyssecret
- ql = ql
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 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 = 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.
- authzauthz-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 = My First Repository
修改完三個檔案後,再執行
- svnserve -d -r d:\myproject1
用同樣的方法,在myproject1中建立project2,完成後,開啟myeclipse,在svn中建立剛才的兩個工程svn url為
- svn://localhost/project1
-
- svn://localhost/project2
提示輸入使用者名稱和密碼後,給每個工程添加一個項目,成功後
這樣以來,在一個svn中就成功的建立了兩個或者多個工程了。
本文出自 “喬磊的部落格 學習 進步” 部落格,請務必保留此出處http://sucre.blog.51cto.com/1084905/392617