~ubuntu.cat/ubuntaires/ajuda

« back to all changes in this revision

Viewing changes to web/8.10/serverguide/cvs-server.html

  • Committer: Arnau Alcázar Lleopart
  • Date: 2009-07-17 11:09:35 UTC
  • Revision ID: arnau@alcalleop.net-20090717110935-gnslz4lobcm7wj8y
Afegit la traducció de la intrepid

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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" />
 
13
  </head>
 
14
  <body>
 
15
    <div id="round">
 
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"));
 
21
</script>
 
22
        <script type="text/javascript">
 
23
try {
 
24
var pageTracker = _gat._getTracker("UA-889275-8");
 
25
pageTracker._trackPageview();
 
26
} catch(err) {}</script>
 
27
        <div id="header">
 
28
          <div id="logo-floater">
 
29
            <h1>
 
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" />
 
32
              </a>
 
33
            </h1>
 
34
          </div>
 
35
          <div id="sitename">
 
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>
 
39
            </a>
 
40
          </div>
 
41
        </div>
 
42
        <div id="page">
 
43
          <div id="content">
 
44
            <div class="breadcrumbs"><a href="http://ajuda.ubuntu.cat/">Documentació de l'Ubuntu</a> &gt; <a href="http://ajuda.ubuntu.cat/8.10">Ubuntu 8.10</a> &gt; <span class="breadcrumb-link"><a href="index.html">Guia del servidor de l'Ubuntu</a></span> &gt; <span class="breadcrumb-link"><a href="version-control-system.html">Version Control System</a></span> &gt; <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">
 
47
                <div>
 
48
                  <div>
 
49
                    <h2 class="title" style="clear: both"><a id="cvs-server"></a>CVS Server</h2>
 
50
                  </div>
 
51
                </div>
 
52
              </div>
 
53
              <p>
 
54
          CVS is a version control system. You can use it to record the
 
55
          history of source files.
 
56
          </p>
 
57
              <div class="sect2" lang="ca" xml:lang="ca">
 
58
                <div class="titlepage">
 
59
                  <div>
 
60
                    <div>
 
61
                      <h3 class="title"><a id="cvs-installation"></a>Instal·lació</h3>
 
62
                    </div>
 
63
                  </div>
 
64
                </div>
 
65
                <p>
 
66
              At a terminal prompt, enter the following command to install
 
67
              <span class="application"><strong>cvs</strong></span>:
 
68
 
 
69
</p>
 
70
                <pre class="screen">
 
71
<span class="command"><strong>sudo apt-get install cvs</strong></span>
 
72
</pre>
 
73
                <p>
 
74
 
 
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>:
 
79
 
 
80
</p>
 
81
                <pre class="screen">
 
82
<span class="command"><strong>sudo apt-get install xinetd</strong></span>
 
83
</pre>
 
84
                <p>
 
85
            </p>
 
86
              </div>
 
87
              <div class="sect2" lang="ca" xml:lang="ca">
 
88
                <div class="titlepage">
 
89
                  <div>
 
90
                    <div>
 
91
                      <h3 class="title"><a id="cvs-configuration"></a>Configuration</h3>
 
92
                    </div>
 
93
                  </div>
 
94
                </div>
 
95
                <p>
 
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:
 
100
 
 
101
</p>
 
102
                <pre class="screen">
 
103
<span class="command"><strong>cvs -d /your/new/cvs/repo init</strong></span>
 
104
</pre>
 
105
                <p>
 
106
 
 
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.
 
111
 
 
112
</p>
 
113
                <pre class="programlisting">
 
114
service cvspserver
 
115
{
 
116
     port = 2401
 
117
     socket_type = stream
 
118
     protocol = tcp
 
119
     user = root
 
120
     wait = no
 
121
     type = UNLISTED
 
122
     server = /usr/bin/cvs
 
123
     server_args = -f --allow-root /var/lib/cvs pserver
 
124
     disable = no
 
125
}
 
126
</pre>
 
127
                <p>
 
128
 
 
129
</p>
 
130
                <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
 
131
                  <table border="0" summary="Note">
 
132
                    <tr>
 
133
                      <td rowspan="2" align="center" valign="top" width="25">
 
134
                        <img alt="[Nota]" src="../../libs/admon/note.png" />
 
135
                      </td>
 
136
                      <th align="left"></th>
 
137
                    </tr>
 
138
                    <tr>
 
139
                      <td align="left" valign="top">
 
140
                        <p>
 
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.
 
143
</p>
 
144
                      </td>
 
145
                    </tr>
 
146
                  </table>
 
147
                </div>
 
148
                <p>
 
