##// END OF EJS Templates
installation win document updates
marcink -
r3358:321ca2e6 beta
parent child Browse files
Show More
@@ -1,254 +1,286 b''
1 .. _installation_win:
1 .. _installation_win:
2
2
3
3
4 Step by step Installation for Windows
4 Step by step Installation for Windows
5 =====================================
5 =====================================
6
6
7
7
8 RhodeCode step-by-step install Guide for Windows
8 RhodeCode step-by-step install Guide for Windows
9
9
10 Target OS: Windows XP SP3 32bit English (Clean installation)
10 Target OS: Windows XP SP3 32bit English (Clean installation)
11 + All Windows Updates until 24-may-2012
11 + All Windows Updates until 24-may-2012
12
12
13 .. note::
13 .. note::
14
14
15 This installation is for 32bit systems, for 64bit windows you might need
15 This installation is for 32bit systems, for 64bit windows you might need
16 to download proper 64bit version of "Windows Installer" and Win32py
16 to download proper 64bit versions of the different packages(Windows Installer, Win32py extensions)
17 extensions
17 plus some extra tweaks.
18 These extra steps haven been marked as "64bit".
19 Tested on Windows Server 2008 R2 SP1, 9-feb-2013.
20 If you run into any 64bit related problems, please check these pages:
21 - http://blog.victorjabur.com/2011/06/05/compiling-python-2-7-modules-on-windows-32-and-64-using-msvc-2008-express/
22 - http://bugs.python.org/issue7511
18
23
19 Step1 - Install Visual Studio 2008 Express
24 Step1 - Install Visual Studio 2008 Express
20 ------------------------------------------
25 ------------------------------------------
21
26
22
27
23 Optional: You can also install MingW, but VS2008 installation is easier
28 Optional: You can also install MingW, but VS2008 installation is easier
24
29
25 Download "Visual C++ 2008 Express Edition with SP1" from:
30 Download "Visual C++ 2008 Express Edition with SP1" from:
26 http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express
31 http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express
27 (if not found or relocated, google for "visual studio 2008 express" for
32 (if not found or relocated, google for "visual studio 2008 express" for
28 updated link)
33 updated link)
29
34
30 You can also download full ISO file for offline installation, just
35 You can also download full ISO file for offline installation, just
31 choose "All - Offline Install ISO image file" in the previous page and
36 choose "All - Offline Install ISO image file" in the previous page and
32 choose "Visual C++ 2008 Express" when installing.
37 choose "Visual C++ 2008 Express" when installing.
33
38
34 .. note::
39 .. note::
35
40
36 Using other versions of Visual Studio will lead to random crashes.
41 Using other versions of Visual Studio will lead to random crashes.
37 You must use Visual Studio 2008!"
42 You must use Visual Studio 2008!"
38
43
39 .. note::
44 .. note::
40
45
41 Silverlight Runtime and SQL Server 2008 Express Edition are not
46 Silverlight Runtime and SQL Server 2008 Express Edition are not
42 required, you can uncheck them
47 required, you can uncheck them
43
48
49 .. note::
50 64bit: You also need to install the Microsoft Windows SDK for .NET 3.5 SP1 (.NET 4.0 won't work).
51 Download from: http://www.microsoft.com/en-us/download/details.aspx?id=3138
52
53 .. note::
54 64bit: You also need to copy and rename a .bat file to make the Visual C++ compiler work.
55 I am not sure why this is not necessary for 32bit.
56 Copy C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat to C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat
57
44
58
45 Step2 - Install Python
59 Step2 - Install Python
46 ----------------------
60 ----------------------
47
61
48 Install Python 2.x.y (x >= 5) x86 version (32bit). DO NOT USE A 3.x version.
62 Install Python 2.x.y (x >= 5) x86 version (32bit). DO NOT USE A 3.x version.
49 Download Python 2.x.y from:
63 Download Python 2.x.y from:
50 http://www.python.org/download/
64 http://www.python.org/download/
51
65
52 Choose "Windows Installer" (32bit version) not "Windows X86-64
66 Choose "Windows Installer" (32bit version) not "Windows X86-64
53 Installer". While writing this guide, the latest version was v2.7.3.
67 Installer". While writing this guide, the latest version was v2.7.3.
54 Remember the specific major and minor version installed, because it will
68 Remember the specific major and minor version installed, because it will
55 be needed in the next step. In this case, it is "2.7".
69 be needed in the next step. In this case, it is "2.7".
56
70
71 .. note::
72 64bit: Just download and install the 64bit version of python.
57
73
58 Step3 - Install Win32py extensions
74 Step3 - Install Win32py extensions
59 ----------------------------------
75 ----------------------------------
60
76
61 Download pywin32 from:
77 Download pywin32 from:
62 http://sourceforge.net/projects/pywin32/files/
78 http://sourceforge.net/projects/pywin32/files/
63
79
64 - Click on "pywin32" folder
80 - Click on "pywin32" folder
65 - Click on the first folder (in this case, Build 217, maybe newer when you try)
81 - Click on the first folder (in this case, Build 217, maybe newer when you try)
66 - Choose the file ending with ".win32-py2.x.exe" -> x being the minor
82 - Choose the file ending with ".win32-py2.x.exe" -> x being the minor
67 version of Python you installed (in this case, 7)
83 version of Python you installed (in this case, 7)
68 When writing this guide, the file was:
84 When writing this guide, the file was:
69 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20217/pywin32-217.win32-py2.7.exe/download
85 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20217/pywin32-217.win32-py2.7.exe/download
70
86
87 .. note::
88 64bit: Download and install the 64bit version.
89 At the time of writing you can find this at:
90 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/pywin32-218.win-amd64-py2.7.exe/download
71
91
72 Step4 - Python BIN
92 Step4 - Python BIN
73 ------------------
93 ------------------
74
94
75 Add Python BIN folder to the path
95 Add Python BIN folder to the path
76
96
77 You have to add the Python folder to the path, you can do it manually
97 You have to add the Python folder to the path, you can do it manually
78 (editing "PATH" environment variable) or using Windows Support Tools
98 (editing "PATH" environment variable) or using Windows Support Tools
79 that came preinstalled in Vista/7 and can be installed in Windows XP.
99 that came preinstalled in Vista/7 and can be installed in Windows XP.
80
100
81 - Using support tools on WINDOWS XP:
101 - Using support tools on WINDOWS XP:
82 If you use Windows XP you can install them using Windows XP CD and
102 If you use Windows XP you can install them using Windows XP CD and
83 navigating to \SUPPORT\TOOLS. There, execute Setup.EXE (not MSI).
103 navigating to \SUPPORT\TOOLS. There, execute Setup.EXE (not MSI).
84 Afterwards, open a CMD and type::
104 Afterwards, open a CMD and type::
85
105
86 SETX PATH "%PATH%;[your-python-path]" -M
106 SETX PATH "%PATH%;[your-python-path]" -M
87
107
88 Close CMD (the path variable will be updated then)
108 Close CMD (the path variable will be updated then)
89
109
90 - Using support tools on WINDOWS Vista/7:
110 - Using support tools on WINDOWS Vista/7:
91
111
92 Open a CMD and type::
112 Open a CMD and type::
93
113
94 SETX PATH "%PATH%;[your-python-path]" /M
114 SETX PATH "%PATH%;[your-python-path]" /M
95
115
96 Please substitute [your-python-path] with your Python installation path.
116 Please substitute [your-python-path] with your Python installation path.
97 Typically: C:\\Python27
117 Typically: C:\\Python27
98
118
99
119
100 Step5 - RhodeCode folder structure
120 Step5 - RhodeCode folder structure
101 ----------------------------------
121 ----------------------------------
102
122
103 Create a RhodeCode folder structure
123 Create a RhodeCode folder structure
104
124
105 This is only a example to install RhodeCode, you can of course change
125 This is only a example to install RhodeCode, you can of course change
106 it. However, this guide will follow the proposed structure, so please
126 it. However, this guide will follow the proposed structure, so please
107 later adapt the paths if you change them. My recommendation is to use
127 later adapt the paths if you change them. My recommendation is to use
108 folders with NO SPACES. But you can try if you are brave...
128 folders with NO SPACES. But you can try if you are brave...
109
129
110 Create the following folder structure::
130 Create the following folder structure::
111
131
112 C:\RhodeCode
132 C:\RhodeCode
113 C:\RhodeCode\Bin
133 C:\RhodeCode\Bin
114 C:\RhodeCode\Env
134 C:\RhodeCode\Env
115 C:\RhodeCode\Repos
135 C:\RhodeCode\Repos
116
136
117
137
118 Step6 - Install virtualenv
138 Step6 - Install virtualenv
119 ---------------------------
139 ---------------------------
120
140
121 Install Virtual Env for Python
141 Install Virtual Env for Python
122
142
123 Navigate to: http://www.virtualenv.org/en/latest/index.html#installation
143 Navigate to: http://www.virtualenv.org/en/latest/index.html#installation
124 Right click on "virtualenv.py" file and choose "Save link as...".
144 Right click on "virtualenv.py" file and choose "Save link as...".
125 Download to C:\\RhodeCode (or whatever you want)
145 Download to C:\\RhodeCode (or whatever you want)
126 (the file is located at
146 (the file is located at
127 https://raw.github.com/pypa/virtualenv/master/virtualenv.py)
147 https://raw.github.com/pypa/virtualenv/master/virtualenv.py)
128
148
129 Create a virtual Python environment in C:\\RhodeCode\\Env (or similar). To
149 Create a virtual Python environment in C:\\RhodeCode\\Env (or similar). To
130 do so, open a CMD (Python Path should be included in Step3), navigate
150 do so, open a CMD (Python Path should be included in Step3), navigate
131 where you downloaded "virtualenv.py", and write::
151 where you downloaded "virtualenv.py", and write::
132
152
133 python virtualenv.py C:\RhodeCode\Env
153 python virtualenv.py C:\RhodeCode\Env
134
154
135 (--no-site-packages is now the default behaviour of virtualenv, no need
155 (--no-site-packages is now the default behaviour of virtualenv, no need
136 to include it)
156 to include it)
137
157
138
158
139 Step7 - Install RhodeCode
159 Step7 - Install RhodeCode
140 -------------------------
160 -------------------------
141
161
142 Finally, install RhodeCode
162 Finally, install RhodeCode
143
163
144 Close previously opened command prompt/s, and open a Visual Studio 2008
164 Close previously opened command prompt/s, and open a Visual Studio 2008
145 Command Prompt (**IMPORTANT!!**). To do so, go to Start Menu, and then open
165 Command Prompt (**IMPORTANT!!**). To do so, go to Start Menu, and then open
146 "Microsoft Visual C++ 2008 Express Edition" -> "Visual Studio Tools" ->
166 "Microsoft Visual C++ 2008 Express Edition" -> "Visual Studio Tools" ->
147 "Visual Studio 2008 Command Prompt"
167 "Visual Studio 2008 Command Prompt"
148
168
169 .. note::
170 64bit: For 64bit you need to modify the shortcut that is used to start the
171 Visual Studio 2008 Command Prompt. Use right-mouse click to open properties.
172 Change commandline from::
173
174 %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" x86
175
176 to::
177
178 %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" amd64
179
180
149 In that CMD (loaded with VS2008 PATHs) type::
181 In that CMD (loaded with VS2008 PATHs) type::
150
182
151 cd C:\RhodeCode\Env\Scripts (or similar)
183 cd C:\RhodeCode\Env\Scripts (or similar)
152 activate
184 activate
153
185
154 The prompt will change into "(Env) C:\\RhodeCode\\Env\\Scripts" or similar
186 The prompt will change into "(Env) C:\\RhodeCode\\Env\\Scripts" or similar
155 (depending of your folder structure). Then type::
187 (depending of your folder structure). Then type::
156
188
157 pip install rhodecode
189 pip install rhodecode
158
190
159 (long step, please wait until fully complete)
191 (long step, please wait until fully complete)
160
192
161 Some warnings will appear, don't worry as they are normal.
193 Some warnings will appear, don't worry as they are normal.
162
194
163
195
164 Step8 - Configuring RhodeCode
196 Step8 - Configuring RhodeCode
165 -----------------------------
197 -----------------------------
166
198
167
199
168 steps taken from http://packages.python.org/RhodeCode/setup.html
200 steps taken from http://packages.python.org/RhodeCode/setup.html
169
201
170 You have to use the same Visual Studio 2008 command prompt as Step7, so
202 You have to use the same Visual Studio 2008 command prompt as Step7, so
171 if you closed it reopen it following the same commands (including the
203 if you closed it reopen it following the same commands (including the
172 "activate" one). When ready, just type::
204 "activate" one). When ready, just type::
173
205
174 cd C:\RhodeCode\Bin
206 cd C:\RhodeCode\Bin
175 paster make-config RhodeCode production.ini
207 paster make-config RhodeCode production.ini
176
208
177 Then, you must edit production.ini to fit your needs (ip address, ip
209 Then, you must edit production.ini to fit your needs (ip address, ip
178 port, mail settings, database, whatever). I recommend using NotePad++
210 port, mail settings, database, whatever). I recommend using NotePad++
179 (free) or similar text editor, as it handles well the EndOfLine
211 (free) or similar text editor, as it handles well the EndOfLine
180 character differences between Unix and Windows
212 character differences between Unix and Windows
181 (http://notepad-plus-plus.org/)
213 (http://notepad-plus-plus.org/)
182
214
183 For the sake of simplicity lets run it with the default settings. After
215 For the sake of simplicity lets run it with the default settings. After
184 your edits (if any), in the previous Command Prompt, type::
216 your edits (if any), in the previous Command Prompt, type::
185
217
186 paster setup-rhodecode production.ini
218 paster setup-rhodecode production.ini
187
219
188 (this time a NEW database will be installed, you must follow a different
220 (this time a NEW database will be installed, you must follow a different
189 step to later UPGRADE to a newer RhodeCode version)
221 step to later UPGRADE to a newer RhodeCode version)
190
222
191 The script will ask you for confirmation about creating a NEW database,
223 The script will ask you for confirmation about creating a NEW database,
192 answer yes (y)
224 answer yes (y)
193 The script will ask you for repository path, answer C:\\RhodeCode\\Repos
225 The script will ask you for repository path, answer C:\\RhodeCode\\Repos
194 (or similar)
226 (or similar)
195 The script will ask you for admin username and password, answer "admin"
227 The script will ask you for admin username and password, answer "admin"
196 + "123456" (or whatever you want)
228 + "123456" (or whatever you want)
197 The script will ask you for admin mail, answer "admin@xxxx.com" (or
229 The script will ask you for admin mail, answer "admin@xxxx.com" (or
198 whatever you want)
230 whatever you want)
199
231
200 If you make some mistake and the script does not end, don't worry, start
232 If you make some mistake and the script does not end, don't worry, start
201 it again.
233 it again.
202
234
203
235
204 Step9 - Running RhodeCode
236 Step9 - Running RhodeCode
205 -------------------------
237 -------------------------
206
238
207
239
208 In the previous command prompt, being in the C:\\RhodeCode\\Bin folder,
240 In the previous command prompt, being in the C:\\RhodeCode\\Bin folder,
209 just type::
241 just type::
210
242
211 paster serve production.ini
243 paster serve production.ini
212
244
213 Open yout web server, and go to http://127.0.0.1:5000
245 Open yout web server, and go to http://127.0.0.1:5000
214
246
215 It works!! :-)
247 It works!! :-)
216
248
217 Remark:
249 Remark:
218 If it does not work first time, just Ctrl-C the CMD process and start it
250 If it does not work first time, just Ctrl-C the CMD process and start it
219 again. Don't forget the "http://" in Internet Explorer
251 again. Don't forget the "http://" in Internet Explorer
220
252
221
253
222
254
223 What this Guide does not cover:
255 What this Guide does not cover:
224
256
225 - Installing Celery
257 - Installing Celery
226 - Running RhodeCode as Windows Service. You can investigate here:
258 - Running RhodeCode as Windows Service. You can investigate here:
227
259
228 - http://pypi.python.org/pypi/wsgisvc
260 - http://pypi.python.org/pypi/wsgisvc
229 - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/
261 - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/
230 - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service
262 - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service
231
263
232 - Using Apache. You can investigate here:
264 - Using Apache. You can investigate here:
233
265
234 - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4
266 - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4
235
267
236
268
237 Upgrading
269 Upgrading
238 =========
270 =========
239
271
240 Stop running RhodeCode
272 Stop running RhodeCode
241 Open a CommandPrompt like in Step7 (VS2008 path + activate) and type::
273 Open a CommandPrompt like in Step7 (VS2008 path + activate) and type::
242
274
243 easy_install -U rhodecode
275 easy_install -U rhodecode
244 cd \RhodeCode\Bin
276 cd \RhodeCode\Bin
245
277
246 { backup your production.ini file now} ::
278 { backup your production.ini file now} ::
247
279
248 paster make-config RhodeCode production.ini
280 paster make-config RhodeCode production.ini
249
281
250 (check changes and update your production.ini accordingly) ::
282 (check changes and update your production.ini accordingly) ::
251
283
252 paster upgrade-db production.ini (update database)
284 paster upgrade-db production.ini (update database)
253
285
254 Full steps in http://packages.python.org/RhodeCode/upgrade.html
286 Full steps in http://packages.python.org/RhodeCode/upgrade.html
General Comments 0
You need to be logged in to leave comments. Login now