After installing CVS in linux, I tried three versions and finally succeeded: Linux Enterprise Application-Linux server application information. For more information, see the following. The following is a successful version. We hope you can learn from it:
After installing cvs, the server and client are installed. You need to configure the server:
1. Check whether cvs is installed. (My redhat7.3 is installed by default)
Rpm-qa | grep cvs
It is usually installed in/usr/bin/cvs. If it is not installed, download the latest rpm installation at www.cvshome.org.
2. Create a cvs user group to facilitate the management of cvs users
Groupadd cvs
3. Create the cvsroot user and directory of the cvs Group
Useradd-g cvs-G cvs-d/home/cvsroot
4. Add a password for the cvsroot user
Passwd cvsroot
5. Change the Directory attribute of/home/cvsroot.
Chmod 775/home/cvsroot
6. initialize the source code library of cvs. This operation generates the directory/home/cvsroot/CVSROOT, which contains some initialization files.
Cvs-d/home/cvsroot init
7. Create a user and password that can log on to the cvs service. The passwd file must be created.
Vi/home/cvsroot/CVSROOT/passwd
The file content is as follows:
Weiqiongxxxxx: cvsroot
Chenxuxxxxx: cvsroot
This file indicates that weiqiong and chenxu users can log on to the cvs server. After logon, their permissions are granted to the user cvsroot.
Note: cvs users and server users can be different.
8. xxxxxx is the password generated by the following files:
Vi/home/cvsroot/passwdgen. pl
File Content:
#! /Usr/bin/perl
Srand (time ());
My $ randletter = "(int (rand (26) + (int (rand (1) +. 5) % 2? 65: 97 ))";
My $ salt = sprintf ("% c", eval $ randletter, eval $ randletter );
My $ plaintext = shift;
My $ crypttext = crypt ($ plaintext, $ salt );
Print "$ {crypttext} \ n ";
9. If you need a password of some, enter:
Passwdgen. pl "some"
Press enter to obtain the encrypted password and replace xxxxxx in the passwd file
10. Join the cvs Service (My redhath7.3 has the cvs service by default, so do not add it)
Vi/etc/services
Cvspserver 2401/tcp # pserver cvs service
Cvspserver 2401/udp # pserver cvs service
11. the cvs service is aroused by inted. Therefore, you need to modify the service provided by inetd. If your redhat is in the inetd mode, then in the file/etc/inetd. add the following content to the conf file: cvspserver stream tcp nowait root/usr/bin/cvs -- allow-root =/home/cvsroot pserver
My redhat7.3 uses the xinetd method, so add the services to be started in the xinetd. d directory:
Cd/etc/xinetd. d
Vi cvspserver
File Content:
Service cvspserver
{
Disable = no
Flags = REUSE
Socket_type = stream
Wait = no
User = root
Server =/usr/bin/cvs
Server_args =-f -- allow-root =/home/cvsroot pserver
Log_on_failure + = USERID
}
12. Restart inetd or xinetd:
/Etc/rc. d/init. d/xinetd restart
13. Check whether the cvspserver service has been started.
Netstat-l | grep cvspserver
The following results should be returned:
Tcp 0 0 *: cvspserver *: * LISTEN
14. Trial:
Cvs-d: pserver: weiqiong@202.204.114.37:/home/cvsroot login
Press the Enter command and press enter to enter the weiqiong password. You can enter the password according to your own password. If no error message is displayed, the password is successful (my machine IP address is 202.204.114.37, you can also use localhost)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.