1. 程式人生 > >Linux下SVN環境搭建

Linux下SVN環境搭建

安裝

apt-get install subversion

建立版本庫

1.svnadmin create /var/svnrepos

2.cd /var/svnrepos

3.ls -la

conf db format hooks locks README.txt

4.cd conf

5.ls

authz  hooks-env.tmpl  passwd  svnserve.conf

新增使用者

1.vim 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 lei = KKKKK

2.vim author

[groups] # harry_and_sally = harry,sally # harry_sally_and_joe = harry,sally,&joe # [/foo/bar] # harry = rw # &joe = r # * = # [repository:/baz/fuz] # @harry_and_sally = rw # * = r [/] lei=rw *=r

3.vim svnserve.conf

[general] anon-access = read auth-access = write password-db = passwd authz-db = authz realm = /var/svn/svnrepos

這個配置檔案開啟下面幾行前面的註釋,刪除最前面的空格

啟動服務

svnserve -d -r /var/svnrepos