Monday, April 10, 2006

Setting up a CVS server on Linux

After a long pause from posting, here I am writing down some experiences with cvs server. CVS, Concurrent Versions System, is a powerful software that helps software developers - in team or even individual - to keep track of development process. You can find any further information about its features at the site linked above.

I work almost daily (..let's take this as true) with cvs as a client, but I configured a cvs server only once, and it was a looong time ago. I need now to get a cvs server working for my new "free time" project, a site for my group of friends. Let's go now!

get the latest version of CVS, and then extract it:
-- on the server host--
# wget http://ftp.gnu.org/non-gnu/cvs/source/feature/1.12.13/cvs-1.12.13.tar.gz
# tar xzf cvs-1.12.13.tar.gz

configuring and installing it:
# cd cvs-1.12.13
# ./configure
# make
# make install

happiness! no problem so far.
now we need to create the repository, I suppose..
# mkdir /var/lib/cvsroot
# chmod 1777 /var/lib/cvsroot
# export CVSROOT=/var/lib/cvsroot
# cvs init

we did it! let's test it now from a remote host, importing a first test project:
-- from another machine --
$ export CVS:pserver:user@cvshost.myserver.com:/var/lib/cvsroot
$ cvs login
Logging in to :pserver:user@cvshost.myserver.com:2401/var/lib/cvsroot
CVS password:
[enter your password, user must be a local user for the machine cvshost.myserver.com]
$ cd myproject
$ cvs import -m "first project" test myproject START
N myproject/README
N myproject/AUTHORS
N myproject/TODO
N myproject/index.php

No conflicts created by this import

the last line shows us that we didn't get any problem during the last operation. PHeeew. :) It was easy, wasn't it ?

Let's try to checkout the project directly from the cvs server:
$ cd /tmp/
$ cvs co myproject
cvs checkout: Updating myproject
U myproject/README
U myproject/AUTHORS
U myproject/TODO
U myproject/index.php

It worked! Now I have to write down all the code. And I have no more excuses like "ehhh I need a cvs server online somewhere". I need time. And some coffee, maybe.

Finally, notice that I didn't edit any configuration file, just used the default ones provided with the package. It seems they fit very well my basic needs.

You can find a good howto about CVS server: http://www.linuxfromscratch.org/blfs/view/cvs/server/cvsserver.html

0 Comments:

Post a Comment

<< Home