ÎÒÈýÌìµÄ¹¤×÷½á¹û£¬ºÍ´ó¼Ò·ÖÏí½¨Á¢ºÍÅäÖòÙ×÷¶¼ÊÇÔÚRedhat
Linux8.0ÉÏ×öµÄ¡£ÏµÍ³´øµÄCVS¿ÉÖ´ÐгÌÐòÔÚ/usr/binÏÂÃ棬°æ±¾ÐÅϢΪ£ºConcurrent Versions System
(CVS) 1.11.2 (client/server)¡£ÏµÍ³´øµÄÕâ¸öcvs¿ÉÖ´ÐгÌÐò¼È¿ÉÒÔµ±¿Í»§¶ËʹÓã¬Ò²¿ÉÒÔÓÃÀ´½¨Á¢cvsÔ´´úÂë¿â£
½¨Á¢Ò»¸öÔ´´úÂë¿âÖ÷ÒªÓÐÒÔϼ¸²½£º
³õʼ»¯cvs·þÎñÆ÷»·¾³¡£
#usr/local/source init
Ö®ºó½øÈë/usr/local/source£¬¿ÉÒÔ¿´µ½ÓÐÒ»¸öĿ¼CVSROOT, ÏÂÃæÊdzõʼ»¯ºóµÄCVS·þÃÎļþ¡£ÔÝÇÒ±£³Ö²»¶¯¡£
£¨2£©°Ñcŵ½xinetdϵͳ·þÎñÖС£
Ê×ÏÈÔÚ/etc/xinetd.dĿ¼ÏÂÉú³ÉÈÎÎñÅäÖÃÎļþcvsp¬ÎļþÃû³Æ¿ÉÒÔËæ±ãÓá£
ÆäÖÐÄÚÈÝ´óÖÂÈçÏ£º
service cvspserver
{
flags = REUSE
socket_type = stream
wait = no
user = root
protocol = tcp
server = /usr/bin/cvs
server_args = -f --allow-root=/usr/local/source pserver
disable = no
}
|
ÆäÖÐserver_argsÒ»¸ö²ÎÊýÖ¸¶¨ÁËÔ´´úÂë¿â·¾¶£¬Ò»¸öÖ¸ñÆ÷ʹÓÃÃÜÂëÈÏÖ¤·½Ê½¡£
µÚ¶þ£¬ÒªÈ·ÈÏ/etc/servicesÎļþÖУ¬ÓÐcvspserver¹Ø¼ü´Ê£¬²¢·ÖÅäÁ˶˿ڣ¬È磺cvspserve 2401/tcp¡£
µÚÈý£¬ÖØÐÂÆô¶¯xin£¬cvs·þÎñ¾Í¿ÉÒÔÓÃÁË¡£
£¨3£©²âÊÔ¡£¼Ù¶¨cvs·þÎñÆ÷ÔÚ192.168.0.205ÉÏ£¬ÏµÍ³ÉÏÓÐÒ»¸öÓû§cvs¡£µÇ½Áíһ̨linxu»úÆ÷£¬Ö´ÐÐÏÂÁÐÃüÁî¿ÉÒÔÍê³É²âÊÔ£º
$export CVSROOT=:pserver:cvs@192.168.0.205:2401/usr/local/source
$cvs login
ÊäÈëÃÜÂëö´íÌáʾ±íʾµÇ½³É¹¦¡£
Èç¹ûÏëÔÚÒ»¸ölinuxϵͳÉϽ¨¶à¸öÔ´´úÂë¿â£¬·Ö±ðÌṩcvsظ´ÉÏÃæ²½Öè¾Í¿ÉÒÔÁË¡£
µÚÒ»²½¢ÒâʹÓÃÒ»¸ö²»Í¬Â·¾¶¡£
µÚ¶þ²½·Åµ½xinetdϵͳ·þÎñÖÐÉÔ΢Âé·³µã¡£/etc/xinetd.dĿ¼ÏÂÒªÉú³ÉÒ»¸öеÄÈÎÎñÅäÖÃÎļþ£¬ÀýÈçcvspserver1£¬ÎļþÖÐserviceÃû³ÆÒ»¶¨ÒªÇø·ÖµÚÒ»¸ö£¬ÀýÈçservice
cvspserver1£¬server_args×öÏàÓ¦±ä¶¯¡£»¹ÒªÔÚ/etc/servicesÎļþÖУ¬¼ÓÈëеķþÎñ¶Ë¿ÚºÅ£¬ÀýÈ磺cvspserver1
2¡£ÖØÐÂÆô¶¯xinetd·þÎñ.
µÚÈý²½²âÊÔʱºò£¬¿ÉÒÔÕâÑùÉ趨£º
$export CVSROOT=:pserver:cvs@192.168.402/usr/local/source1
cvs×÷Ϊ²¢Ðа汾¿ØÖÆϵͳ£¬¶àÓû§¶ÁдÊÇÐèÒªµÄ¡£µ«ÓÐʱºòÏ£ÍûÓÐЩÓû§Ö»ÄÜcheck
out£¬²»ÄÜÌύдúÂë¡£ÓÐʱϣÍûcvsÉϵÄijЩÓû§²»ÄÜcheck outһЩ´úÂ룬ÀýÈçºÍÁíÒ»¸ö¿ª·¢×é¹²ÓÃÒ»¸öCVS£¬Ï£ÍûÁíÒ»¸ö×éµÄ³ÉÔ±²»ÄÜcheck
out×Ô¼º×é´úÂë¡£
cvs·þÎñÆ÷ÓÐÒ»Ì××Ô¼ºµÄÓû§ÈÏÖ¤»úÖÆ£¬ÎÒʹÓÃʱºòû²ÉÓ㬶øÊÇʹÓÃÁËϵͳÉÏÓû§Ö±½Ó×÷Ϊcvs·þÎñÆ÷Óû§£¬²ÉÓÃlinux×é¨ÏÞʵÏÖÁËÕâÑùµÄ¹¦ÄÜ¡£
¾ÙÀý˵Ã÷£¬ÔÚlinxuϵͳÉÏÄ£Äâʵ¼ÊÁ½¸ö¿ª·¢×éa¡¢b£¬·Ö±ðÓÐÓû§a-useer2,b-user1,b-user2¡£
Ä£¿éa-source£¬Ï£Íûa×é³ÉÔ±¶¼¿ÉÒÔ¶Áд£¬b×é³ÉԱûÓÐÈκÎȨÏÞ¡£¿ÉÒÔʹÓÃÒÔÏÂϵÁÐÃüÁ
#chown -R a-user1 a-source
#chgrp -R a a-source
chmod -R 770 a-source
Èç¹ûÏ£ÍûÄ£¿éa-source,Ö»ÓÐa-user1¿ÉÒÔд£¬Í¬×éÆäËüÓû§¿ÉÒÔ¶Á£¬b×é³ÉԱûÓÐÈκÎȨÏÞ£¬°ÑchmodÃüÁî¸Ä³É-R 750¾ÍÐÐÁË¡£
±ØÐë˵Ã÷µÄ£¬cvsÖÐĬÈÏÒ»¸öÓû§checkout´úÂëʱºò£¬»áÔÚµ±Ç°Ä£¿éÏÂÉú³ÉÒ»¸öËøÎļþ£¬Èç¹ûÕâ¸öÓû§¶Ôµ±Ç°Ä£¿éûÓÐдȨÏÞ£¬¶ÁÊDz»¿ÉÄܵġ£ÅäºÏÉÏÃæµÄȨÏÞÉèÖ㬱ØÐë¸ÄÒ»ÏÂcvs·þÎñÆ÷ÅäÖ᣸ijɲ»ÔÚµ±Ç°Ä£¿éĿ¼ÏÂÉú³ÉËøÎļþ£¬°ÑËøÎļþ¼¯Öе½Ò»¸öËùÓÐÓû§¶¼ÓжÁдȨÏÞµÄĿ¼¡£ÐÞ¸ÄÅäÖÃÎļþCVSROOT/config£º
# Put CVS lock files in this directory rather than directly in the
repository.
#LockDir=/var/lock/cvs
LockDirÉèÉϾͿÉÒÔÁË¡£
|