Installing CVS - (UNIX / Release 1.11.14)
by Jeff Hunter, Sr. Database Administrator
CVS is the Concurrent Versions System, the dominant open-source network-transparent version control system. CVS is useful for everyone from individual developers to large, distributed teams:Downloading CVS
- Its client-server access method lets developers access the latest code from anywhere there's an Internet connection.
- Its unreserved check-out model to version control avoids artificial conflicts common with the exclusive check-out model.
- Its client tools are available on most platforms.
This articles provides an overview of the steps required to download, install and configure CVS, (version 1.11.14) assuming a UNIX-like operating system. For this article, I will be using Solaris 2.8.
You can download the the source code for CVS from:Installing the CVS SoftwareCVS Domain Home Page: http://www.cvshome.orgYou can also FTP the source code from ftp.cvshome.org.# cd /usr/local/src # ftp ftp.cvshome.org Connected to ftp.cvshome.org. 220 Features: a p . Name (ftp.cvshome.org:root): anonymous 230 Hi. No need to log in; I'm an anonymous ftp server. ftp> cd pub/LATEST_STABLE 250 "/pub/LATEST_STABLE/pub/LATEST_STABLE" ftp> binary 200 Okay, using binary. ftp> get cvs-1.11.14.tar.bz2 200 Okay. 150 Making transfer connection... 226 Success. local: cvs-1.11.14.tar.bz2 remote: cvs-1.11.14.tar.bz2 2224632 bytes received in 13 seconds (170.76 Kbytes/s) ftp> bye 221 Bye.Here are several other CVS website that you may find useful:Windows version of the CVS: http://www.cvsnt.org GUI front-end for CVS: http://www.wincvs.org Java client: http://www.jcvs.org
At this point you should have the CVS source code downloaded and placed the archived file (i.e. cvs-1.11.14.tar.bz2) in /usr/local/src. When CVS is going to be installed for shared use, the installation should be done as the root user.Post Installation Steps
Unpacking CVSPut the downloaded CVS source code archive in /usr/local/src as the root user and unpack:Compiling CVS# cd /usr/local/src # bunzip2 cvs-1.11.14.tar.bz2 # tar xvf cvs-1.11.14.tarYou are now left with a directory /usr/local/src/cvs-1.11.14The following assumes you want to install CVS in /usr/local:Installing CVS# cd cvs-1.11.14 # ./configure --prefix /usr/local # makeUse the make install command to install the CVS programs and documentation:# make install
Starting CVSPSERVER on Solaris 10Solaris 10 Users Only! If you are using the Solaris 10 Operating Environment, there will be a problem starting the CVSPSERVER. In Solaris 10, services are no longer managed by editing the inetd configuration file, inetd.conf. Instead, you use inetconv to convert the configuration file content into SMF format services, then manage these services using inetadm and svcadm. Once a service has been converted by inetconv, any changes to the legacy data in the inetd config file will not become effective. However, inetd does alert the administrator when it notices change in the configuration file.Setting up the Password Servercvspserver stream tcp nowait root /export/home/<user>/bin/cvs cvs --allow-root=/opt/cvsroot pserver inetconv -i inet.cvspserver inetadm -e svc:/network/cvspserver/tcp:default inetadm -l svc:/network/cvspserver/tcp:defaultThanks to "Madhusudhan M" <msudhan@TechMahindra.com> for this tip.If you want users to access the repository from other computers, then you will need to configure the pserver by performing the following actions as the root user:Create the CVS Owner and Group
- Make sure to put an entry in /etc/services similar to the following:cvspserver 2401/tcp # CVS Password Server
- If you don't use tcpwrappers, place the following line in /etc/inetd.conf:cvspserver stream tcp nowait root /usr/local/bin/cvs cvs --allow-root=/var/lib/cvsroot pserver
- If you use tcpwrappers, then place the following line in /etc/inetd.conf:cvspserver stream tcp nowait root /usr/sbin/tcpd /usr/local/bin/cvs --allow-root=/var/lib/cvsroot pserver
- Once you have made changes to the /etc/inetd.conf file, restart inetd (or send the appropriate signal to reread /etc/inetd.conf.
NOTE: The '--allow-root' option specifies the allowable CVSROOT directory. Clients which attempt to use a different CVSROOT directory will not be allowed to connect. If there is more than one CVSROOT directory which you want to allow, repeat the option.
(Unfortunately, many versions of inetd have very small limits on the number of arguments and/or the total length of the command. The usual solution to this problem is to have inetd run a shell script which then invokes CVS with the necessary arguments.)Create a UNIX user and group that will own the CVS repository(s):# groupadd cvsdev # useradd -g cvsdev -m -d /usr/cvs -s /usr/bin/bash -c "CVS Owner" cvs 6 blocks # passwd cvs New password: ******* Re-enter new password: ******* passwd (SYSTEM): passwd successfully changed for cvs