Saturday, March 17, 2012

Gitweb Setup

= Gitweb Configuration =

* Install required packages
 sudo apt-get install  gitweb
 sudo apt-get install cgilib //<- cgi 관련

The following 2 items are not necessary for Ubuntu 12.04

* Link gitweb to apache
 sudo mkdir /var/www/gitweb
 cd /var/www/gitweb
 sudo ln -s /usr/share/gitweb/* .
* Edit /etc/apache2/apache.conf. Add the following
 ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
 <directory /var/www/gitweb>
 Options Indexes FollowSymlinks ExecCGI
 DirectoryIndex /cgi-bin/gitweb.cgi
 AllowOverride All

* Edit /etc/gitweb.conf
 # path to git projects (<project>.git)
 #$projectroot = "/var/cache/git";                  // <-default setting
 $projectroot = "/home/DriverTeam/Repositories";    // <-your git directory

* <font color="#ff0000">!!!!Confirm the repository directories's permission. Check Read/Exec permission for "others account"(gitweb).!!! </font>

* Restart apache
 sudo /etc/init.d/apache2 restart

* Visit http://host_addr/gitweb

No comments: