因为Mercurial缺乏对100MB+的binary文件支持,所以今天又把Git装上测试一下,环境是在一台Ubuntu 10.04 amd64 server edition机器上,通过http访问Git。
首先升级系统到最新:
#apt-get update && apt-get upgrade
安装Git
#apt-get install git git-core gitosis
#mkdir /var/www/code.git && cd /var/www/code.git
#git --bare init && git update-server-info
#chown -R www-data:www-data .
配置Apache2
#apt-get install apache2 apache2-mpm-prefork
在/etc/apache2/conf.d中加入git.conf
<Location /code.git>
DAV on
AuthType Basic
AuthName "Git"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
</Location>
重启apache2
# service apache2 restart
Done.
[…] This post was mentioned on Twitter by Yousri, Xia Qingran. Xia Qingran said: [blog]: Git server安装笔记 https://www.qingran.net/2010/12/git-server%e5%ae%89%e8%a3%85%e7%ac%94%e8%ae%b0/ […]