Showing posts with label CGIT. Show all posts
Showing posts with label CGIT. Show all posts

Wednesday, October 26, 2016

How to Install a Private Git Server with CGIT Web Frontend on CentOS 7

Self-hosting a lightweight Git web interface like CGIT written in C provides near-instant page loads, minimal RAM footprint, and syntax-highlighted code browsing compared to heavyweight alternatives like GitLab.

Stack: CentOS 7 • CGIT • fcgiwrap • Nginx • highlight syntax engine

1. Installing Prerequisites and fcgiwrap

CGIT operates as a FastCGI binary. Install fcgiwrap to interface between Nginx and the CGIT binary:

yum install epel-release -y
yum install fcgi-devel highlight git autoconf automake libtool -y

cd /usr/src
git clone https://github.com/gnosek/fcgiwrap.git
cd fcgiwrap
autoreconf -i
./configure --prefix=/usr
make && make install

2. Compiling CGIT from Source

cd /usr/src
git clone https://git.zx2c4.com/cgit
cd cgit
git submodule init
git submodule update
make get-git
make && make install

3. Nginx FastCGI Integration

Configure Nginx to route CGIT requests to the fcgiwrap socket:

location / {
    fastcgi_pass unix:/var/run/fcgiwrap.sock;
    fastcgi_param SCRIPT_FILENAME /var/www/htdocs/cgit/cgit.cgi;
    fastcgi_param PATH_INFO $uri;
    fastcgi_param QUERY_STRING $args;
    fastcgi_param HTTP_HOST $server_name;
    include fastcgi_params;
}

How Google Antigravity Solved the Mysterious NVIDIA Sleep Reboot on My Dell Inspiron 7567 (Ubuntu Linux)

If you run modern Ubuntu or Linux on a Dell Inspiron 15 Gaming (7567) or a similar 7th-gen Intel laptop paired with an NVIDIA GeForce GTX ...