Git 服务器搭建

来源:互联网 发布:tpo mac 编辑:程序博客网 时间:2024/05/12 03:06

Git服务器搭建过程中遇到了很多坑,总结下来主要原因有:

1、 Git、Apache Server 等相关软件版本不同导致的配置不同。所以参考相关文章时一定要注意文章中用到的软件版本号。
2、尽量参考官文教程。百度、Google里搜到的教程往往直接参照时都会遇到一些问题。
3、参照官文教程的英文版。中文版往往由于更新慢、翻译有误等问题,造成这样或那样的错误。本人就是由于最开始参照了Git的官文中文版教程,而走了很多弯路。

本人使用的软件版本: Git 1.7.1 , Apache Server 2.4.20,搭建过程如下:

1、Git 在服务器上的配置。
参考文档:
https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols
https://git-scm.com/book/en/v2/Git-on-the-Server-Getting-Git-on-a-Server
https://git-scm.com/book/en/v2/Git-on-the-Server-Generating-Your-SSH-Public-Key
https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server

2、Apache Server 安装。
因为需要通过HTTP来访问Git仓库,所以安装Apache Server。使用的版本为2.4.20。安装过程中遇到的主要的坑是Apache Server 的依赖APR 、APR-Util、PCRE的安装。
参考文档:
http://httpd.apache.org/docs/2.4/install.html#customize

3、Git HTTP支持的配置。
这部分主要是在Apache Server中进行配置。
参考文档:
https://git-scm.com/book/en/v2/Git-on-the-Server-Smart-HTTP

0 0
原创粉丝点击