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