Linux [ServerSupport]

Configure Version Control Server with CVS - Linux

Things to be known before configuring CVS

  • Check whether you are having following packages, i.e., CVS and xinetd with the following command
    ~]$ sudo rpm -qa cvs xinetd
    If not installed then kindly install using command yum. As shown below.
    ~]$ sudo yum install cvs xinetd
  • Now create a cvs user & group.
    ~]$ sudo /usr/sbin/groupadd cvsusers → cvsgroup created.
    ~]$ sudo /usr/sbin/useradd -g cvsusers cvsuser → cvsuser created
  • Go to /etc/xinet.d/ folder and check for the file cvspserver. If not available create it or if you find CVS file then rename the CVS file to cvspserver. Now edit the CVS file using vim command.
  • Create a Folder / Partition (ex: cvsrepo) in a server to store the CVS repository data. Having group and user of CVS with permission 2770. Next create a repository folder under the cvsdata folder, with the same permission

Steps to Configure CVS Server

Create / Edit cvspserver file

~]$ cd /etc/xinet.d
~xinet.d]$vim cvspserver

service cvspserver
disable = no
id = cvspserver
socket_type = stream
protocol = tcp
user = root
wait = no
server = /usr/bin/cvs
passenv = PATH
Port = 2401
server_args = -f –allow-root=/projdata1/CVSData/proj1repo pserver
: x or wq (i.e., save and exit)
To Add Multiple repository in cvspserver file.
service cvspserver
disable = no
id = cvspserver
socket_type = stream
protocol = tcp
user = root
wait = no
server = /usr/bin/cvs
passenv = PATH
Port = 2401
server_args = -f --allow-root=/projdata1/CVSData/proj1repo -f –allow-root=/projdata1/CVSData/proj2repo -f --allow-root=/projdata1/CVSData/proj3repo pserver
: x or wq (i.e., save and exit)
Creating repository folder and initiating the cvs repository folder.


~]$ su --> login as root.
~]# mkdir /projdata1/CVSData
~]# chown -R cvsuser.cvsusers proj1repo
~]# chmod -R 770 proj1repo
~]# cd proj1repo
~]# mkdir proj1repo --> (this is a repository folder)
~]# chown -R cvsuser.cvsusers cvsrepo
~]# chmod -R 2770 proj1repo
~]# su cvsuser --> login as cvsuser
cvsuser@host~]$ cvs -d /projdata1/CVSData/proj1repo init → this initiate the repository
cvsuser@host~]$ su --> login again as root.
~]# /sbin/service xinetd start --> now start the xinetd service.
~]# exit
cvsuser@host~]$ cd /projdata1/CVSData/proj1repo/CVSROOT
cvsuser@host~]$ cat /etc/passwd | grep -E '^usr1|^usr2|^usr3' | cut -d ":" -f 1,2 > passwd → (This file will be stored under CVSROOT folder)
Giving Write Permission to Selected Users
cvsuser@host~]$ vim writers → (Creating this file with users name, will only allow those users to commit in cvs client)
: x or wq --> (now save and exit writers file, this file is store under CVSROOT folder)
cvsuser@host~]$ login as a different cvs user and try to access the cvs server using cvs client.
Sending alert Mails from CVS server to selected users.
  1. Go to repository folder and go into the CVROOT Folder. Open a file named with loginfo using vim.
    ~]$vim loginfo <enter ↲>
  2. Now append a line as show below.
ALL (echo ""; echo "File/Version(new,old)/Tag :" %{svVt}; echo ""; echo "Cvs User Name : $USER"; echo ""; echo "Date :" `date`; echo ""; cat) > /system/scivar/cvslog/project1_log_report.txt ; /usr/bin/sendEmail -f "Cvs Commit Alert Mail <>" -t "" -cc "" -o reply-to="System Administrator <>" -u [cvs commit] [$USER] [`date`] -o message-
file="/system/scivar/cvslog/project1_log_report.txt" ; rm -rf /system/scivar/cvslog/project1_log_report.txt

Now the CVS Server is ready to USE.

Linux [Client Support]

CVS Client (CrossVC/LinCVS) Configure - Linux

Link to download CrossVC / LinCVS Client for Linux and Windows

  • For Linux
    • wget
    • wget
  • For Windows
      and download file.

