Server CVS
CVS è un sistema di controllo della versione che è possibile utilizzare per registrare i cambiamenti al codice sorgente di un programma.
Installazione
Per installare CVS, eseguire il seguente comando in un terminale:
sudo apt-get install cvs
sudo apt-get install xinetd
Configurazione
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
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.
sudo /etc/init.d/xinetd restart
Per avere la conferma che il server CVS è in esecuzione, digitare il seguente comando:
sudo netstat -tap | grep cvs
L'output del comando precedente dovrebbe essere:
tcp 0 0 *:cvspserver *:* LISTEN
A questo punto è possibile aggiungere altri utenti, nuovi progetti e gestire il server CVS.
CVS consente di aggiungere nuovi utenti indipendentemente dal sistema operativo. Il modo più semplice è utilizzare l'utente Linux per CVS, benché presenti dei problemi di sicurezza. Per maggiori informazioni, consultare il manuale di CVS.
Aggiungere progetti
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
È possibile utilizzare la variabile d'ambiente CVSROOT per memorizzare la directory root di CVS. Una volta esportata, si può evitare di utilizzare l'opzione "-d" nel comando precedente.
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.