Configure the CVS-Linux Release Technology-Debian Information On Debian. See the following for details. I read some books, wrote a few Reading Notes, and remembered that the previous writing was scattered everywhere. It was a waste of work. I suddenly remembered that the CVS used in this time could solve this problem, and there was just a spare machine around me. Let's start with him.
Google is really good. After searching for Debian CVS, many articles are published. The following is a record of the process.
Server:
1. As he said, check whether CVS is installed first.
Whereis cvs
No, install
Sudo apt-get install cvs
CVSD is mentioned here. This is an auxiliary tool of cvs. Currently, it is a cainiao and is not necessary for use. Continue.
2. Create a cvs user, a main directory, and a cvs user group.
Sudo groupadd cvs
Sudo mkdir/home/cvsroot
Sudo useradd-g cvs-G cvs-d/home/cvsroot
Sudo passwd cvsroot
3. Change the file owner and access permissions.
Chown-R cvsroot. cvs/home/cvsroot
Chmod-R 775/home/cvsroot
4. Switch to the cvsroot user
Su cvsroot
Set the global variable CVSROOT
Export CVSROOT =/home/cvsroot
Initialize the cvs Repository
Cvs init
5. Create a user management file to log on to cvs
Touch/home/cvsroot/CVSROOT/passwd
Vim/home/cvsroot/CVSROOT/passwd
Enter the content in the following format:
Username: password: cvsroot
The password is generated by the following perl script passwdgen. pl.
#! /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 ";
Run perl passwdgeg. pl yourpasswd
Then, the encrypted string is output and filled with the corresponding position in the above passwd file.
6. Set the start time to check whether the cvspserver option in/etc/services is enabled. If not, cancel #
Create a cvspserver file and switch users
Cd/etc/xinetd. d/
Here I found that I do not have the xinetd. d directory. Because xinetd. d is not installed, install it first.
Sudo apt-get install xinetd
Then go to the preceding directory
Sudo touch cvspserver
Vim cvspserver
Enter the following content
Service cvspserver
{
Disable = no
Socket_type = stream
Wait = no
User = root
Server =/usr/bin/cvs
Server_args =-f -- allow-root =/home/cvsroot pserver
Log_on_success + = USERID
Log_on_failure + = USERID
}
Note that there must be spaces at both ends of the first "=" line in each line, and each option must be written in the top grid.
Here, username and cvsserveraddress are replaced with their own settings. The system will prompt you to enter the password
Enter the password. If login is not displayed successfully, check whether the cvspserver of the server segment has been started and whether the user name and password match. Note that the encrypted string is saved in the passwd file.
2. upload files
Go to the Code directory that you want cvs to manage and run
Here are several options-d: specify the name of the connected cvs server. import indicates that the operation is the import file, and the option after-m is the log Content, Module name, and loader, identifier (For details, refer to the document)
Then begin submission. The submission is complete.
I have encountered a problem here, that is, the empty directory will be ignored, and they are what I want to upload. It is estimated that this item should exist in the import option, and it is not clear yet.
3. Retrieve the file
Go to the directory of the file you want to save from the server, and run the checkout command as follows:
Here, dirname is the name of the project you have determined or the name of the directory where the files are stored.
If it succeeds, everything is OK.
4. permission management
You can create two files, readers and writers, under CVSROOT. Write a username for each row in the file. Users in readers have read-only permissions, and users in writers have read and write permissions.
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.