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