Ubuntu 16.04上安装 git-daemon

https://blog.csdn.net/caspiansea/article/details/51713884

git-daemon-run 在 16.04上不能用起来,因为它依赖于runit,  runit又依赖于 upstart. 在 16.04版本里面, upstart被 systemd替代啦。

但可以使用另一个版本的 git-daemon: git-daemon-sysvinit.

使用命令

[plain]  view plain  copy
  1. sudo aptitude install git-daemon-sysvinit   

安装 git-daemon.

然后修改配置文件 /etc/default/git-daemon如下:

[html]  view plain  copy
  1. # Defaults for git-daemon initscript  
  2. # sourced by /etc/init.d/git-daemon  
  3. # installed at /etc/default/git-daemon by the maintainer scripts  
  4.   
  5. #  
  6. # This is a POSIX shell fragment  
  7. #  
  8.   
  9. #GIT_DAEMON_ENABLE=false  
  10. GIT_DAEMON_ENABLE=true  
  11. GIT_DAEMON_USER=gitdaemon  
  12. #GIT_DAEMON_BASE_PATH=/var/lib  
  13. GIT_DAEMON_BASE_PATH=/home/repo  
  14. #GIT_DAEMON_DIRECTORY=/var/lib/git  
  15. GIT_DAEMON_DIRECTORY=/home/repo  
  16.   
  17. # Additional options that are passed to the Daemon.  
  18. #GIT_DAEMON_OPTIONS=""  
  19. GIT_DAEMON_OPTIONS="--export-all --enable=upload-pack --enable=upload-archive --enable=receive-pack --informative-errors"  

然后重启服务:

[html]  view plain  copy
  1. sudo service git-daemon restart  

就可以了。

References:

1.  http://blog.csdn.net/fdl19881/article/details/8679469

2. http://jr4qpv.hatenablog.com/entry/2016/06/12/111439

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值