`
tom_cjp
  • 浏览: 42227 次
  • 性别: Icon_minigender_1
  • 来自: 温州
文章分类
社区版块
存档分类
最新评论

在apache2上架设gitweb

阅读更多
1. 安装apache2
sudo apt-get install apache2

2. 在浏览器里验证apache2安装成功, 看到 It works,如果服务没开启可以使用sudo service apache2 restart
http://localhost

3. 然后安装gitweb
sudo apt-get install gitweb

运行命令后,会自动创建
  • /var/www/gitweb
  • /etc/gitweb.conf # 配置文件
  • 目录/usr/share/gitweb下的3个文件 git-favicon.png, git-logo.png, gitweb.css

注意: 如果未生成/var/www/gitweb这个目录,则需要克隆 kernel.org 项目,再拷贝该项目下的 git/gitweb 文件夹到 /var/www/
git clone git://git.kernel.org/pub/scm/git/git.git

4. 在 /etc/gitweb.conf 里配置 你希望显示到gitweb里的项目路径
$projectroot = "/home/yourname/projectpath";

5. 再手动创建一个文件/etc/apach2/conf.d/gitweb,内容如下:
Alias /gitweb /usr/share/gitweb
<Directory /usr/share/gitweb>
  Options FollowSymLinks +ExecCGI
  AddHandler cgi-script .cgi
</Directory>

6. 马上重启下apache2,看看界面吧
sudo /etc/init.d/apache2 restart


7. 更换gitweb.css和gitweb.js, 下载项目,并拷贝文件到 /usr/share/gitweb/ 即可
git clone https://github.com/kogakure/gitweb-theme.git





引用
http://blog.jasonmeridth.com/2010/05/26/gitosis-and-gitweb-part-3.html
https://github.com/kogakure/gitweb-theme
  • 大小: 13.8 KB
  • 大小: 12.4 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics