Question: How do I install CVS server, and create a CVS repository on UNIX / Linux environment to manage my source codes?
Answer: You should really be using subversion or GIT. For some reason, if you still want to install and configure CVS, use the steps explained below.
1. Verify CVS
Make sure your Linux server has cvs installed as shown below.
# cvs -v Concurrent Versions System (CVS) 1.11.22 (client/server) Copyright (C) 2006 Free Software Foundation, Inc.
If you don’t have CVS installed on your system, install it from your Linux distribution repository. For example, on redhat based system, install the RPM as shown below.
# rpm -ivh cvs-1.11.22-5.el5.i386.rpm
2. Create CVS User and Groups
Create cvs user as shown below.
# useradd cvs # passwd cvs
If you want only developers to access the CVS repository, create a developers group as shown below.
# groupadd developers
3. Create CVS Repository Directory
If you are planning to create a CVS repository for project1, create the following /home/cvs/project1 directory and assign appropriate privileges.
$ cd /home/cvs $ mkdir project1
As root, do the following to assign developers group to this directory, also make sure group has full privilege on this project1 directory.
# chgrp developers /home/cvs/project1/ # chmod g+srwx /home/cvs/project1
4. Initialize the CVS Repository
Currently the /home/cvs/project1 is just an empty directory. To make this as a CVS repository, you should initialize it as shown below.
$ cvs -d /home/cvs/project1 init
Once initialized, you’ll see CVSROOT directory created under the CVS repository.
$ ls -la /home/cvs/project1/ total 12 drwxrwxr-x 3 cvs developers 3096 Aug 21 15:11 . drwx------ 4 cvs cvs 3096 Aug 21 15:10 .. drwxrwxr-x 3 cvs cvs 3096 Aug 21 15:11 CVSROOT
Now you can start checking in your source code to the /home/cvs/project1 CVS repository.
Comments on this entry are closed.
Hi,
I am looking for installation for git server on ubuntu ?
Could you please provide tutorial for git server ?
btw, nice article.
Hi,
Nice tutorial but a bit short. Could you give examples on how to push code to the repository, and pull it from the repo. Also how to create a branch etc. Basic cvs stuff for programmers which I am not by the way, but you can use revision control systems for other kinds of documents.
Thanks in advance,
Siggi
P.s. love your blog.
Try this link. The search form on this page doesn’t work.
http://www.thegeekstuff.com/2011/08/git-install-configure/
You point out we really should be using git or svn, however you don’t explain why that is.
“rpm -qa | grep cvs ” displays cvs-1.11.23-15.el6.i686