149
 
 
150
Once you have configured <span class="application"><strong>xinetd</strong></span> you 
 
151
can start the cvs server by running following command:
 
152
 
 
153
</p>
 
154
                <pre class="screen">
 
155
<span class="command"><strong>sudo /etc/init.d/xinetd start</strong></span>
 
156
</pre>
 
157
                <p>
 
158
            </p>
 
159
                <p>
 
160
            You can confirm that the CVS server is running by issuing 
 
161
                        the following command:
 
162
            </p>
 
163
                <p>
 
164
</p>
 
165
                <pre class="screen">
 
166
<span class="command"><strong>sudo netstat -tap | grep cvs</strong></span>
 
167
</pre>
 
168
                <p>
 
169
            </p>
 
170
                <p>
 
171
            When you run this command, you should see the following line
 
172
            or something similar:
 
173
            </p>
 
174
                <pre class="programlisting">
 
175
tcp        0      0 *:cvspserver            *:* LISTEN 
 
176
</pre>
 
177
                <p>
 
178
From here you can continue to add users, add new projects,
 
179
and manage the CVS server. 
 
180
        </p>
 
181
                <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
182
                  <table border="0" summary="Warning">
 
183
                    <tr>
 
184
                      <td rowspan="2" align="center" valign="top" width="25">
 
185
                        <img alt="[Avís]" src="../../libs/admon/warning.png" />
 
186
                      </td>
 
187
                      <th align="left"></th>
 
188
                    </tr>
 
189
                    <tr>
 
190
                      <td align="left" valign="top">
 
191
                        <p>
 
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.
 
196
</p>
 
197
                      </td>
 
198
                    </tr>
 
199
                  </table>
 
200
                </div>
 
201
              </div>
 
202
              <div class="sect2" lang="ca" xml:lang="ca">
 
203
                <div class="titlepage">
 
204
                  <div>
 
205
                    <div>
 
206
                      <h3 class="title"><a id="cvs-add-projects"></a>Add Projects</h3>
 
207
                    </div>
 
208
                  </div>
 
209
                </div>
 
210
                <p>
 
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:
 
215
</p>
 
216
                <pre class="screen">
 
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>
 
219
</pre>
 
220
                <p>
 
221
 
 
222
</p>
 
223
                <div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
 
224
                  <table border="0" summary="Tip">
 
225
                    <tr>
 
226
                      <td rowspan="2" align="center" valign="top" width="25">
 
227
                        <img alt="[Suggeriment]" src="../../libs/admon/tip.png" />
 
228
                      </td>
 
229
                      <th align="left"></th>
 
230
                    </tr>
 
231
                    <tr>
 
232
                      <td align="left" valign="top">
 
233
                        <p>
 
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
 
236
above cvs command.
 
237
</p>
 
238
                      </td>
 
239
                    </tr>
 
240
                  </table>
 
241
                </div>
 
242
                <p>
 
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
 
246
must be present.
 
247
 
 
248
</p>
 
249
                <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
250
                  <table border="0" summary="Warning">
 
251
                    <tr>
 
252
                      <td rowspan="2" align="center" valign="top" width="25">
 
253
                        <img alt="[Avís]" src="../../libs/admon/warning.png" />
 
254
                      </td>
 
255
                      <th align="left"></th>
 
256
                    </tr>
 
257
                    <tr>
 
258
                      <td align="left" valign="top">
 
259
                        <p>
 
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.
 
265
</p>
 
266
                      </td>
 
267
                    </tr>
 
268
                  </table>
 
269
                </div>
 
270
                <p>
 
271
            </p>
 
272
              </div>
 
273
            </div>
 
274
          </div>
 
275
          <div xmlns="http://www.w3.org/1999/xhtml" class="navfooter">
 
276
            <hr />
 
277
            <table width="100%" summary="Navigation footer">
 
278
              <tr>
 
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" />
 
283
                  </a>
 
284
                </td>
 
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>
 
286
              </tr>
 
287
              <tr>
 
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" />
 
292
                  </a>
 
293
                </td>
 
294
                <td width="40%" align="right" valign="top"> References</td>
 
295
              </tr>
 
296
            </table>
 
297
          </div>
 
298
          <hr />
 
299
          <div id="footer">
 
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
 
302
        </p>
 
303
            </div>
 
304
          </div>
 
305
          <div id="bottomcap">
 
306
            <img src="https://help.ubuntu.com/htdocs/ubuntunew/img/cap-bottom.png" alt="" />
 
307
          </div>
 
308
        </div>
 
309
      </div>
 
310
    </div>
 
311
  </body>
 
312
</html>