Install and configure Gitweb.
Environment to prepare: Linux+apache
Installation and configuration steps:
1, decompression git-2.10.2.tar.gz
2, in the decompression after the GIT-2.10.2/directory operation
Yum Install Gitweb
3. Modify Gitweb.conf
Vi/etc/gitweb.conf
# The root directory of the version library
$projectroot = "/home/git/share/gitweb";
# Set the URL address for cloning each version library, one version library can set multiple addresses
@git_base_url_list = ("Git\@10.4.120.101:share/gitweb", "Http://10.4.120.101/gitweb");
# Menu customization: tree view file Display tracing (blame) Link
$feature {' blame '} {' default '} = [1];
$feature {' blame '} {' override '} = 1;
# menu customization: Tree Tim accelerated photo (snapshot) Download link
$feature {' snapshot '} {' default '} = [' Zip ', ' tgz '];
$feature {' snapshot '} {' override '} = 1;
4, find the Linux default Apache installation situation
Modifying the Apache configuration file
Cd/etc/httpd/conf
VI httpd.conf
Alias/gitweb "/home/git/share/gitweb/"
<directory "/home/git/share/gitweb" >
Options FollowSymLinks +execcgi
AddHandler Cgi-script. CGI
DirectoryIndex index.cgi gitweb.cgi index.html
Order Allow,deny
Allow from all
</Directory>
5, restart Apache
/usr/sbin/httpd-k stop
/usr/sbin/httpd-k start
If the default 80 port is occupied, kill
Lsof-i: 80|grep-v "PID" |awk ' {print ' Kill-9 ", $} ' |sh
6. Establish Soft connection
Cd/home/git/share/gitweb
Ln-s/usr/local/git/share/gitweb/*.
Change "Alias/git/var/www/git" to "Alias/gitweb/var/www/git"
7. Use the browser to access Gitweb, such as: HTTP://IP: Port/gitweb, the effect of the following figure: