glfs/server/other/cvsserver/cvsserver-inst.xml
Larry Lawrence 65df9fca7b grammar corrections
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2252 af4574ff-66df-0310-9fd7-8a98e5e911e0
2004-06-03 02:41:04 +00:00

104 lines
4.8 KiB
XML

<sect2>
<title>Setting up a <acronym>CVS</acronym> server.</title>
<para>A <acronym>CVS</acronym> server will be set up using OpenSSH
as the remote access method. Other access methods, including :pserver: and
:server: will not be used for write access to the <acronym>CVS</acronym>
repository. The :pserver: method sends clear text passwords over the network
and the :server: method is not supported in all <acronym>CVS</acronym> ports.
Instructions for anonymous, read only <acronym>CVS</acronym> access using
:pserver: can be found at the end of this section.</para>
<para>Configuration of the <acronym>CVS</acronym> server consists of four
steps:</para>
<sect3><title>1. Create a repository.</title>
<para>Create a new <acronym>CVS</acronym> repository with the following
commands:</para>
<screen><userinput><command>mkdir /home/cvsroot &amp;&amp;
chmod 1777 /home/cvsroot &amp;&amp;
export CVSROOT=/home//cvsroot &amp;&amp;
cvs init</command></userinput></screen></sect3>
<sect3><title>2. Import source code into the repository.</title>
<para>Import a source module into the repository with the following
commands, issued from a user account on the same machine as the
<acronym>CVS</acronym> repository:</para>
<screen><userinput><command>export CVSROOT=/home/cvsroot &amp;&amp;
cd <replaceable>[sourcedir]</replaceable> &amp;&amp;
cvs import -m <replaceable>["repository test"] [cvstest] [vendortag] [releasetag]</replaceable></command></userinput></screen></sect3>
<sect3><title>3. Verify local repository access.</title>
<para>Test access to the <acronym>CVS</acronym> repository from the same user
account with the following command:</para>
<screen><userinput><command>cvs co cvstest</command></userinput></screen></sect3>
<sect3><title>4. Verify remote repository access.</title>
<para>Test access to the <acronym>CVS</acronym> repository from a remote
machine using a user account that has <command>ssh</command> access to the
<acronym>CVS</acronym> server with the following commands:</para>
<note><para>Replace <replaceable>[servername]</replaceable> with the
<acronym>IP</acronym> address or host name of the <acronym>CVS</acronym>
repository machine. You will be prompted for the user's shell account password
before <acronym>CVS</acronym> checkout can continue.</para></note>
<screen><userinput><command>export CVS_RSH=/usr/bin/ssh &amp;&amp;
cvs -d:ext:<replaceable>[servername]</replaceable>:/cvsroot co cvstest</command></userinput></screen></sect3>
</sect2>
<sect2>
<title>Configuring <acronym>CVS</acronym> for anonymous read only access.</title>
<para><acronym>CVS</acronym> can be set up to allow anonymous read only access
using the :pserver: method by logging on as root and executing the following
commands:</para>
<screen><userinput><command>(grep anonymous /etc/passwd || useradd anonymous -s /bin/false) &amp;&amp;
echo anonymous: &gt; /home/cvsroot/CVSROOT/passwd &amp;&amp;
echo anonymous &gt; /home/cvsroot/CVSROOT/readers</command></userinput></screen>
<para>If you use <command>inetd</command>, the following command will add the
pserver entry to <filename>/etc/inetd.conf</filename>:</para>
<screen><userinput><command>echo "2401 stream tcp nowait root /usr/bin/cvs cvs -f \
--allow-root=/home/cvsroot pserver" &gt;&gt; /etc/inetd.conf</command></userinput></screen>
<para>Issue a <command>killall -HUP inetd</command> to reread the changed
<filename>inetd.conf</filename> file.</para>
<para>If you use <command>xinetd</command>, the following command will add the
pserver entry to <filename>/etc/xinetd.conf</filename>:</para>
<screen><userinput><command>cat &gt;&gt; /etc/xinetd.conf &lt;&lt; "EOF"</command>
service cvspserver
{
port = 2401
socket_type = stream
protocol = tcp
wait = no
user = root
passenv = PATH
server = /usr/bin/cvs
server_args = -f --allow-root=/home/cvsroot pserver
}
<command>EOF</command></userinput></screen>
<para>Issue a <command>/etc/rc.d/init.d/xinetd reload</command> to reread the changed
<filename>xinetd.conf</filename> file.</para>
<para>Testing anonymous access to the new repository requires an account
on another machine that can reach the <acronym>CVS</acronym> server via
network. No account on the <acronym>CVS</acronym> repository is needed. To
test anonymous access to the <acronym>CVS</acronym> repository, log in to
another machine as an unprivileged user and execute the following command:
</para>
<screen><userinput><command>cvs -d:pserver:anonymous@<replaceable>[servername]</replaceable>:/home/cvsroot co cvstest</command></userinput></screen>
<note><para>Replace <replaceable>[servername]</replaceable> with the <acronym>IP</acronym> address or
hostname of the <acronym>CVS</acronym> server</para></note>
</sect2>