Changeset 42c74de
- Timestamp:
- 07/18/2004 06:31:59 PM (20 years ago)
- Branches:
- 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, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- d7c8734
- Parents:
- 2e35470
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
basicnet/netprogs/subversion.xml
r2e35470 r42c74de 44 44 <para> 45 45 <xref linkend="gdbm"/>, 46 <xref linkend="openssl"/>, 46 47 <xref linkend="openssh"/> and 47 48 <xref linkend="heimdal"/> or <xref linkend="mitkrb"/> … … 49 50 <sect4><title>Optional (server only)</title> 50 51 <para> 52 inetd or <xref linkend="xinetd" />, 51 53 <xref linkend="apache"/>, 54 <xref linkend="j2sdk"/>, 52 55 <xref linkend="Python"/>, 53 <xref linkend="j2sdk"/>,54 56 <ulink url="http://www.swig.org">SWIG</ulink> and 55 57 <ulink url="http://www.webdav.org/neon/">neon</ulink> -
general.ent
r2e35470 r42c74de 1 <!ENTITY day "1 7">1 <!ENTITY day "18"> 2 2 <!ENTITY month "07"> 3 3 <!ENTITY year "2004"> -
introduction/welcome/changelog.xml
r2e35470 r42c74de 19 19 <itemizedlist> 20 20 21 <listitem><para>July 18th, 2004 [dj]: Added svn server 22 instructions</para></listitem> 23 21 24 <listitem><para>July 15th, 2004 [igor]: Updated to 22 25 Firefox-0.9.2, Apache-2.0.50 and PostgreSQL-7.4.3.</para></listitem> -
server/other/svnserver.xml
r2e35470 r42c74de 13 13 <sect2> 14 14 <title>Running a Subversion Server</title> 15 16 <para>To be done...</para> 15 <para>This section will describe how to set up, administer and secure 16 a <application>Subversion</application> server. Since 17 <application>Subversion</application> is intended to replace 18 <acronym>CVS</acronym>, it may surprise you how very different the setup 19 of a <application>Subversion</application> repository is compared to a 20 <acronym>CVS</acronym> repository.</para> 21 22 <sect3><title><application>Subversion server</application> dependencies</title> 23 <sect4><title>Required</title> 24 <para><xref linkend="subversion"/> and <xref linkend="openssh"/></para></sect4> 25 </sect3> 17 26 18 27 </sect2> 19 28 29 <sect2> 30 <title>Setting up a <application>Subversion</application> server.</title> 31 32 <para>A <application>Subversion</application> server will be set up using 33 OpenSSH as the remote access method.</para> 34 35 <para>Configuration of the <application>Subversion</application> server 36 consists of the following steps:</para> 37 38 <sect3><title>1. Setup users, groups, and permissions</title> 39 <para>You'll need to be user root for the initial portion of 40 configuration. Create the svn user and group with the following 41 commands:</para> 42 43 <screen><userinput><command>groupadd svn && 44 useradd -c "SVN Owner" -d /home/svn -m -g svn -s /bin/false svn</command></userinput></screen> 45 46 <para>If you plan to have multiple repositories, you should have a 47 group dedicated to each repository for ease of administration. Create 48 the svntest group for our test repository and add the svn user to that 49 group with the following commands:</para> 50 51 <screen><userinput><command>groupadd svntest && 52 usermod -G svntest svn</command></userinput></screen> 53 54 <para>Additionally you should set umask '002' while working with a 55 repository so that all new files will be writable by owner and group. 56 We'll make this mandatory by writing a wrapper script for 57 <command>svn</command> and <command>svnserve</command>:</para> 58 59 <screen><userinput><command>mv /usr/bin/svn /usr/bin/svn.orig && 60 mv /usr/bin/svnserve /usr/bin/svnserve.orig && 61 cat >> /usr/bin/svn << "EOF" &&</command> 62 #!/bin/sh 63 umask 002 64 /usr/bin/svn.orig "$@" 65 <command>EOF 66 cat >> /usr/bin/svnserve << "EOF" &&</command> 67 #!/bin/sh 68 umask 002 69 /usr/bin/svnserve.orig "$@" 70 <command>EOF 71 chmod 0755 /usr/bin/svn{,serve}</command></userinput></screen> 72 73 <note>If you use <application>apache</application> for working with 74 the repository over the web, even for anonymous access, you should wrap 75 <application>apache</application> in a similar script.</note> 76 77 </sect3> 78 79 <sect3><title>2. Create a <application>Subversion</application> 80 repository.</title> 81 <para>Create a new <application>Subversion</application> repository with 82 the following commands:</para> 83 <screen><userinput><command>install -d -m0755 /srv && 84 install -d -m0755 -o svn -g svn /srv/svn/repositories && 85 svnadmin create /srv/svn/repositories/svntest</command></userinput></screen> 86 87 <para>Now that the repository is created, we need to populate it with 88 something useful. You'll need to have a predefined directory layout 89 setup exactly as you want your repository to look. For example, here 90 is a sample BLFS layout setup with a root of <filename>svntest/</filename>. 91 You'll need to setup a directory tree similar to the following:</para> 92 93 <screen> svntest/ # The name of the repository 94 trunk/ # Contains the existing source tree 95 BOOK/ 96 bootscripts/ 97 edguide/ 98 patches/ 99 scripts/ 100 branches/ # Needed for additional branches 101 tags/ # Needed for tagging release points</screen> 102 103 <para>Once you've created your directory layout as above, you are ready to 104 do the initial import:</para> 105 106 <screen><userinput><command>svn import -m "Initial import." \ 107 <replaceable>[/path/to/source/tree]</replaceable> \ 108 file:///srv/svn/repositories/svntest</command></userinput></screen> 109 110 <para>Now go ahead and change owner and group information on the 111 repository, add your normal user to the svn and svntest groups:</para> 112 113 <screen><userinput><command>chown -R svn:svntest /srv/svn/repositories/svntest && 114 chmod -R g+w /srv/svn/repositories/svntest && 115 chmod g+s /srv/svn/repositories/svntest/db && 116 usermod -G svn,svntest,<replaceable>[insert existing groups]</replaceable> <replaceable>[username]</replaceable></command></userinput></screen> 117 118 <para>svntest is the group assigned to the svntest repository. As 119 mentioned earlier, this eases administration of multiple repositories. 120 Going forward, you'll need to add your regular user, and any additional 121 users that you wish to have write access to the repository, to the svn and 122 svntest groups.</para> 123 124 <para>In addition, you'll notice that the new repository's 125 <filename>db</filename> directory is set-groupID. If the reasoning is 126 not immediately obvious, when using any external authentication method 127 (such as ssh), the sticky bit is set so that all new files will be owned 128 by the user, but group of svntest. Anyone in the svntest group can 129 create files, but still give the entire group write access to those 130 files. This avoids locking out other users from the repository.</para> 131 132 <para>Now, go ahead and return to your normal user account, and take a look at 133 your new repository using svnlook:</para> 134 135 <screen><userinput><command>svnlook tree /srv/svn/repositories/svntest/</command></userinput></screen> 136 137 <note>You may need to logout and back in again to refresh your group 138 memberships. 'su <replaceable>[username]</replaceable>' should work 139 around this as well. </note> 140 141 </sect3> 142 143 <sect3><title>3. Configure the server</title> 144 145 <para>These instructions will configure the server to use only ssh 146 for write permission, and provide anonymous read-only permission. There 147 are several other ways to provide access to the repository. These 148 additional configurations are best explained at 149 <ulink url="http://svnbook.red-bean.com/" />.</para> 150 151 <para>Access configuration needs to be done for each repository. Create 152 the <filename>svnserve.conf</filename> file for the svntest repository 153 using the following commands:</para> 154 155 <screen><userinput><command>cp /srv/svn/repositories/svntest/conf/svnserve.conf \ 156 /srv/svn/repositories/svntest/conf/svnserve.conf.default && 157 cat > /srv/svn/repositories/svntest/conf/svnserve.conf << "EOF"</command> 158 [general] 159 anon-access = read 160 auth-access = write 161 <command>EOF</command></userinput></screen> 162 163 <para>There is not a lot to the configuration file at all. You'll notice 164 that only the general section is required. Take a look at the 165 <filename>svnserve.conf.default</filename> for information on using 166 <command>svnserve</command>'s built-in authentication method.</para> 167 168 </sect3> 169 170 <sect3><title>4. Starting the server</title> 171 <para>There are a couple of ways to start <command>svnserve</command>. The 172 most common way is to start it as an <application>inetd</application> or 173 <application>xinetd</application> process. Alternately, you can use a 174 bootscript to start the service at startup.</para> 175 176 <para>If you use <application>inetd</application>, add a line to your 177 <filename>/etc/inetd.conf</filename> using the following commands:</para> 178 179 <screen><userinput><command>cat >> /etc/inetd.conf << "EOF"</command> 180 svn stream tcp nowait svn /usr/bin/svnserve svnserve -i 181 <command>EOF</command></userinput></screen> 182 183 <para>If you use <application>xinetd</application>, add the following 184 lines to <filename>/etc/xinetd.conf</filename> file:</para> 185 186 <screen><userinput><command>cat >> /etc/xinetd.conf << "EOF"</command> 187 service svn 188 { 189 port = 3690 190 socket_type = stream 191 protocol = tcp 192 wait = no 193 user = svn 194 server = /usr/bin/svnserve 195 server_args = -i -r /srv/svn/repositories 196 } 197 <command>EOF</command></userinput></screen> 198 199 <para>Finally, if you wish to simply start the sever in daemon mode at 200 startup, install the svn bootscript included in the 201 <xref linkend="intro-important-bootscripts"/> package.</para> 202 203 <screen><userinput><command>make install-svn</command></userinput></screen> 204 205 </sect3> 206 207 </sect2> 208 20 209 </sect1> 21 210
Note:
See TracChangeset
for help on using the changeset viewer.