阿裏雲服務器搭建SVN倉庫管理項目
最近由於個人學習(新手)需要,方便個人項目管理,想利用自己現有的阿裏雲服務器對項目進行管理,首先根據自己的需要,先使用svn作為目前暫時的管理方法(相對比較簡單)。個人電腦是win10 64位係統,服務器是阿裏雲CentOS 7.3 64位。
一、服務器svn環境搭建(服務器使用的是centos7.3 64位係統)
1、安裝svn
yum install subversion
2、查看版本號
3、創建SVN版本庫
在這裏我直接創建在var/svn 文件夾下。如果麼這個目錄,就新建這個目錄
svnadmin create /var/svn/版本庫名字
4、
[\]
admin = rw
用戶名=rw 讀寫權限
修改passwd:
[users]
# harry = harryssecret
# sally = sallyssecret
admin=000000
用戶名=密碼
svnserve.conf:
[general]
### The anon-access and auth-access options control access to the
### repository for unauthenticated (a.k.a. anonymous) users and
### authenticated users, respectively.
### Valid values are "write", "read", and "none".
### Setting the value to "none" prohibits both reading and writing;
### "read" allows read-only access, and "write" allows complete
### read/write access to the repository.
### The sample settings below are the defaults and specify that anonymous
### users have read-only access to the repository, while authenticated
### users have read and write access to the repository.
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.
# 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 = My First Repository
### The force-username-case option causes svnserve to case-normalize
### usernames before comparing them against the authorization rules in the
### authz-db file configured above. Valid values are "upper" (to upper-
### case the usernames), "lower" (to lowercase the usernames), and
### "none" (to compare usernames as-is without case conversion, which
### is the default behavior).
# force-username-case = none
anon-access = read、auth-access = write、password-db = passwd、realm = My First Repository 四句話前麵的注釋。
svnserve -d -r /var/svn/mystudy
7、客戶端訪問
svn://ip地址:3690/xxxx (iP地址為你linux的ip,xxxx為前文創建的版本庫名稱,3690為svn默認端口)
參考資料:
https://www.cnblogs.com/mymelon/p/5483215.html
https://www.linuxidc.com/Linux/2013-10/91903.htm
https://www.linuxidc.com/Linux/2016-01/127679.htm
最後更新:2017-11-03 18:33:55