After installing Fedora7, the system will install the CVS software by itself. There is no need to create the configuration file cvs under /etc/xinetd.d/. The default configuration file is as follows:
The following is the quoted content: # default: off # description: The CVS service can record the history of your source # files. CVS stores all the versions of a file in a single # file in a clever way that only stores the differences # between versions. service cvspserver { disable=yes port=2401 socket_type = stream protocol=tcp wait=no user=root passenv=PATH server = /usr/bin/cvs env = HOME=/var/cvs server_args = -f --allow-root=/var/cvs pserver # bind = 127.0.0.1 } |
Preliminary work:
By default, the xinetd service is not installed, so install the xinetd service first #yum install xinetd
Then change /etc/xinetd.d/cvs and change disable=yes to disable=no
Restart the xinetd service, #service xinetd restart
Create user and password
First, create a group named cvs and a user named cvsroot. Users who want to access the CVS service in the future will join the cvs group:
The following is the quoted content: [root@rocketcnvm ~]# groupadd cvs [root@rocketcnvm ~]#useradd -g cvs -s /sbin/nologin cvsroot [root@rocketcnvm ~]#chown -R cvsroot /home/cvsroot |
Next, initialize:
The following is the quoted content: [root@rocketcnvm ~]#cvs -d /var/cvs init |
In this way, the CVSROOT directory is generated in the /var/cvs directory, which stores some configuration files, such as config, etc., and then sets:
The following is the quoted content: [root@rocketcnvm ~]#chown -R cvsroot:cvs /var/cvs [root@rocketcnvm ~]#chmod -R ug+rwx /var/cvs [root@rocketcnvm ~]#chmod 644 /var/cvs/CVSROOT/config |
For the security of the CVS system, we need to modify the /var/cvs/CVSROOT/config file, remove the comment # before "#SystemAuth =no", that is, change it to "SystemAuth =no", and then give it to developers one by one Create an account. Do not assign a user directory to the new one because it will be used as a virtual user account. The specific command is as follows:
The following is the quoted content: [root@rocketcnvm ~]#useradd -g cvs -M rocketpro1 [root@rocketcnvm ~]#password rocketpro1 |
The above command creates a user rocketpro1 without a Home directory, then copies the system shadow file to CVSROOT and renames it to passwd:
The following is the quoted content: [root@rocketcnvm ~]#cp /etc/shadow /var/cvs/CVSROOT/passwd [root@rocketcnvm ~]#chmod 0644 /var/cvs/CVSROOT/passwd |
Then modify the passwd file, delete all lines except rocketpro1, the user just set to use CVS, then remove everything after the second colon in each line, and add the string cvsroot, and change it to the following format:
The following is the quoted content: rocketpro1:$1$RO3GIeUt$6Sbq5uUqzusuK/R1Hua4k/:cvsroot |
Then, delete the user rocketpro1 just added to the system (if you want this user to also be a user of the operating system, you do not need to delete the user. If you only allow this user to access CVS, you can delete the user)
The following is the quoted content: [root@rocketcnvm ~]#userdel -f rocketpro1 |
Using CVS server
Now you can find a windows machine, install smartcvs, set it up, and fill in the username and password.