2007年6月4日星期一

Installing CVS

CVS pserver allows source code to be retrieved and modified without access to a file system. It may be more reliable and faster than using the file system on slow network connections.

There are more administrative information regarding pserver.

Log in as root
Create a user account called cvs
Enter: ctlinnd newgroup engineering.checkins
This is optional, you can have the script send emails instead
Add the following line to /etc/news/expire.ctl:
engineering.checkins:A:1:90:never
The messages will expire after 90 days.
Install CVS. Linux installs CVS if you select it as an option. Note: CVS 1.10.6 has bugs with pserver.
Get CVS here
gunzip cvs.tar.gz
tar -xf cvs.tar
./configure (see the README file)
make
make install
Extract perl.tar.gz and perl_lib.tar.gz as described in the machine configuration
Enter: mkdir /ext1/cvs
Enter: chgrp cvs /ext1/cvs
Enter: chown cvs /ext1/cvs
Enter: ln -s /ext1/cvs /cvs
Enter: chgrp cvs /cvs
Enter: chown cvs /cvs
Edit /etc/inetd.conf. Add the line
cvspserver stream tcp nowait root /usr/bin/cvs cvs --allow-root=/cvs pserver
Make sure /etc/services contains the line
cvspserver 2401/tcp
Enter: killall -HUP inetd
To test, go to your home directory and enter:
cvs -d :pserver:cvs@tiger:/cvs login
cvs -d :pserver:cvs@tiger:/cvs co .
Consult the loginfo, taginfo, and notify scripts page
Copy cvsignore to c:\sandbox\CVSROOT
This is optional
This file contains a list of file extensions that I recommend you don't store in the repository
For example, this file causes the cvs stat command to ignore OBJ files instead of telling you that the files aren't checked in. Nice feature.
You can force CVS to ignore this file via cvs add, and WinCVS's "import" command always ignores it
Change the current directory to c:\sandbox\CVSROOT
Enter cvs add cvsignore
Enter cvs commit
Congratulations! You just committed your first changes!
[optional] Make /cvs accessible via Samba so that Windows machines can access the source code tree as \\tiger\cvs. Generally, to perform backups -- See Samba Tips
Edit /etc/smb.conf
Set workgroup =
Set domain controller =
Set security = share
Add the following text to the bottom of the file
[cvs]
path=/cvs
writable = no
printable = no
browseable = yes
public = yes
Enter: /etc/rc.d/init.d/smb stop
Enter: /etc/rc.d/init.d/smb start
Make sure you can see the directory via Windows -- \\tiger\cvs
Add /etc/rc.d/init.d/smb start to /etc/rc.d/rc.local

0 评论: