Changeset 59bfedf5


Ignore:
Timestamp:
05/18/2005 06:55:21 PM (19 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 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
Children:
6ad98e12
Parents:
66b825e0
Message:

Tagged cvsserver.xml

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/other/cvsserver.xml

    r66b825e0 r59bfedf5  
    88
    99<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
    22 a <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
    38 as the remote access method.  Other access methods, including :pserver: and
    39 :server: will not be used for write access to the <acronym>CVS</acronym>
    40 repository.  The :pserver: method sends clear text passwords over the network
    41 and the :server: method is not supported in all <acronym>CVS</acronym> ports. 
    42 Instructions 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
    46 steps:</para>
    47 
    48 <sect3><title>1. Create a repository.</title>
    49 <para>Create a new <acronym>CVS</acronym> repository with the following
    50 commands:</para>
    51 <screen><userinput><command>mkdir /srv/cvsroot &amp;&amp;
     10  <?dbhtml filename="cvsserver.html"?>
     11
     12  <sect1info>
     13    <othername>$LastChangedBy$</othername>
     14    <date>$Date$</date>
     15  </sect1info>
     16
     17  <title>Running a CVS Server</title>
     18
     19  <sect2 role="package">
     20    <title>Running a CVS Server</title>
     21
     22    <para>This section will describe how to set up, administer and secure
     23    a CVS server.</para>
     24
     25    <bridgehead renderas="sect3">CVS Server Dependencies</bridgehead>
     26
     27    <bridgehead renderas="sect4">Required</bridgehead>
     28    <para><xref linkend="cvs"/> and
     29    <xref linkend="openssh"/></para>
     30
     31  </sect2>
     32
     33  <sect2 role="configuration">
     34    <title>Setting up a CVS Server.</title>
     35
     36    <para>A CVS server will be set up using OpenSSH as the remote access
     37    method. Other access methods, including :pserver: and :server: will
     38    not be used for write access to the CVS repository. The :pserver:
     39    method sends clear text passwords over the network and the :server:
     40    method is not supported in all CVS ports. Instructions for anonymous,
     41    read only CVS access using :pserver: can be found at the end of this
     42    section.</para>
     43
     44    <para>Configuration of the CVS server consists of four
     45    steps:</para>
     46
     47    <sect3>
     48      <title>1. Create a Repository.</title>
     49
     50      <para>Create a new CVS repository with the following
     51      commands:</para>
     52
     53<screen role="root"><userinput>mkdir /srv/cvsroot &amp;&amp;
    5254chmod 1777 /srv/cvsroot &amp;&amp;
    5355export CVSROOT=/srv/cvsroot &amp;&amp;
    54 cvs 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
    58 commands, 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;
    62 cvs 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
    66 account 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
    72 machine 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>
    76 repository machine.  You will be prompted for the user's shell account password
    77 before <acronym>CVS</acronym> checkout can continue.</para></note>
    78 
    79 
    80 <screen><userinput><command>export CVS_RSH=/usr/bin/ssh &amp;&amp;
    81 cvs -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
    88 using the :pserver: method by logging on as root and executing the following
    89 commands:</para>
    90 
    91 <screen><userinput><command>(grep anonymous /etc/passwd || useradd anonymous -s /bin/false) &amp;&amp;
     56cvs init</userinput></screen>
     57
     58    </sect3>
     59
     60    <sect3>
     61      <title>2. Import Source Code Into the Repository.</title>
     62
     63      <para>Import a source module into the repository with the following
     64      commands, issued from a user account on the same machine as the
     65      CVS repository:</para>
     66
     67<screen><userinput>cd <replaceable>[sourcedir]</replaceable> &amp;&amp;
     68cvs import -m "<replaceable>[repository test]</replaceable>" <replaceable>[cvstest]</replaceable> <replaceable>[vendortag]</replaceable> <replaceable>[releasetag]</replaceable></userinput></screen>
     69
     70    </sect3>
     71
     72    <sect3>
     73      <title>3. Verify Local Repository Access.</title>
     74
     75      <para>Test access to the CVS repository from the same user
     76      account with the following command:</para>
     77
     78<screen><userinput>cvs co cvstest</userinput></screen>
     79
     80    </sect3>
     81
     82    <sect3>
     83      <title>4. Verify Remote Repository Access.</title>
     84
     85      <para>Test access to the CVS repository from a remote machine using
     86      a user account that has <command>ssh</command> access to the CVS
     87      server with the following commands:</para>
     88
     89      <note>
     90        <para>Replace <replaceable>[servername]</replaceable> with the
     91        IP address or host name of the CVS repository machine. You will
     92        be prompted for the user's shell account password before CVS
     93        checkout can continue.</para>
     94      </note>
     95
     96<screen><userinput>export CVS_RSH=/usr/bin/ssh &amp;&amp;
     97cvs -d:ext:<replaceable>[servername]</replaceable>:/srv/cvsroot co cvstest</userinput></screen>
     98
     99    </sect3>
     100
     101  </sect2>
     102
     103  <sect2 id='cvsserver-config' role="configuration">
     104    <title>Configuring CVS for Anonymous Read Only Access.</title>
     105
     106    <para>CVS can be set up to allow anonymous read only access using the
     107    :pserver: method by logging on as <systemitem class="username">root</systemitem>
     108    and executing the following commands:</para>
     109
     110<screen role="root"><userinput>(grep anonymous /etc/passwd || useradd anonymous -s /bin/false) &amp;&amp;
    92111echo anonymous: &gt; /srv/cvsroot/CVSROOT/passwd &amp;&amp;
    93 echo 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
     112echo anonymous &gt; /srv/cvsroot/CVSROOT/readers</userinput></screen>
     113
     114    <para>If you use <command>inetd</command>, the following command
     115    will add the <application>CVS</application> entry to
     116    <filename>/etc/inetd.conf</filename>:</para>
     117
     118<screen role="root"><userinput>echo "2401  stream  tcp  nowait  root  /usr/bin/cvs cvs -f \
     119    --allow-root=/srv/cvsroot pserver" &gt;&gt; /etc/inetd.conf</userinput></screen>
     120
     121    <indexterm zone="cvsserver cvsserver-config">
     122      <primary sortas="e-etc-inetd.conf">/etc/inetd.conf</primary>
     123    </indexterm>
     124
     125    <para>Issue a <command>killall -HUP inetd</command> to reread the changed
     126    <filename>inetd.conf</filename> file.</para>
     127
     128    <para>If you use <command>xinetd</command>, the following command will create
     129    the CVS file as <filename>/etc/xinetd.d/cvspserver</filename>:</para>
     130
     131<screen role="root"><userinput>cat &gt;&gt; /etc/xinetd.d/cvspserver &lt;&lt; "EOF"
     132<literal># Begin /etc/xinetd.d/cvspserver
    113133
    114134     service cvspserver
     
    124144     }
    125145
    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
    137 on another machine that can reach the <acronym>CVS</acronym> server via
    138 network.  No account on the <acronym>CVS</acronym> repository is needed.  To
    139 test anonymous access to the <acronym>CVS</acronym> repository, log in to
    140 another 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>
    155 repository 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>
    164 repository.</para>
    165 
    166 <para><command>cvs import -m "repository test" cvstest vendortag
    167 releasetag</command>: All source code modules must be imported
    168 into the <acronym>CVS</acronym> repository before use, with the
    169 <command>cvs import</command> command.  The <userinput>-m</userinput>
    170 flags specifies an initial descriptive entry for the new module.
    171 The "cvstest" parameter is the name used for the module in all
    172 subsequent <command>cvs</command> commands.  The "vendortag" and "releasetag"
    173 parameters are used to further identify each <acronym>CVS</acronym> module and
    174 are 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
    178 create 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,
    182 which is unused for anything else in this configuration.</para>
    183 
    184 <para><command>echo anonymous &gt; /srv/cvsroot/CVSROOT/readers</command>: Add the
    185 anonymous user to the <acronym>CVS</acronym> readers file, a list of
    186 users 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  
     146# End /etc/xinetd.d/cvspserver</literal>
     147EOF</userinput></screen>
     148
     149    <indexterm zone="cvsserver cvsserver-config">
     150      <primary sortas="e-etc-xinetd.d-cvspserver">/etc/xinetd.d/cvspserver</primary>
     151    </indexterm>
     152
     153    <para>Issue a <command>/etc/rc.d/init.d/xinetd reload</command> to reread
     154    the changed <filename>xinetd.conf</filename> file.</para>
     155
     156    <para>Testing anonymous access to the new repository requires an account
     157    on another machine that can reach the CVS server via network. No account
     158    on the CVS repository is needed. To test anonymous access to the CVS
     159    repository, log in to another machine as an unprivileged user and execute
     160    the following command:</para>
     161
     162<screen><userinput>cvs -d:pserver:anonymous@<replaceable>[servername]</replaceable>:/srv/cvsroot co cvstest</userinput></screen>
     163
     164    <note>
     165      <para>Replace <replaceable>[servername]</replaceable> with the
     166      IP address or hostname of the CVS server.</para>
     167    </note>
     168
     169  </sect2>
     170
     171  <sect2 role="commands">
     172    <title>Command Explanations</title>
     173
     174    <para><command>mkdir /srv/cvsroot</command>: Create the CVS
     175    repository directory.</para>
     176
     177    <para><command>chmod 1777 /srv/cvsroot</command>: Set sticky bit
     178    permissions for <envar>CVSROOT</envar>.</para>
     179
     180    <para><command>export CVSROOT=/srv/cvsroot</command>: Specify new
     181    <envar>CVSROOT</envar> for all <command>cvs</command> commands.</para>
     182
     183    <para><command>cvs init</command>: Initialize the new CVS
     184    repository.</para>
     185
     186    <para><command>cvs import -m "repository test" cvstest vendortag
     187    releasetag</command>: All source code modules must be imported into the
     188    CVS repository before use, with the <command>cvs import</command> command.
     189    The <option>-m</option> flags specifies an initial descriptive entry for
     190    the new module. The <option>cvstest</option> parameter is the name used
     191    for the module in all subsequent <command>cvs</command> commands. The
     192    <option>vendortag</option> and <option>releasetag</option> parameters are
     193    used to further identify each CVS module and are mandatory whether used
     194    or not.</para>
     195
     196    <para><command>(grep anonymous /etc/passwd || useradd anonymous -s
     197    /bin/false)</command>: Check for an existing <systemitem
     198    class="username">anonymous</systemitem> user and create one if not
     199    found.</para>
     200
     201    <para><command>echo anonymous: &gt; /srv/cvsroot/CVSROOT/passwd</command>:
     202    Add the <systemitem class="username">anonymous</systemitem> user to the
     203    CVS passwd file, which is unused for anything else in this
     204    configuration.</para>
     205
     206    <para><command>echo anonymous &gt; /srv/cvsroot/CVSROOT/readers</command>:
     207    Add the <systemitem class="username">anonymous</systemitem> user to the
     208    CVS readers file, a list of users who have read only access to the
     209    repository.</para>
     210
     211  </sect2>
     212
     213  <sect2 role="content">
     214    <title>Contents</title>
     215
     216    <segmentedlist>
     217      <segtitle>Installed Programs</segtitle>
     218      <segtitle>Installed Libraries</segtitle>
     219      <segtitle>Installed Directories</segtitle>
     220
     221      <seglistitem>
     222        <seg>None</seg>
     223        <seg>None</seg>
     224        <seg>/srv/cvsroot</seg>
     225      </seglistitem>
     226    </segmentedlist>
     227
     228  </sect2>
     229
    206230</sect1>
Note: See TracChangeset for help on using the changeset viewer.