- Timestamp:
- 10/20/2004 12:03:12 AM (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:
- e16d90ee
- Parents:
- 84e42bc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/other/svnserver.xml
r84e42bc r01d5424 22 22 <sect3><title><application>Subversion server</application> dependencies</title> 23 23 <sect4><title>Required</title> 24 <para><xref linkend="subversion"/> and <xref linkend="openssh"/></para></sect4> 24 <para><xref linkend="subversion"/> and <xref linkend="openssh"/></para> 25 </sect4> 25 26 </sect3> 26 27 … … 38 39 consists of the following steps:</para> 39 40 40 <sect3><title>1. 41 <sect3><title>1. Setup users, groups, and permissions</title> 41 42 <para>You'll need to be user root for the initial portion of 42 configuration. 43 configuration. Create the svn user and group with the following 43 44 commands:</para> 44 45 … … 47 48 48 49 <para>If you plan to have multiple repositories, you should have a 49 group dedicated to each repository for ease of administration. Create50 the svntest group for ourtest repository and add the svn user to that50 group dedicated to each repository for ease of administration. Create 51 the svntest group for the test repository and add the svn user to that 51 52 group with the following commands:</para> 52 53 … … 54 55 usermod -G svntest svn</command></userinput></screen> 55 56 56 <para>Additionally you should set umask '002' while working with a57 repository so that all new files will be writable by owner and group.58 We'll make this mandatory by writing a wrapper script for57 <para>Additionally you should set <command>umask 002</command> while working 58 with a repository so that all new files will be writable by owner and group. 59 This is made mandatory by creating a wrapper script for 59 60 <command>svn</command> and <command>svnserve</command>:</para> 60 61 … … 73 74 chmod 0755 /usr/bin/svn{,serve}</command></userinput></screen> 74 75 75 <note><para>If you use <application>apache</application> for working with 76 the repository over http, even for anonymous access, you should wrap 77 <application>apache</application> in a similar script.</para></note> 78 79 </sect3> 80 81 <sect3><title>2. Create a <application>Subversion</application> 76 <note><para>If you use <application>Apache</application> for working with 77 the repository over <acronym>HTTP</acronym>, even for anonymous access, you 78 should wrap <command>/usr/sbin/httpd</command> in a similar 79 script.</para></note> 80 81 </sect3> 82 83 <sect3><title>2. Create a <application>Subversion</application> 82 84 repository.</title> 83 85 <para>Create a new <application>Subversion</application> repository with 84 86 the following commands:</para> 87 85 88 <screen><userinput><command>install -d -m0755 /srv && 86 89 install -d -m0755 -o svn -g svn /srv/svn/repositories && … … 88 91 89 92 <para>Now that the repository is created, we need to populate it with 90 something useful. 91 setup exactly as you want your repository to look. 93 something useful. You'll need to have a predefined directory layout 94 setup exactly as you want your repository to look. For example, here 92 95 is a sample BLFS layout setup with a root of <filename>svntest/</filename>. 93 96 You'll need to setup a directory tree similar to the following:</para> … … 103 106 tags/ # Needed for tagging release points</screen> 104 107 105 <para>Once you've created your directory layout as above, you are ready to106 do the initial import:</para>108 <para>Once you've created your directory layout as shown above, you are ready 109 to do the initial import:</para> 107 110 108 111 <screen><userinput><command>svn import -m "Initial import." \ … … 118 121 usermod -G svn,svntest,<replaceable>[insert existing groups]</replaceable> <replaceable>[username]</replaceable></command></userinput></screen> 119 122 120 <para>svntest is the group assigned to the svntest repository. 123 <para>svntest is the group assigned to the svntest repository. As 121 124 mentioned earlier, this eases administration of multiple repositories 122 when using <application>OpenSSH</application> for authentication. 125 when using <application>OpenSSH</application> for authentication. Going 123 126 forward, you'll need to add your regular user, and any additional users 124 127 that you wish to have write access to the repository, to the svn and … … 126 129 127 130 <para>In addition, you'll notice that the new repository's 128 <filename>db</filename> directory is set-groupID. 131 <filename>db</filename> directory is set-groupID. If the reasoning is 129 132 not immediately obvious, when using any external authentication method 130 (such as ssh), the sticky bit is set so that all new files will be owned131 by the user, but group of svntest. Anyone in the svntest group can132 c reate files, but still give the entire group write access to those133 files. 133 (such as <command>ssh</command>), the sticky bit is set so that all new files 134 will be owned by the user, but group of svntest. Anyone in the svntest group 135 can create files, but still give the entire group write access to those 136 files. This avoids locking out other users from the repository.</para> 134 137 135 138 <para>Now, go ahead and return to your normal user account, and take a look at … … 138 141 <screen><userinput><command>svnlook tree /srv/svn/repositories/svntest/</command></userinput></screen> 139 142 140 <note><para>You may need to log out and back in again to refresh your group141 memberships. 143 <note><para>You may need to log out and back in again to refresh your group 144 memberships. '<command>su <replaceable>[username]</replaceable></command>' 142 145 should work around this as well.</para></note> 143 146 144 147 </sect3> 145 148 146 <sect3><title>3. 149 <sect3><title>3. Configure the server</title> 147 150 148 151 <para>As mentioned previously, these instructions will configure the 149 server to use only ssh for write access to the repository and to provide 150 anonymous access using <command>svnserve</command>. There are several other 151 ways to provide access to the repository. These additional configurations 152 are best explained at <ulink url="http://svnbook.red-bean.com/" />.</para> 153 154 <para>Access configuration needs to be done for each repository. Create 152 server to use only <command>ssh</command> for write access to the repository 153 and to provide anonymous access using <command>svnserve</command>. There are 154 several other ways to provide access to the repository. These additional 155 configurations are best explained at 156 <ulink url="http://svnbook.red-bean.com/"/>.</para> 157 158 <para>Access configuration needs to be done for each repository. Create 155 159 the <filename>svnserve.conf</filename> file for the svntest repository 156 160 using the following commands:</para> … … 164 168 <command>EOF</command></userinput></screen> 165 169 166 <para>There is not a lot to the configuration file at all. 167 that only the general section is required. 168 <filename>svnserve.conf.default</filename> f or information on using170 <para>There is not a lot to the configuration file at all. You'll notice 171 that only the general section is required. Take a look at the 172 <filename>svnserve.conf.default</filename> file for information on using 169 173 <command>svnserve</command>'s built-in authentication method.</para> 170 174 171 175 </sect3> 172 176 173 <sect3><title>4. 174 <para>There are a couple of ways to start <command>svnserve</command>. The175 most common way is to start it as an < application>inetd</application> or176 < application>xinetd</application> process. Alternately, you can use a177 <sect3><title>4. Starting the server</title> 178 <para>There are a couple of ways to start <command>svnserve</command>. The 179 most common way is to start it as an <command>inetd</command> or 180 <command>xinetd</command> process. Alternately, you can use a 177 181 bootscript to start the service at startup.</para> 178 182 … … 182 186 <command>svnserve</command>.</para></note> 183 187 184 <para>If you use < application>inetd</application>, add a line to your188 <para>If you use <command>inetd</command>, add a line to 185 189 <filename>/etc/inetd.conf</filename> using the following commands:</para> 186 190 … … 189 193 <command>EOF</command></userinput></screen> 190 194 191 <para>If you use < application>xinetd</application>, add the following192 lines to <filename>/etc/xinetd.conf</filename> file:</para>195 <para>If you use <command>xinetd</command>, add the following 196 lines to the <filename>/etc/xinetd.conf</filename> file:</para> 193 197 194 198 <screen><userinput><command>cat >> /etc/xinetd.conf << "EOF"</command>
Note:
See TracChangeset
for help on using the changeset viewer.