source: server/other/cvsserver/cvsserver-inst.xml@ a94f11b

10.0 10.1 11.0 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 ken/refactor-virt krejzi/svn lazarus nosym perl-modules qt5new systemd-11177 systemd-13485 trunk v5_1 v5_1-pre1 xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since a94f11b was a94f11b, checked in by Billy O 'Connor <billyoc@…>, 18 years ago

Correct xinetd restart instructions.

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

  • Property mode set to 100644
File size: 4.7 KB
Line 
1<sect2>
2<title>Setting up a <acronym>CVS</acronym> server.</title>
3
4<para>We will discuss setting up a <acronym>CVS</acronym> server using OpenSSH
5as the remote access method. Other access methods, including :pserver: and
6:server: will not be used for write access to the <acronym>CVS</acronym>
7repository. The :pserver: method sends clear text passwords over the network
8and the :server: method is not supported in all <acronym>CVS</acronym> ports.
9Instructions for anonymous, read only <acronym>CVS</acronym> access using
10:pserver: can be found at the end of this section.</para>
11
12<para>Configuration of our <acronym>CVS</acronym> server consists of four
13steps:</para>
14
15<sect3><title>1. Create a repository.</title>
16<para>Create a new <acronym>CVS</acronym> repository with the following
17commands, logged in as root:</para>
18<screen><userinput><command>mkdir /cvsroot &amp;&amp;
19chmod 1777 /cvsroot &amp;&amp;
20export CVSROOT=/cvsroot &amp;&amp;
21cvs init</command></userinput></screen></sect3>
22
23<sect3><title>2. Import source code into the repository.</title>
24<para>Import a source module into the repository with the following
25commands, issued from a user account on the same machine as the
26<acronym>CVS</acronym> repository:</para>
27
28<screen><userinput><command>export CVSROOT=/cvsroot &amp;&amp;
29cd sourcedir &amp;&amp;
30cvs import -m "repository test" cvstest vendortag releasetag</command></userinput></screen></sect3>
31
32<sect3><title>3. Verify local repository access.</title>
33<para>Test access to the <acronym>CVS</acronym> repository from the same user
34account with the following command:</para>
35
36<screen><userinput><command>cvs co cvstest</command></userinput></screen></sect3>
37
38<sect3><title>4. Verify remote repository access.</title>
39<para>Test access to the <acronym>CVS</acronym> repository from a remote
40machine using a user account that has <command>ssh</command> access to the
41<acronym>CVS</acronym> server with the following commands:</para>
42<note><para>Replace <replaceable>[servername]</replaceable> with the
43<acronym>IP</acronym> address or host name of the <acronym>CVS</acronym>
44repository machine. You will be prompted for the user's shell account password
45before <acronym>CVS</acronym> checkout can continue.</para></note>
46
47
48<screen><userinput><command>export CVS_RSH=/usr/bin/ssh &amp;&amp;
49cvs -d:ext:<replaceable>[servername]</replaceable>:/cvsroot co cvstest</command></userinput></screen></sect3>
50</sect2>
51<sect2>
52<title>Configuring <acronym>CVS</acronym> for anonymous read only access.</title>
53
54<para><acronym>CVS</acronym> can be set up to allow anonymous read only access
55using the :pserver: method by logging on as root and executing the following
56commands:</para>
57
58<screen><userinput><command>(grep anonymous /etc/passwd || useradd anonymous -s /bin/false) &amp;&amp;
59echo anonymous: &gt; /cvsroot/CVSROOT/passwd &amp;&amp;
60echo anonymous &gt; /cvsroot/CVSROOT/readers</command></userinput></screen>
61
62<para>If you use <command>inetd</command>, the following command will add the
63pserver entry to <filename>/etc/inetd.conf</filename>:</para>
64
65<screen><userinput><command>echo "2401 stream tcp nowait root /usr/bin/cvs cvs -f \
66 --allow-root=/cvsroot pserver" &gt;&gt; /etc/inetd.conf</command></userinput></screen>
67
68<para>Issue a <command>killall -HUP inetd</command> to reread the changed
69<filename>inetd.conf</filename> file.</para>
70
71<para>If you use <command>xinetd</command>, the following command will add the
72pserver entry to <filename>/etc/xinetd.conf</filename>:</para>
73
74<screen><userinput><command>cat &gt;&gt; /etc/xinetd.conf &lt;&lt; "EOF"</command>
75 service cvspserver
76 {
77 port = 2401
78 socket_type = stream
79 protocol = tcp
80 wait = no
81 user = root
82 passenv = PATH
83 server = /usr/bin/cvs
84 server_args = -f --allow-root=/cvsroot pserver
85 }
86<command>EOF</command></userinput></screen>
87<para>Issue a <command>/etc/rc.d/init.d/xinetd reload</command> to reread the changed
88<filename>xinetd.conf</filename> file.</para>
89
90<para>Testing anonymous access to the new repository requires an account
91on another machine that can reach the <acronym>CVS</acronym> server via
92network. No account on the <acronym>CVS</acronym> repository is needed. To
93test anonymous access to the <acronym>CVS</acronym> repository log in to
94another machine as an unprivileged user and execute the following command:
95</para>
96
97<screen><userinput><command>cvs -d:pserver:anonymous@<replaceable>[servername]</replaceable>:/cvsroot co cvstest</command></userinput></screen>
98<note><para>Replace <replaceable>[servername]</replaceable> with the <acronym>IP</acronym> address or
99hostname of the <acronym>CVS</acronym> server</para></note>
100
101</sect2>
102
103
Note: See TracBrowser for help on using the repository browser.