How To Setup A “Fossil” Server On CentOS Using “nginx” and “xinetd”
If you've ever done professional software development, you already know that it is not possible without source control and issue tracking software. In this article, you will see how easy it is to setup a fully working Fossil DVCS server on a CentOS machine.
FreeBSD users may find this guide (external) more useful.
As Gertm kindly suggested in the comments the whole approach can be applied to
lightttpd with a slight modification. Please see the top most comment by Gertm.
To be able to use the latest Fossil version, we're going to install it from the source.
Installing compile-time requirements
Fossil can use zlib and openssl (for HTTPS access). It can also be extended through a pseudo-macro mechanism using Tcl scripting language. Install all of them to enable all features -don't worry! They require only a tiny space and don't drag in a jungle of dependencies.
Compiling and installing fossil
Obtain Fossil source from Fossil website, extract it, run ./configure followed by make install and you're done. For example:
By default Fossil binary will be installed to /usr/local/bin, unless you pass the --prefix option to configure script.
To test your installation, just run
Setting up xinted
First you need to install xinted.
Now assuming that Fossil server is supposed to run on 4545, we need to inform xinted about it.
The last step is telling how to invoke fossil with which parameters. Create a file named fossil in /etc/xinted.d with the following content:
That's done it. Start xinetd.
Setting up nginx
If you have already enabled EPEL repository on your CentOS 6.x, you may notice that there's already an nginx package available at version 1.0.15 which is the legacy stable version of nginx. To use the latest version, add the nginx repository for your CentOS (5 or 6) according to nginx docs and then install nginx itself. For example on a CentOS 6.x machine:
To configure nginx to forward requests to the fossil server, create a file in /etc/nginx/conf.d/ with the following content:
Finally start the nginx server.
Create your first repository
To test your setup, create your first repository in /srv/fossil (or whatever path you picked in /etc/xinetd.d/fossil):
Now you can navigate to http://YOURHOST/test and see that your fossil repository is available on the web!
Note: When creating the repository, it is mandatory that the name ends in
You may also want to enable nginx and xinetd to run automatically at startup.
You can setup a web-enabled source control, issue tracking and wiki solution using Fossil and nginx very quickly and with minimal administration effort. The good thing is that Fossil is extremely light-weight compared to similar solutions like Trac -something that you'll come to appreciate when the number of your projects grows.
Image source: dianastaresinicdeane.files.wordpress.com