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

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 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 v1_0 v5_0 v5_0-pre1 v5_1 v5_1-pre1 xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since a338b48 was dcc89bf1, checked in by Larry Lawrence <larry@…>, 22 years ago

added cvs server

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

  • Property mode set to 100644
File size: 3.9 KB
RevLine 
[dcc89bf1]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>
18mkdir /cvsroot &amp;&amp;
19chmod 1777 /cvsroot &amp;&amp;
20export CVSROOT=/cvsroot
21cvs init</userinput></screen></para></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 CVS
26repository:</para>
27
28<para><screen><userinput>
29export CVSROOT=/cvsroot &amp;&amp;
30cd sourcedir &amp;&amp;
31cvs import -m "repository test" cvstest vendortag releasetag
32</userinput></screen></para></sect3>
33
34<sect3><title>3. Verify local repository access.</title>
35<para>Test access to the CVS repository from the same user account
36with the following command:</para>
37
38<para><screen><userinput>
39cvs co cvstest
40</userinput></screen></para></sect3>
41
42<sect3><title>4. Verify remote repository access.</title>
43<para>Test access to the CVS repository from a remote machine using a
44user account that has ssh access to the CVS server with the following
45commands:
46<note><para>Replace "servername" with the IP address or host name
47ofthe CVS repository machine. You will be prompted for the user's
48shellaccount password before CVS checkout can
49continue.</para></note></para>
50
51
52<para><screen><userinput>
53export CVS_RSH=/usr/bin/ssh &amp;&amp;
54cvs -d:ext:servername:/cvsroot co cvstest
55</userinput></screen></para></sect3>
56</sect2>
57<sect2>
58<title>Configuring CVS for anonymous read only access.</title>
59
60<para>CVS can be set up to allow anonymous read only access using the
61:pserver: method by logging on as root and executing the following
62commands:</para>
63
64<para><screen><userinput>
65(grep anonymous /etc/passwd || useradd anonymous -s /bin/false) &amp;&amp;
66echo anonymous: > /cvsroot/CVSROOT/passwd &amp;&amp;
67echo anonymous > /cvsroot/CVSROOT/readers
68</userinput></screen></para>
69
70<para>If you use inetd, the following command will add the pserver
71entry to /etc/inetd.conf:</para>
72
73<para><screen><userinput>
74echo "2401 stream tcp nowait root /usr/bin/cvs cvs -f \
75 --allow-root=/cvsroot pserver" &gt;&gt; /etc/inetd.conf
76</userinput></screen></para>
77
78<para>Issue a killall -HUP inetd to reread the changed inetd.conf
79file.</para>
80
81<para>If you use xinetd, the following command will add the pserver
82entry to /etc/xinetd.conf:</para>
83
84<para><screen><userinput>
85cat &gt;&gt; /etc/xinetd.conf &lt;&lt; "EOF"
86 service cvspserver
87 {
88 port = 2401
89 socket_type = stream
90 protocol = tcp
91 wait = no
92 user = root
93 passenv = PATH
94 server = /usr/bin/cvs
95 server_args = -f --allow-root=/cvsroot pserver
96 }
97EOF
98</userinput></screen></para>
99<para>Issue a killall -HUP xinetd to reread the changed xinetd.conf
100file.</para>
101
102<para>Testing anonymous access to the new repository requires an account
103on another machine that can reach the CVS server via network. No
104account on the CVS repository is needed. To test anonymous access to
105the CVS repository log in to another machine as an unprivileged user
106and execute the following command:</para>
107
108<para><screen><userinput>
109cvs -d:pserver:anonymous@servername:/cvsroot co cvstest
110</userinput></screen><note><para>Replace "servername" with the IP
111address or hostname of the CVS server</para></note></para>
112
113</sect2>
114
115
Note: See TracBrowser for help on using the repository browser.