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

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 v1_0 v5_0 v5_0-pre1 v5_1 v5_1-pre1 xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since ca2217b was ca2217b, checked in by Larry Lawrence <larry@…>, 19 years ago

basicnet, server, content, x

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

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