The CVS server is successfully configured and tested.

Source: Internet
Author: User
Tags server installation and configuration
Article Title: The CVS server is successfully configured and tested. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source. I. Server installation and configuration

(1) install CVS
Usually, CVS is installed when the operating system is installed. Here, the root user (sudo for other users) can run the following command:
Debian :~ # Whereis cvs
Cvs: /usr/bin/cvs/usr/X11R6/bin/cvs/usr/bin/X11/cvs/usr/share/man/man1/cvs.1.gz/usr/share/man/man5 /cvs.5.gz
This indicates that CVS has been installed in my system, usually under/usr/bin.
If the system has not installed CVS, you can use
Debian :~ # Apt-get install cvs

For a different version, download the source code package (.tar.gz) and install it step by step. The main steps are decompression, configure, make, and make install.

Another reminder is that CVSD has to be installed in some previous articles. I googled it and learned that CVSD is a CVS auxiliary tool. It can be more convenient to configure CVS. It doesn't matter if you don't install it, so we can directly configure CVS, and manual of the original CVS also said that the installed CVS itself is the server and client, it mainly depends on how to configure CVS.

The following describes the configuration of the CVS server segment.

(2) configuration of the CVS server

1. Create a cvs group and user
1) create a cvs Group
Debian :~ # Groupadd cvs

2) Create the HOME directory for the new user
Debian :~ # Mkdir/home/cvsroot

3) Add the new user cvsroot, add it to the cvs group, and specify its HOME directory.
Debian :~ # Useradd-g cvs-G cvs-d/home/cvsroot

4) set the password of the cvsroot user. Here I am: cvsroot
Debian :~ # Passwd cvsroot
Enter new UNIX password:
Retype new UNIX password:
Passwd: the password is successfully updated.

5) change the owner and group of the/home/cvsroot/directory and its sub-directories, because the directory is located under the root user, and its owner and group are both root, here we want to change its owner to cvsroot and its Group to cvs to ensure that users in the cvs group have the corresponding permissions on the directory.
Debian :~ # Chown-R cvsroot. cvs/home/cvsroot/

6) change the/home/cvsroot Directory attribute to ensure that other users in the same cvsroot group (cvs group) have the read and write permissions. We will add users to the cvs group later.
Debian :~ # Chmod-R 775/home/cvsroot/

2. Switch to the cvsroot user and create a repository

1) Switch users
Debian ~ # Su cvsroot

2) set the global variable CVSROOT to specify the directory where the repository is located.
Debian:/root $ export CVSROOT =/home/cvsroot/

3) create a repository
Debian:/root $ cvs init

3. Submit source code
1) enter the directory where the code is located, that is, the source code directory you want to control by using CVS. Here I am/home/usbprj/. The files in the directory include:
Debian:/root $ cd/home/usrprj/
Debian:/home/usbprj $ ls
Makefile Module. symvers test. c usb-skeleton.c

Load cvs import-m "[repository test]" [cvstest] [vendortag] [releasetag]
-Fill in the log Content in the quotation marks behind m, followed by the source code Module name, followed by the loader, and finally the identifier. Here I am:
Debian:/home/usbprj $ cvs import-m "Myproject" usbprj cvsroot start
N usbprj/Makefile
N usbprj/test. c
N usbprj/Module. symvers
N usbprj/usb-skeleton.c
No conflicts created by this import


At this point, our source code is submitted, indicating that the module has been created. The directory is/home/cvsroot/usbprj/

[1] [2] [3] Next page

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.