How to install CVS on centOS / RHEL 5
Install cvs
yum install cvs
Logged in as root
Add group cvs
# groupadd cvs
Add user cvs
#useradd -g cvs cvs
Create repository
cvs -d /path_to_repository init
Change ownership of cvs repository to cvs
chown cvs:cvs /Path_to_cvsroot
cat /etc/services and check is there followings exist
cvspserver 2401/tcp #CVS Pserver
cvspserver 2401/udp #CVS PServer
If not add them into /etc/services
Edit /etc/xinetd.d/cvs
service cvspserver
{
disable = no
port = 2401
socket_type = stream
protocol = tcp
wait = no
user = root
passenv = PATH
server = /usr/bin/cvs
env = HOME=/path_to_repository
server_args = -f --allow-root=/path_to_repository pserver
bind = Your Host IP Address
}
Edit /etc/profile and add following entry
export CVSROOT=/path_to_repository
Then restart the xinetd
/etc/init.d/xinetd restart
Create passwd file within /path_to_repository/CVSROOT
#!/usr/bin/perl
srand (time());
my $randomstring = "(int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97))";
my $saltstring = sprintf ("%c%c", eval $randomstring, eval $randomstring);
my $plainstring = welcome;
my $cryptedstring = crypt ($plainstring, $saltstring);
print "${cryptedstring}\n";
vi /path_to_repository/CVSROOT/passwd and add users as following.
username1:ORJIY/stJFRag:cvs
username2:ORJIY/stJFRag:cvs
...........................
Change the permission of the passwd file
chmod 400 /path_to_repository/CVSROOT/passwd
When Trying to checkout a project from CVS you may receive this error message
cvs checkout: failed to create lock directory for `path_to_repository/Project1'
Edit the CVSROOT/config and uncomment the LockDir and supply a valid path for LockDir . Assign 775 permission to that directory.
Comments
Post a Comment