如何在本地搭建svn本地版本库

前提:

安装SVN版本软件

步骤1:

root@debian:svnadmin create /home/svn/back_trunk/
root@debian:cd back_trunk/conf/
root@debian:/home/svn/back_trunk/conf# ls
authz passwd svnserve.conf

修改/增加上述三个文件如下:

svnserve.conf:

anon-access = read
auth-access = write
password-db = passwd
authz-db = authz

passwd:

[users]
skytrails = ***
wanafly = ***

(*号为你要设置的密码)

注意第一个字符前不要有空格。

设置好后则重启svn服务

root@debian:/home/svn/back_trunk/conf# ps -ef | grep svn
root 7354 7232 0 05:24 pts/9 00:00:00 grep svn
root@debian:/home/svn/back_trunk/conf# kill -9 pid
root@debian:/home/svn/back_trunk/conf# svnserve -d -r /home/svn/

注意把svn下db目录及其下的子目录文件都设置777权限

chmod -R 777 /home/svn/back_trunk/db/

这样就可以在本地提交代码文本了。

#"file://"表示是本地地址
checkout:svn co 'file:///home/svn/back_trunk'
touch makefile
add:svn add ./makefile
commit:svn ci -m 'add makefile' makefile

一切ok!

.....

skytrails@2015/09/08

=-=-=-=-=
Powered by Blogilo

..... created by skytrails
原文地址:https://www.cnblogs.com/skytrails/p/4790491.html