source: server/other/cvsserver.xml@ d5c9dbfb

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gimp3 gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since d5c9dbfb was d5c9dbfb, checked in by Bruce Dubbs <bdubbs@…>, 20 years ago

Fix tagging for cvsserver

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3619 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 8.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7]>
8
9<sect1 id="cvsserver" xreflabel="Running a CVS Server">
10<sect1info>
11 <othername>$LastChangedBy$</othername>
12 <date>$Date$</date>
13</sect1info>
14
15<?dbhtml filename="cvsserver.html"?>
16<title>Running a CVS server</title>
17
18<sect2>
19<title>Running a <acronym>CVS</acronym> server</title>
20
21<para>This section will describe how to set up, administer and secure
22a <acronym>CVS</acronym> server.</para>
23
24<sect3>
25<title><application>CVS server</application> dependencies</title>
26
27<sect4>
28<title>Required</title>
29 <para><xref linkend="cvs"/> and <xref linkend="openssh"/></para></sect4>
30</sect3>
31
32</sect2>
33
34<sect2>
35<title>Setting up a <acronym>CVS</acronym> server.</title>
36
37<para>A <acronym>CVS</acronym> server will be set up using OpenSSH
38as the remote access method. Other access methods, including :pserver: and
39:server: will not be used for write access to the <acronym>CVS</acronym>
40repository. The :pserver: method sends clear text passwords over the network
41and the :server: method is not supported in all <acronym>CVS</acronym> ports.
42Instructions for anonymous, read only <acronym>CVS</acronym> access using
43:pserver: can be found at the end of this section.</para>
44
45<para>Configuration of the <acronym>CVS</acronym> server consists of four
46steps:</para>
47
48<sect3><title>1. Create a repository.</title>
49<para>Create a new <acronym>CVS</acronym> repository with the following
50commands:</para>
51<screen><userinput><command>mkdir /srv/cvsroot &amp;&amp;
52chmod 1777 /srv/cvsroot &amp;&amp;
53export CVSROOT=/srv/cvsroot &amp;&amp;
54cvs init</command></userinput></screen></sect3>
55
56<sect3><title>2. Import source code into the repository.</title>
57<para>Import a source module into the repository with the following
58commands, issued from a user account on the same machine as the
59<acronym>CVS</acronym> repository:</para>
60
61<screen><userinput><command>cd <replaceable>[sourcedir]</replaceable> &amp;&amp;
62cvs import -m "<replaceable>[repository test]</replaceable>" <replaceable>[cvstest]</replaceable> <replaceable>[vendortag]</replaceable> <replaceable>[releasetag]</replaceable></command></userinput></screen></sect3>
63
64<sect3><title>3. Verify local repository access.</title>
65<para>Test access to the <acronym>CVS</acronym> repository from the same user
66account with the following command:</para>
67
68<screen><userinput><command>cvs co cvstest</command></userinput></screen></sect3>
69
70<sect3><title>4. Verify remote repository access.</title>
71<para>Test access to the <acronym>CVS</acronym> repository from a remote
72machine using a user account that has <command>ssh</command> access to the
73<acronym>CVS</acronym> server with the following commands:</para>
74<note><para>Replace <replaceable>[servername]</replaceable> with the
75<acronym>IP</acronym> address or host name of the <acronym>CVS</acronym>
76repository machine. You will be prompted for the user's shell account password
77before <acronym>CVS</acronym> checkout can continue.</para></note>
78
79
80<screen><userinput><command>export CVS_RSH=/usr/bin/ssh &amp;&amp;
81cvs -d:ext:<replaceable>[servername]</replaceable>:/srv/cvsroot co cvstest</command></userinput></screen></sect3>
82</sect2>
83
84<sect2 id='cvsserver-config'>
85<title>Configuring <acronym>CVS</acronym> for anonymous read only access.</title>
86
87<para><acronym>CVS</acronym> can be set up to allow anonymous read only access
88using the :pserver: method by logging on as root and executing the following
89commands:</para>
90
91<screen><userinput><command>(grep anonymous /etc/passwd || useradd anonymous -s /bin/false) &amp;&amp;
92echo anonymous: &gt; /srv/cvsroot/CVSROOT/passwd &amp;&amp;
93echo anonymous &gt; /srv/cvsroot/CVSROOT/readers</command></userinput></screen>
94
95<para>If you use <command>inetd</command>, the following command will add the
96<application><acronym>CVS</acronym></application> entry to <filename>/etc/inetd.conf</filename>:</para>
97
98<screen><userinput><command>echo "2401 stream tcp nowait root /usr/bin/cvs cvs -f \
99 --allow-root=/srv/cvsroot pserver" &gt;&gt; /etc/inetd.conf</command></userinput></screen>
100
101 <indexterm zone="cvsserver cvsserver-config">
102 <primary sortas="e-etc-inetd.conf">/etc/inetd.conf</primary>
103 </indexterm>
104
105<para>Issue a <command>killall -HUP inetd</command> to reread the changed
106<filename>inetd.conf</filename> file.</para>
107
108<para>If you use <command>xinetd</command>, the following command will create the
109<acronym>CVS</acronym> file as <filename>/etc/xinetd.d/cvspserver</filename>:</para>
110
111<screen><userinput><command>cat &gt;&gt; /etc/xinetd.d/cvspserver &lt;&lt; "EOF"</command>
112# Begin /etc/xinetd.d/cvspserver
113
114 service cvspserver
115 {
116 port = 2401
117 socket_type = stream
118 protocol = tcp
119 wait = no
120 user = root
121 passenv = PATH
122 server = /usr/bin/cvs
123 server_args = -f --allow-root=/srv/cvsroot pserver
124 }
125
126# End /etc/xinetd.d/cvspserver
127<command>EOF</command></userinput></screen>
128
129 <indexterm zone="cvsserver cvsserver-config">
130 <primary sortas="e-etc-xinetd.d-cvspserver">/etc/xinetd.d/cvspserver</primary>
131 </indexterm>
132
133<para>Issue a <command>/etc/rc.d/init.d/xinetd reload</command> to reread the changed
134<filename>xinetd.conf</filename> file.</para>
135
136<para>Testing anonymous access to the new repository requires an account
137on another machine that can reach the <acronym>CVS</acronym> server via
138network. No account on the <acronym>CVS</acronym> repository is needed. To
139test anonymous access to the <acronym>CVS</acronym> repository, log in to
140another machine as an unprivileged user and execute the following command:
141</para>
142
143<screen><userinput><command>cvs -d:pserver:anonymous@<replaceable>[servername]</replaceable>:/srv/cvsroot co cvstest</command></userinput></screen>
144
145<note><para>Replace <replaceable>[servername]</replaceable> with the
146<acronym>IP</acronym> address or hostname of the
147<acronym>CVS</acronym> server.</para></note>
148
149</sect2>
150
151<sect2>
152<title>Command explanations</title>
153
154<para><command>mkdir /srv/cvsroot</command>: Create the <acronym>CVS</acronym>
155repository directory.</para>
156
157<para><command>chmod 1777 /srv/cvsroot</command>: Set sticky bit permissions for
158<envar>CVSROOT</envar>.</para>
159
160<para><command>export CVSROOT=/srv/cvsroot</command>: Specify new <envar>CVSROOT
161</envar> for all <command>cvs</command> commands.</para>
162
163<para><command>cvs init</command>: Initialize the new <acronym>CVS</acronym>
164repository.</para>
165
166<para><command>cvs import -m "repository test" cvstest vendortag
167releasetag</command>: All source code modules must be imported
168into the <acronym>CVS</acronym> repository before use, with the
169<command>cvs import</command> command. The <userinput>-m</userinput>
170flags specifies an initial descriptive entry for the new module.
171The "cvstest" parameter is the name used for the module in all
172subsequent <command>cvs</command> commands. The "vendortag" and "releasetag"
173parameters are used to further identify each <acronym>CVS</acronym> module and
174are mandatory whether used or not.</para>
175
176<para><command>(grep anonymous /etc/passwd || useradd anonymous -s
177/bin/false)</command>: Check for an existing anonymous user and
178create one if not found.</para>
179
180<para><command>echo anonymous: &gt; /srv/cvsroot/CVSROOT/passwd
181</command>: Add the anonymous user to the <acronym>CVS</acronym> passwd file,
182which is unused for anything else in this configuration.</para>
183
184<para><command>echo anonymous &gt; /srv/cvsroot/CVSROOT/readers</command>: Add the
185anonymous user to the <acronym>CVS</acronym> readers file, a list of
186users who have read only access to the repository.</para>
187
188</sect2>
189
190<sect2>
191<title>Contents</title>
192
193<segmentedlist>
194 <segtitle>Installed Programs</segtitle>
195 <segtitle>Installed Libraries</segtitle>
196 <segtitle>Installed Directories</segtitle>
197
198 <seglistitem>
199 <seg>None</seg>
200 <seg>None</seg>
201 <seg>/srv/cvsroot</seg>
202 </seglistitem>
203</segmentedlist>
204</sect2>
205
206</sect1>
Note: See TracBrowser for help on using the repository browser.