About CVS, I have written one. This is the article "Open Source World" 2004 300, from the author's name, there is one should be my classmate. :)
I. PSERVER Way 1, Setting Server 0) Create User or Group # Useradd -g Linux Sun # useradd -g Linux Sun # useradd -g Linux Zhang # UserAdd -g Linux ZHANG
1) Establish a CVS source code library directory #CD / usr / local # mkdir cvsroot # chmod 774 cvsroot # chown sun: Linux
2) Check the / etc / services file to ensure that there are two: CVSPSERVER 2401 / TCPCVSPSERVER 2401 / UDP
3) Check the /etc/xinetd.d/ directory to ensure that the CVSPServer file exists, the content is as follows: Service cvspserver {disable = NOSOCKET_TYPE = streamwait = Nouser = rootserver = / usr / bin / cvsserver_args = -f-allow-root / usr / local / cvsroot pserverlog_on_success = useridlog_on_failure = userid}
4) Start the CVS server # / etc / rc.d / init.d / xinetd Restart by restarting xinetd
5) Check the firewall to release the 2401 port 6) and use the downlink command to check if the 2401 port has been correctly bound #NETSTAT -AN | GREP 2401
7) Set the environment variable cvsroot # cvsroot = / usr / local / cvsroot; Export CvsRoot can put this in / etc / profile file to automatically set this variable when the system is started
8) Initialize CVS # cvs init, the directory named cvsroot will appear in the $ cvsroot directory
2, client setting #CVS -D ": PServer: sun@192.168.0.252: / usr / local / cvsroot" login # [Enter password] #CVS IMPORT / / CVS CHECKOUT # CVS logout
3, Advanced Settings 1) Separate the CVS account and the system account to the editing / usr / local / cvsroot / cvsroot / passwd file (this file does not exist when installed) Each line format is as follows: CVS Account: Password: System account example: cvsuser : Xcgaer5321dsa: Suncvsuser After logging in to CVS, it will be missed to the system user sun.2) Edit / usr / local / cvsroot / cvsroot / readers Each single account, read-only permit 3) Edit / usr / local / cvsroot / cvsroot / Writers Row an account, read and write permissions
Second, SSH mode 1, install openssh1) Check if OpenSSH is installed #RPM -QA | GREP SSH2) Check if SSHD runs #ps -aef | grep ssh3) Start SSHD # / etc / rc.d / init.d / sshd start2, Based on traditional password certification #ssh -l [account number on remote server] [host name or IP address] # [YES] # [Enter Password] 3, Key Authentication 1) Configure Remote Server Editing / etc / SHH / SSHD_CONFIG file change PasswordAuthentication YES to PasswordAuthentication NO2) Configure the client
3) Generate a key #CD ~ # ssh-keygen -t r # (dsa) # ~ / .ssh / id_rsa.pubid file is the public key to copy the id_rsa.pubid file generated by the public key. To the Sun User Directory of the remote server $ cd .ssh $ cat ../id_rsa.pubid >> Authorized_keys5) Access CVS Source Base Client Settings You can access CVS $ export cvs_rsh = SSH $ export cvsroot =: ext: Sun@192.168.0.252: / usr / local / cvsroot
Third, the PSERVER mode 1 under the SSH channel 1. The server server is set by pressing the PServer mode, and the /etc/xinetd.d/cvspserver file is as follows. service cvspserver {flags = REUSEsocket_type = streamwait = nouser = rootserver = / usr / bin / cvsserver_args = -f -allow-root = / usr / local / cvsroot pserverpassénv = log_on_failure = USERIDonly_from = 127.0.0.1bin = 127.0.0.1} End change After restarting the xinetd.2, client 1) The client needs to create SSH channel $ CD ~ $ ssh-keygen -d $ CD ~ $ ssh-keygen -d $, the contents of the .ssh / id_rsa.pubid file, such as ZHANG After ~ / .ssh / authorized_keys. $ ssh -v -a -e none -n -o 'keEpalive = yes' -o 'batchmode = yes' -l 2401: localhost: 2401 zhang@192.168.0.252 This window enters the blocking state 2) in another window Medium, $ export cvsroot =: pserver: sun@192.168.0.252: / usr / local / cvsroot where SUN is CVS users