一、安装

Install the package

Install subversion from the official repositories.

Create a repository

Create your repository

mkdir /path/to/repos/
svnadmin create /path/to/repos/repo1

Your initial repository is empty, if you want to import files into it, use the following command.

svn import ~/code/project1 file:///path/to/repos/repo1 --message 'Initial repository layout'

Set access policies

Edit the file /path/to/repos/repo1/conf/svnserve.conf and uncomment or add the line under [general]

password-db = passwd

You might also want to change the default option for anonymous users.

anon-access = read

Replace "read" with "write" for a repository that anyone can commit to, or set it to "none" to disable all anonymous access.

Now edit the file /path/to/repos/repo1/conf/passwd

[users]
harry = foopassword
sally = barpassword

The above defines users harry and sally, with passwords foopassword and barpassword, change it as you like

Start the server daemon

Before you start the server, edit the configuration file:

/etc/conf.d/svnserve
SVNSERVE_ARGS="--root=/path/to/repos"

The --root=/path/to/repos option set the root of repository tree. If you have multiple repositories use --root=/path-to/reposparent. Then access independent repositories by passing in repository name in the URL: svn://host/repo1. make sure that the user has read/write access to the repository files)

Optionally add a --listen-port if you want a different port, or other options.

By default, the service runs as root. If you want to change that, add a drop-in:

/etc/systemd/system/svnserve.service.d/50-custom.conf
[Service]
User=svn

Now start the svnserve.service daemon.

二、注意事项(大坑)

1、如果出现,这样的错误信息,“svnserve: 不能绑定服务器套接字: 地址已经被使用”
那先把svnserve进程干掉。
具体做法是
$ ps -aux | grep svnserve
 #查看进程,svnserve的pid为16663
 $ kill -9 16663 #干掉svnserve
 再次运行$ systemctl start svnserve 
 
 但是利用ps -aux查找进程时,没有找到进程。
 最后的方式是,kill掉守护进程xinetd,然后重新拉起进程svnserve
  
   2、报Option expected
  1. svn: E200002: error while parsing config file :/ home/..../svnserve.conf
  2. svn: E200002: line 19: Option expected

  这是因为修改svnserve.conf时,打开注释时,配置的前面有空格,应该顶格写。

  修改后即可。

3、ping不通

  先看看有没有插网线。

 
参考:
https://wiki.archlinux.org/index.php/Subversion
http://blog.csdn.net/zxnlmj/article/details/40621279
http://www.mamicode.com/info-detail-1100667.html
http://blog.csdn.net/duguduchong/article/details/8819028

最新文章

  1. 关于json-p
  2. shell脚本,防止sshd被暴力破解
  3. Nginx的nginx.conf配置文件中文注释说明
  4. CoreData多线程安全
  5. ADO.NET常用对象的基础概念强化
  6. Codeforces Round #208 (Div. 2) B Dima and Text Messages
  7. Python报错UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)
  8. JS问题Uncaught ReferenceError:XXXX is not defined
  9. YARN学习笔记(一)——YARN的简介
  10. springboot学习(一)——helloworld
  11. 数据结构-堆 C与C++的实现
  12. python将PNG格式的图片转化成为jpg
  13. Android 访问地址
  14. ubuntu下使用opencv问题以及解决方案
  15. MATLAB SVM
  16. Hadoop学习之路(二十一)MapReduce实现Reduce Join(多个文件联合查询)
  17. Angular material mat-icon 资源参考_Places
  18. selenium+python 数据驱动-txt篇
  19. C# XML序列化/反序列化类XmlSerializer使用示例
  20. java POI技术之导出数据优化(15万条数据1分多钟)

热门文章

  1. HDOJ1171(多重背包)
  2. JZ2440 启动NFS网络文件系统_初试led驱动
  3. ES6学习之字符串的扩展
  4. IOS的设计模式
  5. stm32之UCOS-III
  6. PopupWindow 防微信弹出右 侧窗体(继承PopupWindow )
  7. 除了BAT,计算机、软件专业的毕业生还有别的好去处吗?
  8. idea调试SpringMvc, 出现:”javax.servlet.ServletException: java.lang.IllegalStateException: Cannot create a session after the response has been committed"错误的解决方法
  9. SuperSocket框架中BinaryRequestInfo协议的使用
  10. C++开源库(一) ----log4cpp详解