CVS 서버

CVS는 버전 관리 시스템 입니다. 소스 파일의 이력을 기록하기 위하여 그것을 사용할 수 있습니다.

설치

터미널 프롬프트에서, cvs 를 설치하기 위하여 다음의 명령을 입력 합니다:

sudo apt-get install cvs

cvs 를 설치한 후에, cvs 서버를 시작하고 중지하려면 xinetd 를 설치하여야 합니다. 프롬프트에서, xinetd 를 설치하기 위하여 다음의 명령을 입력 합니다:

sudo apt-get install xinetd

설정

Once you install cvs, the repository will be automatically initialized. By default, the repository resides under the /var/lib/cvs directory. You can change this path by running following command:

cvs -d /your/new/cvs/repo init

Once the initial repository is set up, you can configure xinetd to start the CVS server. You can copy the following lines to the /etc/xinetd.d/cvspserver file.

service cvspserver
{
     port = 2401
     socket_type = stream
     protocol = tcp
     user = root
     wait = no
     type = UNLISTED
     server = /usr/bin/cvs
     server_args = -f --allow-root /var/lib/cvs pserver
     disable = no
}

[참고]

만약 기본 지정된 저장소 (/var/lib/cvs) 디렉토리를 변경하였다면 그 저장소를 편집하는 것을 확신 하십시오.

Once you have configured xinetd you can start the cvs server by running following command:

sudo /etc/init.d/xinetd start

다음의 명령을 수행하여 CVS 서버가 실행 중인 것을 확인할 수 있습니다:

sudo netstat -tap | grep cvs

이 명령을 실행할 때, 여러분은 다음 줄 또는 그와 유사한 것을 보아야 합니다:

tcp 0 0 *:cvspserver *:* LISTEN 

이제 여기서 여러분은 사용자를 더하고, 새로운 프로젝트를 더하며, 그 CVS 서버를 관리하는 것을 계속할 수 있습니다.

[주의]

CVS는 OS 설치와는 무관하게 사용자를 추가할 수 있습니다. 아마도 가장 쉬운 것은 CVS를 위하여 리눅스 사용자를 사용하는 것이지만, 이것은 가능한 보안의 문제를 가지고 있습니다. 자세한 것은 CVS 매뉴얼을 참조 하십시오.

프로젝트 더하기

This section explains how to add new project to the CVS repository. Create the directory and add necessary document and source files to the directory. Now, run the following command to add this project to CVS repository:

cd your/project
cvs -d :pserver:username@hostname.com:/var/lib/cvs import -m "Importing my project to CVS repository" . new_project start

[작은 정보]

You can use the CVSROOT environment variable to store the CVS root directory. Once you export the CVSROOT environment variable, you can avoid using -d option in the above cvs command.

The string new_project is a vendor tag, and start is a release tag. They serve no purpose in this context, but since CVS requires them, they must be present.

[주의]

새로운 프로젝트를 추가할 때, 여러분이 사용하는 CVS 사용자는 반드시 CVS 저장소 /var/lib/cvs) 의 쓰기 권한을 가져야 합니다. 기본 설정으로, src 그룹은 그 CVS 저장소로의 쓰기 권한을 가지고 있습니다. 그러므로, 여러분은 그 사용자를 이 그룹에 추가할 수 있고, 그런 후 그 사용자는 CVS 저장소 내의 프로젝트를 관리할 수 있습니다.