centos 安装git server
2014-06-14 10:55
357 查看
安装httpd git
# yum install httpd git
建空仓库
# cd /var/cache/git/
# mkdir gittest.git && cd gittest.git
# git --bare init
Initialized empty Git repository in /var/cache/git/
# git update-server-info
apache权限
# chown -R apache:apache /var/cache/git/
建git web访问配置文件
# vim /etc/httpd/conf.d/git.conf
建git用户
# htpasswd -c /var/www/passwd.git user1
New password:
Re-type new password:
Adding password for user user1
# service httpd restart
完成。
客户端clone, pull,push正常。
![](http://images.cnitblog.com/i/38864/201406/141053160924213.png)
# yum install httpd git
建空仓库
# cd /var/cache/git/
# mkdir gittest.git && cd gittest.git
# git --bare init
Initialized empty Git repository in /var/cache/git/
# git update-server-info
apache权限
# chown -R apache:apache /var/cache/git/
建git web访问配置文件
# vim /etc/httpd/conf.d/git.conf
SetEnv GIT_PROJECT_ROOT /var/cache/git SetEnv GIT_HTTP_EXPORT_ALL ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/ <Location /git/> AuthType Basic AuthName "Git Access" AuthUserFile /var/www/passwd.git Require valid-user </Location>
建git用户
# htpasswd -c /var/www/passwd.git user1
New password:
Re-type new password:
Adding password for user user1
# service httpd restart
完成。
客户端clone, pull,push正常。
![](http://images.cnitblog.com/i/38864/201406/141053160924213.png)
![](http://images.cnitblog.com/i/38864/201406/141053486244374.png)
相关文章推荐
- centos 安装http协议的git server
- CentOS 如何安装git server + Gitolite 【配置不成功需要再测试2015-8-20】
- 在Windows Server和Centos上安装Git Server
- CentOS 6.3下使用Gitosis安装搭建Git Server教程
- CentOS 5 上安装git
- CentOs及ubuntu下安装git
- 在centOS 上安装git
- CentOS下安装Git
- centos5.4 安装git
- Centos-Server-Mysql服务(Cmake编译安装)--(一)
- [shell]CentOS 5.6安装web服务及相关软件(php 5.3, MySQL Server, memcache, spawn-fcgi, nginx, coreseek)
- git服务器安装所需软件包(centos5.2环境)
- CentOS5.6下gitweb的安装搭建
- centos ftp_server 安装
- centos5下 mysql server 安装
- CentOS安装git
- 在CentOS5.4上安装Git
- CENTOS中HELIX SERVER安装、配置
- CentOS下安装Git