Install web git

1. gitadmin@gitserver:~/Desktop/gitolite-admin/conf$ sudo apt-get install gitweb

2.gitadmin@gitserver:/etc/apache2$ vim gitweb.conf

gitadmin@gitserver:/etc/apache2$ vim conf-enabled/gitweb.conf
  1 <IfModule mod_alias.c>
  2   <IfModule mod_mime.c>
  3     <IfModule mod_cgi.c>
  4       Define ENABLE_GITWEB
  5     </IfModule>
  6     <IfModule mod_cgid.c>
  7       Define ENABLE_GITWEB
  8     </IfModule>
  9   </IfModule>
 10 </IfModule>
 11
 12 <IfDefine ENABLE_GITWEB>
 13   Alias /gitweb /usr/share/gitweb
 14
 15   <Directory /usr/share/gitweb>
 16     Options +FollowSymLinks +ExecCGI
 17     AddHandler cgi-script .cgi
 18   </Directory>
 19 </IfDefine>

3.gitadmin@gitserver:/etc/apache2$ sudo a2enmod cgi

4.gitadmin@gitserver:/etc/apache2$ sudo service apache2 restart

5. sudo vim /etc/gitweb.conf

 1 # path to git projects (<project>.git)
  2 $projectroot = "/home/git/repositories";
  3
  4 # directory to use for temp files
  5 $git_temp = "/tmp";

posted @ 2019-03-28 17:04  dwtmjps  阅读(216)  评论(0编辑  收藏  举报