Это старая версия документа.
Содержание
CVS сервер
CVS - это система контроля версий. Вы можете использовать ее для записи истории ваших исходных файлов.
Установка
Для установки CVS, выполните следующую команду в терминале:
sudo apt-get install cvs
После установки cvs вам придется установить xinetd для запуска/остановки cvs сервера. В командной строке выполните следующую команду для установки xinetd:
sudo apt-get install xinetd
Настройка
Once you install cvs, the repository will be automatically initialized. By default, the repository resides under the /srv/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 /srv/cvs pserver disable = no
}
Be sure to edit the repository if you have changed the default repository (/srv/cvs) directory. Once you have configured xinetd you can start the cvs server by running following command:
sudo /etc/init.d/xinetd restart
You can confirm that the CVS server is running by issuing the following command:
sudo netstat -tap | grep cvs
When you run this command, you should see the following line or something similar:
tcp 0 0 *:cvspserver *:* LISTEN
From here you can continue to add users, add new projects, and manage the CVS server.
CVS allows the user to add users independently of the underlying OS installation. Probably the easiest way is to use the Linux Users for CVS, although it has potential security issues. Please refer to the CVS manual for details.
Добавление проектов
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:/srv/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.
When you add a new project, the CVS user you use must have write access to the CVS repository (/srv/cvs). By default, the src group has write access to the CVS repository. So, you can add the user to this group, and he can then add and manage projects in the CVS repository.