JaVa
   

Setting Up CVS on the Server

Now that you know the basics of using CVS, the server administration can be discussed. Assuming you are running a newer 2.4.x Linux kernel, your system used xinetd instead of inetd for configuring network services. Make sure you already have the CVS client program installed and in your PATH. There should be a directory which stores all xinetd configuration files, /etc/xinetd.d by default.

cd /etc/xinetd.d


Touch a file called cvspserver, and use a command line editor, such as vi to edit the file. Now, insert the following text into the cvspserver file:

service cvspserver
{
 port = 2401
 socket_type = stream
 protocol = tcp
 wait = no
 user = root
 passenv = PATH
 server = /usr/ bin/cvs
 server_args = -f --allow-root=/usr/local/cvsroot pserver
}


Make sure the server attribute corresponds to the location of the cvs executable on your server. If you don’t know this value, type which cvs to discover the binary executable. Once this configuration file has been created, xinetd needs to be told to reload its configuration files. This is usually done by asking xinetd to restart. Issue the following command:

/etc/init.d/xinetd restart


You should see the process stop and start. You are now ready to use the cvs server. CVS must be told to init the new server repository. Choose the location where you would like to keep the CVS repository, and issue the following command as root. Make sure this matches the allow-root part of the server_args line in your cvspserver file. Its once again easiest to set CVSROOT in the environment.

cvs init


The cvs command has now set up a repository. Change directory to $CVSROOT and create a directory called “projosdev”, users can now access this module on the cvs server. It is important that users accessing the repository have write access to this directory. Create a group called cvsusers, and give that group write access to the $CVSROOT directory.

Unlike other services that use daemons, there is no cvsd; rather, the cvs client program actually acts as the server. Therefore no entries to the startup scripts are needed.


JaVa
   
Comments