source: server/other/cvsserver.xml@ bdc769fc

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 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 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/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since bdc769fc was affc260, checked in by Igor Živković <igor@…>, 20 years ago

Changed location of the CVS repository as suggested by FHS 2.3.

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

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