cvs -d <#pathToHomeDirectory#> init
here pathToHomeDirectory is the path of repos wherever you want to be (you must have write permission to that location)
-d is for directory
It will create a CVSROOT folder under the reposName which contains various administrative files which controls CVS behavior
Deleting a Repository
It is as simple as
1. #rm –rf #RepositoryName# (But it is not recommended)
2. In a sandbox if you issue
cvs remove -f file_nolonger_needed
this will mark the file in the repository as removed at the current and into the future, and it will remove the file from your current sandbox.
You should be aware that directories are not really managed by CVS so you can't remove them, but if you remove everything in them and use the -P on updates they are effectively removed.
When a remote cvs client uses the pserver method to connect to a repository, the client is actually contacting a specific port number 2401. It is default port for cvs pserver.
The server will start as soon as it see a connection request from the client.
Put a line in the /etc/services as
Now for authenticating you have to manually create “passwd” files under the CVSROOT.
Its format should be like this :-
If you want to give read or write access separately then you have to create two more files under CVSROOT manually named as “readers” and “writers”.
Readers contains list of users who can only read the repository
Writers contains list of users who can read and write the repository
** If same username listed on both the files then cvs gives him only read only access to the repository
Next thing you might want to do is only allow specific users (i.e. your developers) to write to the CVS repository.
To allow only certain users write access to the repository, place their usernames in a file called 'writers' in the CVSROOT module
Backing up a repository
There is nothing particularly magical about the files in the repository; for the most part it is possible to back them up just like any other files but make sure that no one is working at that time.
tar -cf #backupName.tar
Create a file "cvs" under xinetd.d as shown below.
[cvs@cvs ~]# cat /etc/xinetd.d/cvs
# default: off
# description: The CVS service can record the history of your source \
# files. CVS stores all the versions of a file in a single \
# file in a clever way that only stores the differences \
# between versions.
disable = no
port = 2401
socket_type = stream
protocol = tcp
wait = no
user = root
passenv = PATH
server = /usr/bin/cvs
env = HOME=/var/cvs
server_args = -f --allow-root=/var/cvs pserver
# bind = 127.0.0.1
1. Replace bind =127.0.0.1 with the actual IP of your server.
2. If you want to get the logs in a separate file then define that as well. eg. log_type = FILE /var/log/cvspserver
Restart the xinetd server
service xinetd restart