First we need a fresh Debian 4.0 install
– Installation of cvs and cvsd
# apt-get install cvs cvsd
– You will be asked for the name of the repositories you want to permit access
to, here we wrote “mcs” which is an abbreviation for our company name.
– prepare the repository
# cvs -d /var/lib/cvsd/mcs init
– give access, you will be prompted for at password
# cvsd-passwd /var/lib/cvsd/mcs mike
– and give the cvsd access to the repository
# chown -D cvsd /var/lib/cvsd/mcs
Now you should be running, but we prefered to add a webinterface:
# apt-get install cvsweb
Edit the file /etc/cvsweb/cvsweb.conf line 60 to point at “/var/lib/cvsd/mcs” change the name if you like.
Make apache run as cvsd/cvsd to allow access to the repository (only do this if you are not using apache for anything else) open /etc/apache2/apache2.conf and change www-data to cvs in line 125 and 126.
Edit /etc/apache2/sites-enabled/000-default , change line 17 to:
RedirectMatch ^/$ /cgi-bin/cvsweb
This makes the webserver redirect you to the cvs repository viewer when you try to enter the server.
Please add some security to this, there are no access control. Everybody can see your source now. We added iptables to prevent outsiders from seing this.