CVS Install
1、验证是否已安装CVS
#rpm -q cvs
如果能显示出类似这样的版本信息,证明已安装CVS:
#cvs-1.11.2-10
Install CVS Server
cp cvs-1.12.13.tar.gz /usr/local/src cd /usr/local/src gzip -d cvs-1.12.13.tar.gz tar -xvf cvs-1.12.13.tar cd cvs-1.12.13
./configure --prefix=/usr/local/cvs make make install
cvspserver 2401/tcp # CVS client/server operations cvspserver 2401/udp # CVS client/server operations
# default: off # description: cvspserver service cvspserver { # id = cvspserver socket_type = stream protocol = tcp user = root wait = no disable = no server = /usr/bin/cvs Port = 2401 # passenv = PATH server_args = --allow-root=/home/cvsroot -f pserver # env = HOME=/home/cvsroot log = /var/log/cvslog }
Sercuitry Config
export CVSROOT=/home/cvsroot # create group cvsadmin groupadd cvsadmin # create a nologin user cvsuser without creating home dir useradd -g cvsadmin -s /sbin/nologin -M cvsuser mkdir $CVSROOT touch $CVSROOT/locks # creates $CVSROOT/CVSROOT cvs init chmod -R 775 $CVSROOT chgrp -R cvsadmin $CVSROOT
# Set this to "no" if pserver shouldn't check system users/passwords SystemAuth=no # Set `TopLevelAdmin' to `yes' to create a CVS directory at the top # level of the new working directory when using the `cvs checkout' # command. TopLevelAdmin=yes
htpasswd -d -c /home/cvsroot/CVSROOT/passwd cvs_test
htpasswd -d /home/cvsroot/CVSROOT/passwd mike
cvs_test:WEOI$(@(@(#JD(:cvsuser mike:WEfe$(@#$@(#DE(:cvsuser
# This file affects handling of files based on their names. # # The -t/-f options allow one to treat directories of files # as a single file, or to transform a file in other ways on # its way in and out of CVS. # # The -m option specifies whether CVS attempts to merge files. # # The -k option specifies keyword expansion (e.g. -kb for binary). # # Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers) # # wildcard [option value][option value]... # # where option is one of # -f from cvs filter value: path to filter # -t to cvs filter value: path to filter # -m update methodology value: MERGE or COPY # -k expansion mode value: b, o, kkv, &c # # and value is a single-quote delimited value. # For example: #*.gif -k 'b' *.gif -k 'b' *.tga -k 'b' *.bmp -k 'b' *.psd -k 'b' *.tif -k 'b' *.png -k 'b' *.iff -k 'b' *.aiff -k 'b' *.obj -k 'b' *.dat -k 'b' *.exe -k 'b' *.com -k 'b' *.dll -k 'b' *.dsw -k 'b' *.dsp -k 'b' *.lwo -k 'b' *.lws -k 'b' *.p -k 'b' *.ico -k 'b' *.frx -k 'b' *.class -k 'b' *.jar -k 'b' *.zip -k 'b' *.lzh -k 'b' *.lha -k 'b' *.rar -k 'b' *.arj -k 'b' *.arc -k 'b' *.avi -k 'b' *.mov -k 'b' *.asf -k 'b' *.smk -k 'b' *.jpg -k 'b' *.mpg -k 'b' *.swf -k 'b' *.frx -k 'b' *.fli -k 'b' *.flc -k 'b' *.tiff -k 'b' *.bin -k 'b' *.dat -k 'b' *.wad -k 'b' *.ppt -k 'b' *.pdf -k 'b' *.3ds -k 'b' *.max -k 'b'
chmod -R 775 $CVSROOT chgrp -R cvsadmin $CVSROOT
/etc/init.d/xinetd restart
Verify CVS Server
export CVSROOT=:pserver:[email protected]:/home/cvsroot cvs login
Firewall changes
-A RH-Firewall-1-INPUT -s 192.168.0.88 -p tcp --dport 2401 -j ACCEPT
and restart iptables: /etc/init.d/iptables restart
:pserver;username=dev;password=123456;hostname=192.168.0.88;port=2401:/home/cvsroot
Reference
info -f cvs