Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7347025
  • 博文数量: 1763
  • 博客积分: 18684
  • 博客等级: 上将
  • 技术积分: 16217
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-02 10:28
个人简介

啥也没写

文章分类

全部博文(1763)

文章存档

2023年(44)

2022年(39)

2021年(46)

2020年(43)

2019年(27)

2018年(44)

2017年(50)

2016年(47)

2015年(15)

2014年(21)

2013年(43)

2012年(143)

2011年(228)

2010年(263)

2009年(384)

2008年(246)

2007年(30)

2006年(38)

2005年(2)

2004年(1)

分类: LINUX

2010-02-26 09:40:47

1 准备工作
下载git和httpd两个tar包
git-1.5.3.2.tar.bz2
httpd-2.2.9.tar.bz2
主机IP:10.0.12.167
虚拟机IP:10.0.12.143

2 编译安装
tar -xjvf git-1.5.3.2.tar.bz2
cd git-1.5.3.2
./configure –prefix=/usr/local/git
make
make install

tar -xjvf httpd-2.2.9.tar.bz2
cd httpd-2.2.9
./configure –prefix=/usr/local/httpd
make
make install

3 配置
(1) cp -a git-1.5.3.2/gitweb/* /usr/local/httpd/cgi-bin
(2) cp -a git-1.5.3.2/gitweb /usr/local/httpd/htdocs/
(3) cp gitweb_config.perl /usr/local/httpd/cgi-bin
(4) modify /usr/local/httpd/conf/httpd.conf

4 文件gitweb_config.perl内容如下
#!/usr/bin/perl

@stylesheets = (”/gitweb/gitweb.css”);
our $logo = “/gitweb/git-logo.png”;
our $favicon = “/gitweb/git-favicon.png”;
our $projectroot = “/pub/git”;

5 文件httpd.conf修改如下
Listen 10.0.12.144:80
ServerName 10.0.12.144

Options Indexes FollowSymLinks ExecCGI
AllowOverride None
Order deny,allow
Deny From all
Allow from 10.0.12.144
Allow from 10.0.12.167


AllowOverride None
Options None
Order deny,allow
Deny from all
Allow from 10.0.12.144
Allow from 10.0.12.167


ScriptAlias /cgi-bin/ “/usr/local/httpd/cgi-bin/”
ScriptAlias /git “/usr/local/httpd/htdocs/cgi-bin/gitweb.cgi”


6 git仓库创建
cd /pub/git
mkdir GitTest
git-init-db

cd /home/user/temp
mkdir GitTest
git-init-db
(copy project files here)
git-add .
git-commit -a -m “Initial”
git-push /pub/git/GitTest master:master

7 gitweb浏览
回到主机打开IE浏览器,输入
大功告成!
阅读(1338) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~