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