一、svnserve 安装
shell> apt search svnserve
shell> apt install svnserve
shell> svnserve --version
二、创建svn仓库
shell> svnadmin create --help
shell> svnadmin create /data/svn-repos
shell> tree .
tree .
.
├── conf
│ ├── authz
│ ├── hooks-env.tmpl
│ ├── passwd
│ └── svnserve.conf
├── db
│ ├── current
│ ├── format
│ ├── fsfs.conf
│ ├── fs-type
│ ├── min-unpacked-rev
│ ├── revprops
│ │ └── 0
│ │ └── 0
│ ├── revs
│ │ └── 0
│ │ └── 0
│ ├── transactions
│ ├── txn-current
│ ├── txn-current-lock
│ ├── txn-protorevs
│ ├── uuid
│ └── write-lock
├── format
├── hooks
│ ├── post-commit.tmpl
│ ├── post-lock.tmpl
│ ├── post-revprop-change.tmpl
│ ├── post-unlock.tmpl
│ ├── pre-commit.tmpl
│ ├── pre-lock.tmpl
│ ├── pre-revprop-change.tmpl
│ ├── pre-unlock.tmpl
│ └── start-commit.tmpl
├── locks
│ ├── db.lock
│ └── db-logs.lock
└── README.txt
三、创建svn一个项目
shell> svn mkdir -m "create test project" file:///data/svn-repos/test
四、配置svnserve
//配置文件目录
//一定要注意:所有的配置文件项要顶头写,不能有空格
shell> tree conf/
conf/
├── authz
├── hooks-env.tmpl
├── passwd
└── svnserve.conf
//打开svnserve配置文件
shell> vim svnserve.conf
//取消注释
[general]
anon-access = none //一定要是这个 否则执行svn log 显示不出来日志
password-db = passwd
authz-db = authz
realm = /data/svn-repos
//打开用户名密码配置文件
shell> vim passwd
[users]
svnuser = svnuser
//打开权限路径配置文件
shell> vim authz
[groups]
developer = svnuser
[/]
@developer = rw
* =
五、启动svnserve
shell> svnserve -d -r /data/svn-repos --config-file=/data/svn-repos/conf/svnserve.conf
六、测试
shell> svn co svn://ip:port/test test
//就会让你输入密码了