mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-03 23:07:23 +08:00
Tagged cvsserver.xml
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@4356 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
parent
66b825e081
commit
59bfedf5e4
@ -7,109 +7,129 @@
|
|||||||
]>
|
]>
|
||||||
|
|
||||||
<sect1 id="cvsserver" xreflabel="Running a CVS Server">
|
<sect1 id="cvsserver" xreflabel="Running a CVS Server">
|
||||||
<sect1info>
|
<?dbhtml filename="cvsserver.html"?>
|
||||||
|
|
||||||
|
<sect1info>
|
||||||
<othername>$LastChangedBy$</othername>
|
<othername>$LastChangedBy$</othername>
|
||||||
<date>$Date$</date>
|
<date>$Date$</date>
|
||||||
</sect1info>
|
</sect1info>
|
||||||
|
|
||||||
<?dbhtml filename="cvsserver.html"?>
|
<title>Running a CVS Server</title>
|
||||||
<title>Running a CVS server</title>
|
|
||||||
|
|
||||||
<sect2>
|
<sect2 role="package">
|
||||||
<title>Running a <acronym>CVS</acronym> server</title>
|
<title>Running a CVS Server</title>
|
||||||
|
|
||||||
<para>This section will describe how to set up, administer and secure
|
<para>This section will describe how to set up, administer and secure
|
||||||
a <acronym>CVS</acronym> server.</para>
|
a CVS server.</para>
|
||||||
|
|
||||||
<sect3>
|
<bridgehead renderas="sect3">CVS Server Dependencies</bridgehead>
|
||||||
<title><application>CVS server</application> dependencies</title>
|
|
||||||
|
|
||||||
<sect4>
|
<bridgehead renderas="sect4">Required</bridgehead>
|
||||||
<title>Required</title>
|
<para><xref linkend="cvs"/> and
|
||||||
<para><xref linkend="cvs"/> and <xref linkend="openssh"/></para></sect4>
|
<xref linkend="openssh"/></para>
|
||||||
</sect3>
|
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2 role="configuration">
|
||||||
<title>Setting up a <acronym>CVS</acronym> server.</title>
|
<title>Setting up a CVS Server.</title>
|
||||||
|
|
||||||
<para>A <acronym>CVS</acronym> server will be set up using OpenSSH
|
<para>A CVS server will be set up using OpenSSH as the remote access
|
||||||
as the remote access method. Other access methods, including :pserver: and
|
method. Other access methods, including :pserver: and :server: will
|
||||||
:server: will not be used for write access to the <acronym>CVS</acronym>
|
not be used for write access to the CVS repository. The :pserver:
|
||||||
repository. The :pserver: method sends clear text passwords over the network
|
method sends clear text passwords over the network and the :server:
|
||||||
and the :server: method is not supported in all <acronym>CVS</acronym> ports.
|
method is not supported in all CVS ports. Instructions for anonymous,
|
||||||
Instructions for anonymous, read only <acronym>CVS</acronym> access using
|
read only CVS access using :pserver: can be found at the end of this
|
||||||
:pserver: can be found at the end of this section.</para>
|
section.</para>
|
||||||
|
|
||||||
<para>Configuration of the <acronym>CVS</acronym> server consists of four
|
<para>Configuration of the CVS server consists of four
|
||||||
steps:</para>
|
steps:</para>
|
||||||
|
|
||||||
<sect3><title>1. Create a repository.</title>
|
<sect3>
|
||||||
<para>Create a new <acronym>CVS</acronym> repository with the following
|
<title>1. Create a Repository.</title>
|
||||||
commands:</para>
|
|
||||||
<screen><userinput><command>mkdir /srv/cvsroot &&
|
<para>Create a new CVS repository with the following
|
||||||
|
commands:</para>
|
||||||
|
|
||||||
|
<screen role="root"><userinput>mkdir /srv/cvsroot &&
|
||||||
chmod 1777 /srv/cvsroot &&
|
chmod 1777 /srv/cvsroot &&
|
||||||
export CVSROOT=/srv/cvsroot &&
|
export CVSROOT=/srv/cvsroot &&
|
||||||
cvs init</command></userinput></screen></sect3>
|
cvs init</userinput></screen>
|
||||||
|
|
||||||
<sect3><title>2. Import source code into the repository.</title>
|
</sect3>
|
||||||
<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>cd <replaceable>[sourcedir]</replaceable> &&
|
<sect3>
|
||||||
cvs import -m "<replaceable>[repository test]</replaceable>" <replaceable>[cvstest]</replaceable> <replaceable>[vendortag]</replaceable> <replaceable>[releasetag]</replaceable></command></userinput></screen></sect3>
|
<title>2. Import Source Code Into the Repository.</title>
|
||||||
|
|
||||||
<sect3><title>3. Verify local repository access.</title>
|
<para>Import a source module into the repository with the following
|
||||||
<para>Test access to the <acronym>CVS</acronym> repository from the same user
|
commands, issued from a user account on the same machine as the
|
||||||
account with the following command:</para>
|
CVS repository:</para>
|
||||||
|
|
||||||
<screen><userinput><command>cvs co cvstest</command></userinput></screen></sect3>
|
<screen><userinput>cd <replaceable>[sourcedir]</replaceable> &&
|
||||||
|
cvs import -m "<replaceable>[repository test]</replaceable>" <replaceable>[cvstest]</replaceable> <replaceable>[vendortag]</replaceable> <replaceable>[releasetag]</replaceable></userinput></screen>
|
||||||
|
|
||||||
<sect3><title>4. Verify remote repository access.</title>
|
</sect3>
|
||||||
<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>
|
|
||||||
|
|
||||||
|
<sect3>
|
||||||
|
<title>3. Verify Local Repository Access.</title>
|
||||||
|
|
||||||
<screen><userinput><command>export CVS_RSH=/usr/bin/ssh &&
|
<para>Test access to the CVS repository from the same user
|
||||||
cvs -d:ext:<replaceable>[servername]</replaceable>:/srv/cvsroot co cvstest</command></userinput></screen></sect3>
|
account with the following command:</para>
|
||||||
</sect2>
|
|
||||||
|
|
||||||
<sect2 id='cvsserver-config'>
|
<screen><userinput>cvs co cvstest</userinput></screen>
|
||||||
<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
|
</sect3>
|
||||||
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) &&
|
<sect3>
|
||||||
|
<title>4. Verify Remote Repository Access.</title>
|
||||||
|
|
||||||
|
<para>Test access to the CVS repository from a remote machine using
|
||||||
|
a user account that has <command>ssh</command> access to the CVS
|
||||||
|
server with the following commands:</para>
|
||||||
|
|
||||||
|
<note>
|
||||||
|
<para>Replace <replaceable>[servername]</replaceable> with the
|
||||||
|
IP address or host name of the CVS repository machine. You will
|
||||||
|
be prompted for the user's shell account password before CVS
|
||||||
|
checkout can continue.</para>
|
||||||
|
</note>
|
||||||
|
|
||||||
|
<screen><userinput>export CVS_RSH=/usr/bin/ssh &&
|
||||||
|
cvs -d:ext:<replaceable>[servername]</replaceable>:/srv/cvsroot co cvstest</userinput></screen>
|
||||||
|
|
||||||
|
</sect3>
|
||||||
|
|
||||||
|
</sect2>
|
||||||
|
|
||||||
|
<sect2 id='cvsserver-config' role="configuration">
|
||||||
|
<title>Configuring CVS for Anonymous Read Only Access.</title>
|
||||||
|
|
||||||
|
<para>CVS can be set up to allow anonymous read only access using the
|
||||||
|
:pserver: method by logging on as <systemitem class="username">root</systemitem>
|
||||||
|
and executing the following commands:</para>
|
||||||
|
|
||||||
|
<screen role="root"><userinput>(grep anonymous /etc/passwd || useradd anonymous -s /bin/false) &&
|
||||||
echo anonymous: > /srv/cvsroot/CVSROOT/passwd &&
|
echo anonymous: > /srv/cvsroot/CVSROOT/passwd &&
|
||||||
echo anonymous > /srv/cvsroot/CVSROOT/readers</command></userinput></screen>
|
echo anonymous > /srv/cvsroot/CVSROOT/readers</userinput></screen>
|
||||||
|
|
||||||
<para>If you use <command>inetd</command>, the following command will add the
|
<para>If you use <command>inetd</command>, the following command
|
||||||
<application><acronym>CVS</acronym></application> entry to <filename>/etc/inetd.conf</filename>:</para>
|
will add the <application>CVS</application> entry to
|
||||||
|
<filename>/etc/inetd.conf</filename>:</para>
|
||||||
|
|
||||||
<screen><userinput><command>echo "2401 stream tcp nowait root /usr/bin/cvs cvs -f \
|
<screen role="root"><userinput>echo "2401 stream tcp nowait root /usr/bin/cvs cvs -f \
|
||||||
--allow-root=/srv/cvsroot pserver" >> /etc/inetd.conf</command></userinput></screen>
|
--allow-root=/srv/cvsroot pserver" >> /etc/inetd.conf</userinput></screen>
|
||||||
|
|
||||||
<indexterm zone="cvsserver cvsserver-config">
|
<indexterm zone="cvsserver cvsserver-config">
|
||||||
<primary sortas="e-etc-inetd.conf">/etc/inetd.conf</primary>
|
<primary sortas="e-etc-inetd.conf">/etc/inetd.conf</primary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
|
|
||||||
<para>Issue a <command>killall -HUP inetd</command> to reread the changed
|
<para>Issue a <command>killall -HUP inetd</command> to reread the changed
|
||||||
<filename>inetd.conf</filename> file.</para>
|
<filename>inetd.conf</filename> file.</para>
|
||||||
|
|
||||||
<para>If you use <command>xinetd</command>, the following command will create the
|
<para>If you use <command>xinetd</command>, the following command will create
|
||||||
<acronym>CVS</acronym> file as <filename>/etc/xinetd.d/cvspserver</filename>:</para>
|
the CVS file as <filename>/etc/xinetd.d/cvspserver</filename>:</para>
|
||||||
|
|
||||||
<screen><userinput><command>cat >> /etc/xinetd.d/cvspserver << "EOF"</command>
|
<screen role="root"><userinput>cat >> /etc/xinetd.d/cvspserver << "EOF"
|
||||||
# Begin /etc/xinetd.d/cvspserver
|
<literal># Begin /etc/xinetd.d/cvspserver
|
||||||
|
|
||||||
service cvspserver
|
service cvspserver
|
||||||
{
|
{
|
||||||
@ -123,74 +143,77 @@ echo anonymous > /srv/cvsroot/CVSROOT/readers</command></userinput></screen>
|
|||||||
server_args = -f --allow-root=/srv/cvsroot pserver
|
server_args = -f --allow-root=/srv/cvsroot pserver
|
||||||
}
|
}
|
||||||
|
|
||||||
# End /etc/xinetd.d/cvspserver
|
# End /etc/xinetd.d/cvspserver</literal>
|
||||||
<command>EOF</command></userinput></screen>
|
EOF</userinput></screen>
|
||||||
|
|
||||||
<indexterm zone="cvsserver cvsserver-config">
|
<indexterm zone="cvsserver cvsserver-config">
|
||||||
<primary sortas="e-etc-xinetd.d-cvspserver">/etc/xinetd.d/cvspserver</primary>
|
<primary sortas="e-etc-xinetd.d-cvspserver">/etc/xinetd.d/cvspserver</primary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
|
|
||||||
<para>Issue a <command>/etc/rc.d/init.d/xinetd reload</command> to reread the changed
|
<para>Issue a <command>/etc/rc.d/init.d/xinetd reload</command> to reread
|
||||||
<filename>xinetd.conf</filename> file.</para>
|
the changed <filename>xinetd.conf</filename> file.</para>
|
||||||
|
|
||||||
<para>Testing anonymous access to the new repository requires an account
|
<para>Testing anonymous access to the new repository requires an account
|
||||||
on another machine that can reach the <acronym>CVS</acronym> server via
|
on another machine that can reach the CVS server via network. No account
|
||||||
network. No account on the <acronym>CVS</acronym> repository is needed. To
|
on the CVS repository is needed. To test anonymous access to the CVS
|
||||||
test anonymous access to the <acronym>CVS</acronym> repository, log in to
|
repository, log in to another machine as an unprivileged user and execute
|
||||||
another machine as an unprivileged user and execute the following command:
|
the following command:</para>
|
||||||
</para>
|
|
||||||
|
|
||||||
<screen><userinput><command>cvs -d:pserver:anonymous@<replaceable>[servername]</replaceable>:/srv/cvsroot co cvstest</command></userinput></screen>
|
<screen><userinput>cvs -d:pserver:anonymous@<replaceable>[servername]</replaceable>:/srv/cvsroot co cvstest</userinput></screen>
|
||||||
|
|
||||||
<note><para>Replace <replaceable>[servername]</replaceable> with the
|
<note>
|
||||||
<acronym>IP</acronym> address or hostname of the
|
<para>Replace <replaceable>[servername]</replaceable> with the
|
||||||
<acronym>CVS</acronym> server.</para></note>
|
IP address or hostname of the CVS server.</para>
|
||||||
|
</note>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2 role="commands">
|
||||||
<title>Command explanations</title>
|
<title>Command Explanations</title>
|
||||||
|
|
||||||
<para><command>mkdir /srv/cvsroot</command>: Create the <acronym>CVS</acronym>
|
<para><command>mkdir /srv/cvsroot</command>: Create the CVS
|
||||||
repository directory.</para>
|
repository directory.</para>
|
||||||
|
|
||||||
<para><command>chmod 1777 /srv/cvsroot</command>: Set sticky bit permissions for
|
<para><command>chmod 1777 /srv/cvsroot</command>: Set sticky bit
|
||||||
<envar>CVSROOT</envar>.</para>
|
permissions for <envar>CVSROOT</envar>.</para>
|
||||||
|
|
||||||
<para><command>export CVSROOT=/srv/cvsroot</command>: Specify new <envar>CVSROOT
|
<para><command>export CVSROOT=/srv/cvsroot</command>: Specify new
|
||||||
</envar> for all <command>cvs</command> commands.</para>
|
<envar>CVSROOT</envar> for all <command>cvs</command> commands.</para>
|
||||||
|
|
||||||
<para><command>cvs init</command>: Initialize the new <acronym>CVS</acronym>
|
<para><command>cvs init</command>: Initialize the new CVS
|
||||||
repository.</para>
|
repository.</para>
|
||||||
|
|
||||||
<para><command>cvs import -m "repository test" cvstest vendortag
|
<para><command>cvs import -m "repository test" cvstest vendortag
|
||||||
releasetag</command>: All source code modules must be imported
|
releasetag</command>: All source code modules must be imported into the
|
||||||
into the <acronym>CVS</acronym> repository before use, with the
|
CVS repository before use, with the <command>cvs import</command> command.
|
||||||
<command>cvs import</command> command. The <userinput>-m</userinput>
|
The <option>-m</option> flags specifies an initial descriptive entry for
|
||||||
flags specifies an initial descriptive entry for the new module.
|
the new module. The <option>cvstest</option> parameter is the name used
|
||||||
The "cvstest" parameter is the name used for the module in all
|
for the module in all subsequent <command>cvs</command> commands. The
|
||||||
subsequent <command>cvs</command> commands. The "vendortag" and "releasetag"
|
<option>vendortag</option> and <option>releasetag</option> parameters are
|
||||||
parameters are used to further identify each <acronym>CVS</acronym> module and
|
used to further identify each CVS module and are mandatory whether used
|
||||||
are mandatory whether used or not.</para>
|
or not.</para>
|
||||||
|
|
||||||
<para><command>(grep anonymous /etc/passwd || useradd anonymous -s
|
<para><command>(grep anonymous /etc/passwd || useradd anonymous -s
|
||||||
/bin/false)</command>: Check for an existing anonymous user and
|
/bin/false)</command>: Check for an existing <systemitem
|
||||||
create one if not found.</para>
|
class="username">anonymous</systemitem> user and create one if not
|
||||||
|
found.</para>
|
||||||
|
|
||||||
<para><command>echo anonymous: > /srv/cvsroot/CVSROOT/passwd
|
<para><command>echo anonymous: > /srv/cvsroot/CVSROOT/passwd</command>:
|
||||||
</command>: Add the anonymous user to the <acronym>CVS</acronym> passwd file,
|
Add the <systemitem class="username">anonymous</systemitem> user to the
|
||||||
which is unused for anything else in this configuration.</para>
|
CVS passwd file, which is unused for anything else in this
|
||||||
|
configuration.</para>
|
||||||
|
|
||||||
<para><command>echo anonymous > /srv/cvsroot/CVSROOT/readers</command>: Add the
|
<para><command>echo anonymous > /srv/cvsroot/CVSROOT/readers</command>:
|
||||||
anonymous user to the <acronym>CVS</acronym> readers file, a list of
|
Add the <systemitem class="username">anonymous</systemitem> user to the
|
||||||
users who have read only access to the repository.</para>
|
CVS readers file, a list of users who have read only access to the
|
||||||
|
repository.</para>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2 role="content">
|
||||||
<title>Contents</title>
|
<title>Contents</title>
|
||||||
|
|
||||||
<segmentedlist>
|
<segmentedlist>
|
||||||
<segtitle>Installed Programs</segtitle>
|
<segtitle>Installed Programs</segtitle>
|
||||||
<segtitle>Installed Libraries</segtitle>
|
<segtitle>Installed Libraries</segtitle>
|
||||||
<segtitle>Installed Directories</segtitle>
|
<segtitle>Installed Directories</segtitle>
|
||||||
@ -200,7 +223,8 @@ users who have read only access to the repository.</para>
|
|||||||
<seg>None</seg>
|
<seg>None</seg>
|
||||||
<seg>/srv/cvsroot</seg>
|
<seg>/srv/cvsroot</seg>
|
||||||
</seglistitem>
|
</seglistitem>
|
||||||
</segmentedlist>
|
</segmentedlist>
|
||||||
</sect2>
|
|
||||||
|
</sect2>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
Loading…
Reference in New Issue
Block a user