First step: CVS installation
The code is as follows |
Copy Code |
sudo apt-get install CVS |
Initializing CVS
The code is as follows |
Copy Code |
$ sudo cvs-d/var/lib/cvsd/cvsroot init $ sudo apt-get install Cvsd |
The current user can be created in the directory, it is best to jump to the root directory.
Step two: The configuration of the CVS server
The first thing to do after installation is to configure the CVS server's configuration file to work properly. First, add Cvspserver to the/etc/services file to make it a Linux service, which is the portal to the CVS server routine, configured as follows:
The code is as follows |
Copy Code |
Cvspserver 2401/TCP # CVS Client/server operations Cvspserver 2401/UDP # CVS Client/server operations |
If the above two lines of text already exist in the file, you do not need to add them.
Configuration complete
The code is as follows |
Copy Code |
/etc/init.d/cvsd start |
Step three. Establish CVS user groups and Cvsroot users
The code is as follows |
Copy Code |
Groupadd CVS Useradd cvsroot–g CVS passwd Cvsroot Chown-r cvsroot:cvs/backup/cvsroot/ chmod 755/backup/cvsroot/ |
Create File passwd
The code is as follows |
Copy Code |
Htpasswd-c/backup/cvsroot/cvsroot/passwd Yuexiaosheng |
Yuexiaosheng is the user name to log on to the CVS server
If you add one more user
The code is as follows |
Copy Code |
HTPASSWD-BC/BACKUP/CVSROOT/CVSROOT/PASSWD yuexaosheng2 123456 |
The CVS system defaults to login with system user, which requires the following modifications:
[1] Open/home/cvsroot/cvsroot/config
The code is as follows |
Copy Code |
The second line of #SystemAuth = No Remove the annotation, which is changed to Systemauth = No |
[2] Open/home/cvsroot/cvsroot/passwd
After the yuexiaosheng:xxxxx, add: cvsroot, i.e.
The code is as follows |
Copy Code |
Yuexiaosheng:xxxxx:cvsroot |
This allows you to log in using the user name Yuexiaosheng (instead of using the system user Cvsroot).
Step Fourth: Start the service using the Xinetd method
I found no xinetd under my ubutun.
The code is as follows |
Copy Code |
Apt-get Install xinetd |
New and edit the file cvspserver under directory/etc/xinetd.d, which must be the same as the Cvspserver name in the/etc/services above
The code is as follows |
Copy Code |
Cd/etc/xinetd.d Vim Cvspserver
|
File content: (note here, all equal signs must have a space on both sides! Otherwise no service is found)
The code is as follows |
Copy Code |
Service Cvspserver { Disable = no Flags = Reuse Socket_type = Stream wait = no user = root Server =/usr/bin/cvs Server_args =-f–allow-root=/backup/cvsroot PServer Log_on_failure + + USERID } |
Reboot xinetd
The code is as follows |
Copy Code |
[Root@localhost ~]#/etc/init.d/xinetd Restart
|
Stop xinetd: [OK]
Start xinetd: [OK]
Check to see if the Cvspserver service has started
The code is as follows |
Copy Code |
[Root@localhost ~]# Netstat-l|grep Cvspserver TCP 0 0 *:cvspserver *:* LISTEN |
Test with Eclipse
Success.