Configuring CVS Client on Linux

  • Installing binary using rpm command.
    ~]$ rpm -ivh lincvs-1.4.3-1.2.el4.rf.i386.rpm or rpm -ivh lincvs-1.4.3-1.2.el4.rf.x86_64.rpm
    depending on the os platfor whether it is 32bit or 64bit os, need to install the binaries.
    ~]$ sudo rpm -ivh /Softwares/Linux_soft/DVD/cvs/cvsclient/lincvs-1.4.3-1.2.el4.rf.x86_64.rpm
    Preparing... ########################################### [100%]
    package lincvs-1.4.3-1.2.el4.rf.x86_64 is already installed
  • Now login as a usr1 and invoke the typing a command "lincvs".
    Usr1~]$ lincvs &
    you will be displayed with a lincvs window, as shown below.

Creating a Profile

  • Open CVS and got to Menu → Config → Profile.
  • Click on Add
  • Click on Access and change to Password.
  • Now fill other fields, as per your variables, as shown in example in the below picture

    Click on ok.
  • Go to Menu → Project → Checkout → here you will check whether you will be able to access/browse the modules. Click on Browse modules and enter the password.
    Note: This is to test your login is accepted by cvs server.

Enter the password and click ok.
Once the password is accepted correctly, you will not find any error. Now click on cancel and cancel.

  • Please Collect Profile Details from you Team lead or IT Admin.
    Required Profile details are.

    Version Control system: CVS
    Name : CVSTST
    User : User name
    Server : (for local network) use instead of (to access from outside office)
    Repository : ex: /proj1/CVSDATA/cvsrepo (this you can get from Team Lead/IT Admin)
    Access : password

Importing Data for first time to Repository (Which is done by your Team lead or IT Admin

  • First Crate a folder that you want to add in Repository folder with a text file having some data in the folder.
    # mkdir Data
    # vim readme
    This is created by Vasant B A.
    For importing of data to CVS Repo.
    Kindly do not delte the readme file.
    Please Note:
    Kindly add one text file with at least minimum data whenever you want to add module/folder in cvsrepo-testdata folder.
    Date: 16Mar2011
    😡 (Save and exit)
  • Now you can Import the Data folder to CVS Repository with same name or different name. This folder will be the top folder for other folder or files which you will be saving in future
  • Now click on either of the highlighted icon. As shown in below picture.
  • You will get a Import windows as shown in below picture.

Now enter the required fields. The folder from where you are going to import, make sure importing folder should not be empty. It must have at least one readme.txt or a txt file containing some data, like the information of repository folder created by and created date. Then click on import. Here the vendor tag and Release tag must different, data must not be same. Once the data is imported you will find the below msg in cvs client window.

  • cmd: cvs -d ":pserver:usr1@" -r import -I ! -I "RCS" -I "SCCS" -I "CVS" -I "CVS.adm" -I "RCSLOG" -I "cvslog.*" -I "tags" -I "TAGS" -I ".make.state" -I ".nse.depinfo" -I "*~" -I "#*" -I ".#*" -I ",*" -I "_$*" -I "*$" -I "*.old" -I "*.bak" -I "*.BAK" -I "*.orig" -I "*.rej" -I ".del-*" -I "*.a" -I "*.olb" -I "*.o" -I "*.obj" -I "*.so" -I "*.exe" -I "*.Z" -I "*.elc" -I "*.ln" -I "core" -m "First time of Data import to CVS repository folder." "CVStest_Data" CVS_Test_Data CVS_TEST_Data_13_Jan_2011 N cvsrepo/Readme.txt No conflicts created by this import

Checkout data from CVS Repository

  • Go to Project → Checkout or click on the highlighted icon, as shown in the below picture.
  • Click on Ok as shown in above picture. Now you will be asked to add for work bench.

Adding New folders or files to CVS Module.


  1. Whenever you create a folder in your working area module please add a readme text file with some data. Without this you can not add/import the new folder to CVS Repository.
  2. While adding files from non-control tab, if they are non-text files then add as a binary files.

Configuring CVS client in Linux using Konsole (Command Mode)

  • Login as Local User
    [Vasant@ganga ~]$ mkdir cvsworkarea (Here you can give name you required)
    [Vasant@ganga ~]$ export CVSROOT=':pserver:Vasant@'
    syntax: export CVSROOT=':pserver:<username@ip address>:/<repository path>
    [Vasant@ganga cvsworkarea]$ cvs login
    Logging in to :pserver:Vasant@
    CVS password:
    [Vasant@ganga cvsworkarea]$ cvs co <module name>
    (Module name you can get from Teamlead / Sys admin)
  • If every thing went fine you will not get any error. But display a last one line.
    cvs checkout: Updating <Module name>