Give this Howto a look. It's a little dated but should have the general steps you need to setup a Git server. The howto is titled: How To Install A Public Git Repository On A Debian Server.
General steps
Install git + gitweb
$ sudo apt-get install git-core gitweb
Setup gitweb directories
$ sudo mkdir /var/www/git
$ [ -d "/var/cache/git" ] || sudo mkdir /var/cache/git
Setup gitweb's Apache config
$ sudo vim /etc/apache2/conf.d/git
contents of file:
<Directory /var/www/git>
Allow from all
AllowOverride all
Order allow,deny
Options ExecCGI
<Files gitweb.cgi>
SetHandler cgi-script
</Files>
</Directory>
DirectoryIndex gitweb.cgi
SetEnv GITWEB_CONFIG /etc/gitweb.conf
Copy gitweb files to Apache
$ sudo mv /usr/share/gitweb/* /var/www/git
$ sudo mv /usr/lib/cgi-bin/gitweb.cgi /var/www/git
Setup gitweb.conf
$ sudo vim /etc/gitweb.conf
Contents of gitweb.conf
:
$projectroot = '/var/cache/git/';
$git_temp = "/tmp";
#$home_link = $my_uri || "/";
$home_text = "indextext.html";
$projects_list = $projectroot;
$stylesheet = "/git/gitweb.css";
$logo = "/git/git-logo.png";
$favicon = "/git/git-favicon.png";
Reload/Restart Apache
$ sudo /etc/init.d/apache2 reload
Setup Git Repository
$ mkdir -p /var/cache/git/project.git && cd project.git
$ git init
Configure Repository
$ echo "Short project's description" > .git/description
$ git config --global user.name "Your Name"
$ git config --global user.email "[email protected]"
$ git commit -a
$ cd /var/cache/git/project.git && touch .git/git-daemon-export-ok
Start Git Daemon
$ git daemon --base-path=/var/cache/git --detach --syslog --export-all
Test clone the Repository (from a secondary machine)
$ git clone git://server/project.git project
Adding additional Repos + Users
To add more repos simply repeat steps #7 - #9. To add users just create Unix accounts for each additional user.