1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml">
4
<head xmlns="http://www.w3.org/1999/xhtml">
5
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
<title xmlns="">CVS Server</title>
7
<link rel="stylesheet" href="../../libs/ubuntu-book.css" type="text/css" />
8
<link rel="start" href="index.html" title="Guia del servidor de l'Ubuntu" />
9
<link rel="up" href="version-control-system.html" title="Capítol 14. Version Control System" />
10
<link rel="prev" href="subversion.html" title="Subversion" />
11
<link rel="next" href="version-control-ref.html" title="References" />
12
<link rel="copyright" href="legal.html" title="Credits and License" />
16
<img id="topcap" alt="" src="https://help.ubuntu.com/htdocs/ubuntunew/img/cap-top.png" />
17
<div id="layout" class="container clear-block">
18
<script type="text/javascript">
19
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
20
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
22
<script type="text/javascript">
24
var pageTracker = _gat._getTracker("UA-889275-8");
25
pageTracker._trackPageview();
26
} catch(err) {}</script>
28
<div id="logo-floater">
30
<a href="http://ajuda.ubuntu.cat" title="Documentació de l'Ubuntu">
31
<img alt="Ubuntu" id="logo" src="https://help.ubuntu.com/htdocs/ubuntunew/img/logo.png" />
36
<a href="http://ajuda.ubuntu.cat/">
37
<img alt="Documentació oficial" src="https://help.ubuntu.com/htdocs/ubuntunew/img/help-about.png" />
38
<span>Documentació oficial</span>
44
<div class="breadcrumbs"><a href="http://ajuda.ubuntu.cat/">Documentació de l'Ubuntu</a> > <a href="http://ajuda.ubuntu.cat/8.10">Ubuntu 8.10</a> > <span class="breadcrumb-link"><a href="index.html">Guia del servidor de l'Ubuntu</a></span> > <span class="breadcrumb-link"><a href="version-control-system.html">Version Control System</a></span> > <span class="breadcrumb-node">CVS Server</span></div>
45
<div xmlns="http://www.w3.org/1999/xhtml" class="sect1" lang="ca" xml:lang="ca">
46
<div class="titlepage">
49
<h2 class="title" style="clear: both"><a id="cvs-server"></a>CVS Server</h2>
54
CVS is a version control system. You can use it to record the
55
history of source files.
57
<div class="sect2" lang="ca" xml:lang="ca">
58
<div class="titlepage">
61
<h3 class="title"><a id="cvs-installation"></a>Instal·lació</h3>
66
At a terminal prompt, enter the following command to install
67
<span class="application"><strong>cvs</strong></span>:
71
<span class="command"><strong>sudo apt-get install cvs</strong></span>
75
After you install <span class="application"><strong>cvs</strong></span>, you should install
76
<span class="application"><strong>xinetd</strong></span> to start/stop the cvs server. At the
77
prompt, enter the following command to install
78
<span class="application"><strong>xinetd</strong></span>:
82
<span class="command"><strong>sudo apt-get install xinetd</strong></span>
87
<div class="sect2" lang="ca" xml:lang="ca">
88
<div class="titlepage">
91
<h3 class="title"><a id="cvs-configuration"></a>Configuration</h3>
96
Once you install cvs, the repository will be automatically
97
initialized. By default, the repository resides under the
98
<span class="application"><strong>/var/lib/cvs</strong></span> directory. You can
99
change this path by running following command:
103
<span class="command"><strong>cvs -d /your/new/cvs/repo init</strong></span>
107
Once the initial repository is set up, you can configure
108
<span class="application"><strong>xinetd</strong></span> to start the CVS server.
109
You can copy the following lines to the <code class="filename">
110
/etc/xinetd.d/cvspserver</code> file.
113
<pre class="programlisting">
122
server = /usr/bin/cvs
123
server_args = -f --allow-root /var/lib/cvs pserver
130
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
131
<table border="0" summary="Note">
133
<td rowspan="2" align="center" valign="top" width="25">
134
<img alt="[Nota]" src="../../libs/admon/note.png" />
136
<th align="left"></th>
139
<td align="left" valign="top">
141
Be sure to edit the repository if you have changed the default
142
repository (<span class="application"><strong>/var/lib/cvs</strong></span>) directory.
150
Once you have configured <span class="application"><strong>xinetd</strong></span> you
151
can start the cvs server by running following command:
155
<span class="command"><strong>sudo /etc/init.d/xinetd start</strong></span>
160
You can confirm that the CVS server is running by issuing
161
the following command:
166
<span class="command"><strong>sudo netstat -tap | grep cvs</strong></span>
171
When you run this command, you should see the following line
172
or something similar:
174
<pre class="programlisting">
175
tcp 0 0 *:cvspserver *:* LISTEN
178
From here you can continue to add users, add new projects,
179
and manage the CVS server.
181
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
182
<table border="0" summary="Warning">
184
<td rowspan="2" align="center" valign="top" width="25">
185
<img alt="[Avís]" src="../../libs/admon/warning.png" />
187
<th align="left"></th>
190
<td align="left" valign="top">
192
CVS allows the user to add users independently of the
193
underlying OS installation. Probably the easiest way is to use the Linux
194
Users for CVS, although it has potential security issues. Please refer
195
to the CVS manual for details.
202
<div class="sect2" lang="ca" xml:lang="ca">
203
<div class="titlepage">
206
<h3 class="title"><a id="cvs-add-projects"></a>Add Projects</h3>
211
This section explains how to add new project to the CVS
212
repository. Create the directory and add necessary document
213
and source files to the directory. Now, run the following
214
command to add this project to CVS repository:
217
<span class="command"><strong>cd your/project</strong></span>
218
<span class="command"><strong>cvs -d :pserver:username@hostname.com:/var/lib/cvs import -m "Importing my project to CVS repository" . new_project start</strong></span>
223
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
224
<table border="0" summary="Tip">
226
<td rowspan="2" align="center" valign="top" width="25">
227
<img alt="[Suggeriment]" src="../../libs/admon/tip.png" />
229
<th align="left"></th>
232
<td align="left" valign="top">
234
You can use the CVSROOT environment variable to store the CVS root directory.
235
Once you export the CVSROOT environment variable, you can avoid using -d option in the
243
The string <span class="emphasis"><em>new_project</em></span> is a vendor
244
tag, and <span class="emphasis"><em>start</em></span> is a release tag.
245
They serve no purpose in this context, but since CVS requires them, they
249
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
250
<table border="0" summary="Warning">
252
<td rowspan="2" align="center" valign="top" width="25">
253
<img alt="[Avís]" src="../../libs/admon/warning.png" />
255
<th align="left"></th>
258
<td align="left" valign="top">
260
When you add a new project, the CVS user you use must have write access to the
261
CVS repository (<span class="application"><strong>/var/lib/cvs</strong></span>). By default, the
262
<span class="application"><strong>src</strong></span> group has write access to the CVS
263
repository. So, you can add the user to this group, and he can then add and
264
manage projects in the CVS repository.
275
<div xmlns="http://www.w3.org/1999/xhtml" class="navfooter">
277
<table width="100%" summary="Navigation footer">
279
<td width="40%" align="left"><a accesskey="p" href="subversion.html"><img src="../../libs/navig/prev.png" alt="Anterior" /></a> </td>
280
<td width="20%" align="center">
281
<a accesskey="u" href="version-control-system.html">
282
<img src="../../libs/navig/up.png" alt="Pujar" />
285
<td width="40%" align="right"> <a accesskey="n" href="version-control-ref.html"><img src="../../libs/navig/next.png" alt="Següent" /></a></td>
288
<td width="40%" align="left" valign="top">Subversion </td>
289
<td width="20%" align="center">
290
<a accesskey="h" href="index.html">
291
<img src="../../libs/navig/home.png" alt="Inici" />
294
<td width="40%" align="right" valign="top"> References</td>
300
<div id="ubuntulinks">
301
<p>Aquest material es troba sota una llicència lliure, vegeu <a href="/legal.html">això</a> per a més detalls
306
<img src="https://help.ubuntu.com/htdocs/ubuntunew/img/cap-bottom.png" alt="" />