Installing a CVS Server



| CVS Server | ViewCVS | Logging into CVS |


Files
Location
cvs
http://cvshome.org
ViewCVS
viewcvs.sourceforge.netor sourceforge.net/projects/viewcvs/
MySQL for Python  http://sourceforge.net/projects/mysql-python/
Distutils-1.0.2.tar.gz http://www.python.org/sigs/distutils-sig/download.html

Procedure to Install the CVS Server

Top |
Make a CVS directory somewhere on your system

mkdir /cvs

Add some environment variables edit "/etc/profile" and add

if [ -z "$CVSROOT" ]; then
CVSROOT=/cvs/
fi

if [ -z "$EDITOR" ]; then
EDITOR=kedit
fi

make sure the export statement contains CVSROOT and EDITOR

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC CVSROOT EDITOR

Create a group for cvs access

groupadd cvs

Add users to the group

usermod -g cvs james
or
vi /etc/group
# add the usernames to the cvs group
cvs:x:501:root,james

create a file in /etc/xinet.d named cvspserver

# default: on
# description: This is my setup of a cvs server; I will \
# be testing it for a while so that I can understand it.
service cvspserver
{

flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/bin/cvs
server_args = -f --allow-root=/cvs pserver
only_from = 192.168.1.0
# or 0.0.0.0 if you want everyone to have access
log_type = SYSLOG
}

Change the permissions to the /cvs repository

cd /
cvs -d /cvs init

chgrp -R cvs .
chmod ug+rwx . CVSROOT

Copy the system passwd file and edit to suit

cp /etc/passwd /cvs/CVSROOT/passwd

edit till it only contains the root and users you want delete anything after the second colon

root:$1$ÕÿãVGtdR$fsLYZxbgdTEznzItNJWNv/:
james:$1$ìiMb8GMÄ$khNKPLHTU.Yo1t3BgkjDT0:

Installing ViewCVS

Top |
Download and install in this order

Distutils-1.0.2.tar.gz

 python setup.py install

MySQL-python-0.9.1.tar.gz

edit setup.py so that the correct paths for the mysql libs and includes are there

if sys.platform in ("linux-i386", "linux2"): # most Linux
    include_dirs = ['/usr/local/mysql/include/mysql/']
    library_dirs = ['/usr/local/mysql/lib/mysql/']

Then run

python setup.py build
python setup.py install

viewcvs-0.9.2.tar.gz

cd /usr/local
tar zxvf /usr/local/src/viewcvs-0.9.2.tar.gz

Install the mysql viewcvs db

./make-database

edit viewcvs.conf

[general]

cvs_roots = jamescvs : /cvs
default_root = jamescvs
address = <a href="mailto:[email protected]">James McDonald</a>

[cvsdb]

host = localhost
database_name = ViewCVS
user = root
passwd = xxxxxx
readonly_user = root
readonly_passwd = xxxxx
row_limit = 1000

edit http.conf to add a ScriptAlias Directive

ScriptAlias /cvs/ "/usr/local/viewcvs/cgi/"

<Directory /usr/local/viewcvs/cgi>
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
</Directory>



Logging In

Top |

#!/bin/sh
echo password is cvs
export :pserver:[email protected]:2401/cvs
cvs login