##// END OF EJS Templates
docs: updated documentation for SVN 1.10 Wandisco repositories.
marcink -
r3225:64ac37fb default
parent child Browse files
Show More
@@ -1,200 +1,200 b''
1 1 .. _svn-http:
2 2
3 3 |svn| With Write Over HTTP
4 4 ^^^^^^^^^^^^^^^^^^^^^^^^^^
5 5
6 6 To use |svn| with read/write support over the |svn| HTTP protocol, you have to
7 7 configure the HTTP |svn| backend.
8 8
9 9 Prerequisites
10 10 =============
11 11
12 12 - Enable HTTP support inside the admin VCS settings on your |RCE| instance
13 13 - You need to install the following tools on the machine that is running an
14 14 instance of |RCE|:
15 15 ``Apache HTTP Server`` and ``mod_dav_svn``.
16 16
17 17
18 18 .. tip::
19 19
20 20 We recommend using Wandisco repositories which provide latest SVN versions
21 21 for most platforms.
22 22 Here is an example how to add the Wandisco repositories for Ubuntu.
23 23
24 24 .. code-block:: bash
25 25
26 $ sudo sh -c 'echo "deb http://opensource.wandisco.com/ubuntu `lsb_release -cs` svn19" >> /etc/apt/sources.list.d/subversion19.list'
27 $ sudo wget -q http://opensource.wandisco.com/wandisco-debian.gpg -O- | sudo apt-key add -
26 $ sudo sh -c 'echo "deb http://opensource.wandisco.com/ubuntu `lsb_release -cs` svn110" >> /etc/apt/sources.list.d/subversion110.list'
27 $ sudo wget -q http://opensource.wandisco.com/wandisco-debian-new.gpg -O- | sudo apt-key add -
28 28 $ sudo apt-get update
29 29
30 30 Here is an example how to add the Wandisco repositories for Centos/Redhat. Using
31 31 a yum config
32 32
33 33 .. code-block:: bash
34 34
35 35 [wandisco-Git]
36 36 name=CentOS-6 - Wandisco Git
37 37 baseurl=http://opensource.wandisco.com/centos/6/git/$basearch/
38 38 enabled=1
39 39 gpgcheck=1
40 40 gpgkey=http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco
41 41
42 42
43 43
44 44 Example installation of required components for Ubuntu platform:
45 45
46 46 .. code-block:: bash
47 47
48 48 $ sudo apt-get install apache2
49 $ sudo apt-get install libapache2-mod-svn
49 $ sudo apt-get install libapache2-svn
50 50
51 51 Once installed you need to enable ``dav_svn`` on Ubuntu:
52 52
53 53 .. code-block:: bash
54 54
55 55 $ sudo a2enmod dav_svn
56 56 $ sudo a2enmod headers
57 57 $ sudo a2enmod authn_anon
58 58
59 59
60 60 Example installation of required components for RedHat/CentOS platform:
61 61
62 62 .. code-block:: bash
63 63
64 64 $ sudo yum install httpd
65 65 $ sudo yum install subversion mod_dav_svn
66 66
67 67
68 68 Once installed you need to enable ``dav_svn`` on RedHat/CentOS:
69 69
70 70 .. code-block:: bash
71 71
72 72 sudo vi /etc/httpd/conf.modules.d/10-subversion.conf
73 73 ## The file should read:
74 74
75 75 LoadModule dav_svn_module modules/mod_dav_svn.so
76 76 LoadModule headers_module modules/mod_headers.so
77 77 LoadModule authn_anon_module modules/mod_authn_anon.so
78 78
79 79
80 80 Configuring Apache Setup
81 81 ========================
82 82
83 83 .. tip::
84 84
85 85 It is recommended to run Apache on a port other than 80, due to possible
86 86 conflicts with other HTTP servers like nginx. To do this, set the
87 87 ``Listen`` parameter in the ``/etc/apache2/ports.conf`` file, for example
88 88 ``Listen 8090``.
89 89
90 90
91 91 .. warning::
92 92
93 93 Make sure your Apache instance which runs the mod_dav_svn module is
94 94 only accessible by |RCE|. Otherwise everyone is able to browse
95 95 the repositories or run subversion operations (checkout/commit/etc.).
96 96
97 97 It is also recommended to run apache as the same user as |RCE|, otherwise
98 98 permission issues could occur. To do this edit the ``/etc/apache2/envvars``
99 99
100 100 .. code-block:: apache
101 101
102 102 export APACHE_RUN_USER=rhodecode
103 103 export APACHE_RUN_GROUP=rhodecode
104 104
105 105 1. To configure Apache, create and edit a virtual hosts file, for example
106 106 :file:`/etc/apache2/sites-enabled/default.conf`. Below is an example
107 107 how to use one with auto-generated config ```mod_dav_svn.conf```
108 108 from configured |RCE| instance.
109 109
110 110 .. code-block:: apache
111 111
112 112 <VirtualHost *:8090>
113 113 ServerAdmin rhodecode-admin@localhost
114 114 DocumentRoot /var/www/html
115 115 ErrorLog ${'${APACHE_LOG_DIR}'}/error.log
116 116 CustomLog ${'${APACHE_LOG_DIR}'}/access.log combined
117 117 LogLevel info
118 118 # allows custom host names, prevents 400 errors on checkout
119 119 HttpProtocolOptions Unsafe
120 120 Include /home/user/.rccontrol/enterprise-1/mod_dav_svn.conf
121 121 </VirtualHost>
122 122
123 123
124 124 2. Go to the :menuselection:`Admin --> Settings --> VCS` page, and
125 125 enable :guilabel:`Proxy Subversion HTTP requests`, and specify the
126 126 :guilabel:`Subversion HTTP Server URL`.
127 127
128 128 3. Open the |RCE| configuration file,
129 129 :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini`
130 130
131 131 4. Add the following configuration option in the ``[app:main]``
132 132 section if you don't have it yet.
133 133
134 134 This enables mapping of the created |RCE| repo groups into special
135 135 |svn| paths. Each time a new repository group is created, the system will
136 136 update the template file and create new mapping. Apache web server needs to
137 137 be reloaded to pick up the changes on this file.
138 138 To do this, simply configure `svn.proxy.reload_cmd` inside the .ini file.
139 139 Example configuration:
140 140
141 141
142 142 .. code-block:: ini
143 143
144 144 ############################################################
145 145 ### Subversion proxy support (mod_dav_svn) ###
146 146 ### Maps RhodeCode repo groups into SVN paths for Apache ###
147 147 ############################################################
148 148 ## Enable or disable the config file generation.
149 149 svn.proxy.generate_config = true
150 150 ## Generate config file with `SVNListParentPath` set to `On`.
151 151 svn.proxy.list_parent_path = true
152 152 ## Set location and file name of generated config file.
153 153 svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf
154 154 ## Used as a prefix to the <Location> block in the generated config file.
155 155 ## In most cases it should be set to `/`.
156 156 svn.proxy.location_root = /
157 157 ## Command to reload the mod dav svn configuration on change.
158 158 ## Example: `/etc/init.d/apache2 reload`
159 159 svn.proxy.reload_cmd = /etc/init.d/apache2 reload
160 160 ## If the timeout expires before the reload command finishes, the command will
161 161 ## be killed. Setting it to zero means no timeout. Defaults to 10 seconds.
162 162 #svn.proxy.reload_timeout = 10
163 163
164 164
165 165 This would create a special template file called ```mod_dav_svn.conf```. We
166 166 used that file path in the apache config above inside the Include statement.
167 167 It's also possible to manually generate the config from the
168 168 :menuselection:`Admin --> Settings --> VCS` page by clicking a
169 169 `Generate Apache Config` button.
170 170
171 171 5. Now only things left is to enable svn support, and generate the initial
172 172 configuration.
173 173
174 174 - Select `Proxy subversion HTTP requests` checkbox
175 175 - Enter http://localhost:8090 into `Subversion HTTP Server URL`
176 176 - Click the `Generate Apache Config` button.
177 177
178 178 This config will be automatically re-generated once an user-groups is added
179 179 to properly map the additional paths generated.
180 180
181 181
182 182
183 183 Using |svn|
184 184 ===========
185 185
186 186 Once |svn| has been enabled on your instance, you can use it with the
187 187 following examples. For more |svn| information, see the `Subversion Red Book`_
188 188
189 189 .. code-block:: bash
190 190
191 191 # To clone a repository
192 192 svn checkout http://my-svn-server.example.com/my-svn-repo
193 193
194 194 # svn commit
195 195 svn commit
196 196
197 197
198 198 .. _Subversion Red Book: http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.ref.svn
199 199
200 200 .. _Ask Ubuntu: http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now