##// END OF EJS Templates
docs: update Windows installation documentation for Windows 7/Server 2008 R2 and newer...
Denis Blanchette -
r4815:64b1a232 default
parent child Browse files
Show More
@@ -0,0 +1,238 b''
1 .. _installation_win:
2
3
4 Installation and upgrade on Windows (7/Server 2008 R2 and newer)
5 ================================================================
6
7 First time install
8 ::::::::::::::::::
9
10 Target OS: Windows 7 and newer or Windows Server 2008 R2 and newer
11
12 Tested on Windows 8.1, Windows Server 2008 R2 and Windows Server 2012
13
14 To install on an older version of Windows, see `<installation_win_old.html>`_
15
16
17 Step 1 - Install Python
18 -----------------------
19
20 Install Python 2.x.y (x = 6 or 7). Latest version is recommended. If you need another version, they can run side by side.
21
22 DO NOT USE A 3.x version.
23
24 - Download Python 2.x.y from http://www.python.org/download/
25 - Choose and click on the version
26 - Click on "Windows X86-64 Installer" for x64 or "Windows x86 MSI installer" for Win32.
27 - Disable UAC or run the installer with admin privileges. If you chose to disable UAC, do not forget to reboot afterwards.
28
29 While writing this Guide, the latest version was v2.7.9.
30 Remember the specific major and minor versions installed, because they will
31 be needed in the next step. In this case, it is "2.7".
32
33
34 Step 2 - Python BIN
35 -------------------
36
37 Add Python BIN folder to the path
38
39 You have to add the Python folder to the path, you can do it manually (editing "PATH" environment variable) or using Windows Support Tools that came preinstalled in Vista/7 and later.
40
41 Open a CMD and type::
42
43 SETX PATH "%PATH%;[your-python-path]" /M
44
45 Please substitute [your-python-path] with your Python installation path. Typically: C:\\Python27
46
47
48 Step 3 - Install Win32py extensions
49 -----------------------------------
50
51 Download pywin32 from:
52 http://sourceforge.net/projects/pywin32/files/
53
54 - Click on "pywin32" folder
55 - Click on the first folder (in this case, Build 219, maybe newer when you try)
56 - Choose the file ending with ".amd64-py2.x.exe" (".win32-py2.x.exe" for Win32) -> x being the minor version of Python you installed (in this case, 7).
57 When writing this Guide, the file was:
58 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win-amd64-py2.7.exe/download (x64)
59 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win32-py2.7.exe/download (Win32)
60
61
62 Step 4 - Install pip
63 --------------------
64
65 pip is a package management system for Python. You will need it to install Kallithea and its dependencies.
66
67 If you installed Python 2.7.9+, you already have it (as long as you ran the installer with admin privileges or disabled UAC).
68
69 If it was not installed or if you are using Python>=2.6,<2.7.9:
70
71 - Go to https://bootstrap.pypa.io
72 - Right-click on get-pip.py and choose Saves as...
73 - Run "python get-pip.py" in the folder where you downloaded get-pip.py (may require admin access).
74 (See http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows for explanations or alternatives)
75
76 Note that pip.exe will be placed inside your Python installation's Scripts folder, which is likely not on your path.
77
78 Open a CMD and type::
79
80 SETX PATH "%PATH%;[your-python-path]\Scripts" /M
81
82
83 Step 5 - Kallithea Folder Structure
84 -----------------------------------
85
86 Create a Kallithea folder structure.
87
88 This is only an example to install Kallithea. Of course, you can change it. However, this Guide will follow the proposed structure, so please later adapt the paths if you change them. Folders with NO SPACES are recommended. But you can try it if you are brave...
89
90 Create the following folder structure::
91
92 C:\Kallithea
93 C:\Kallithea\Bin
94 C:\Kallithea\Env
95 C:\Kallithea\Repos
96
97
98 Step 6 - Install virtualenv
99 ---------------------------
100
101 .. note::
102 A python virtual environment will allow for isolation between the Python packages of your system and those used for Kallithea.
103 It is strongly recommended to use it to ensure that Kallithea does not change a dependency that another software uses or vice versa.
104 If you are using your server (or VM) only for Kallithea, you can skip this step, at your own risk.
105
106 Install Virtual Env for Python
107
108 In a command prompt type::
109
110 pip install virtualenv
111
112 Virtualenv will now be inside your Python Scripts path (C:\\Python27\\Scripts or similar).
113
114 To create a virtual environment, run::
115
116 virtualenv C:\Kallithea\Env
117
118
119 Step 7 - Install Kallithea
120 --------------------------
121
122 In order to install Kallithea, you need to be able to run "pip install kallithea". It will use Python pip to install the Kallithea Python package and its dependencies.
123 Some Python packages use managed code and need to be compiled.
124 This can be done on Linux without any special steps. On Windows, you will need to install Microsoft Visual C++ compiler for Python 2.7.
125
126 Download and install "Microsoft Visual C++ Compiler for Python 2.7" from http://aka.ms/vcpython27
127
128 .. note::
129 You can also install the dependencies using already compiled Windows binaries packages. A good source of compiled Python packages is http://www.lfd.uci.edu/~gohlke/pythonlibs/. However, not all of the necessary packages for Kallithea are on this site and some are hard to find, so we will stick with using the compiler.
130
131 In a command prompt type (adapting paths if necessary)::
132
133 cd C:\Kallithea\Env\Scripts
134 activate
135
136 The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar
137 (depending of your folder structure). Then type::
138
139 pip install kallithea
140
141 (Long step, please wait until fully complete)
142
143 Some warnings will appear. Don't worry, they are normal.
144
145
146 Step 8 - (Optional) Install git
147 -------------------------------
148 Mercurial being a python package, it was installed automatically when doing "pip install kallithea".
149
150 You need to install git manually if you want Kallithea to be able to host git repositories.
151
152 See http://git-scm.com/book/en/v2/Getting-Started-Installing-Git#Installing-on-Windows for instructions.
153
154
155 Step 9 - Configuring Kallithea
156 ------------------------------
157
158 Steps taken from `<setup.html>`_
159
160 You have to use the same command prompt as in Step 7, so if you closed it, reopen it following the same commands (including the "activate" one).
161
162 When ready, type::
163
164 cd C:\Kallithea\Bin
165 paster make-config Kallithea production.ini
166
167 Then, you must edit production.ini to fit your needs (IP address, IP port, mail settings, database, etc.) NotePad++ (free) or similar text editors are recommended, as they handle well the EndOfLine character differences between Unix and Windows (http://notepad-plus-plus.org/).
168
169 For the sake of simplicity, run it with the default settings. After your edits (if any), in the previous Command Prompt, type::
170
171 paster setup-db production.ini
172
173 (This time a NEW database will be installed. You must follow a different step to later UPGRADE to a newer Kallithea version)
174
175 The script will ask you for confirmation about creating a NEW database, answer yes (y)
176
177 The script will ask you for repository path, answer C:\\Kallithea\\Repos (or similar).
178
179 The script will ask you for admin username and password, answer "admin" + "123456" (or whatever you want)
180
181 The script will ask you for admin mail, answer "admin@xxxx.com" (or whatever you want)
182
183 If you make a mistake and the script doesn't end, don't worry: start it again.
184
185 If you decided not to install git, you will get errors about it that you can ignore.
186
187
188 Step 10 - Running Kallithea
189 ---------------------------
190
191 In the previous command prompt, being in the C:\\Kallithea\\Bin folder, type::
192
193 paster serve production.ini
194
195 Open your web server, and go to http://127.0.0.1:5000
196
197 It works!! :-)
198
199 Remark:
200 If it does not work the first time, Ctrl-C the CMD process and start it again. Don't forget the "http://" in Internet Explorer.
201
202
203 What this Guide does not cover:
204
205 - Installing Celery
206 - Running Kallithea as a Windows Service. You can investigate here:
207
208 - http://pypi.python.org/pypi/wsgisvc
209 - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/
210 - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service
211
212 - Using Apache. You can investigate here:
213
214 - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4
215
216
217 Upgrading
218 :::::::::
219
220 Stop running Kallithea
221 Open a CommandPrompt like in Step 7 (cd to C:\Kallithea\Env\Scripts and activate) and type::
222
223 pip install kallithea --upgrade
224 cd \Kallithea\Bin
225
226 Backup your production.ini file now.
227
228 Then, run::
229
230 paster make-config Kallithea production.ini
231
232 Look for changes and update your production.ini accordingly.
233
234 Then, update the database::
235
236 paster upgrade-db production.ini
237
238 Full steps in `<upgrade.html>`_
@@ -12,6 +12,7 b' Users Guide'
12
12
13 installation
13 installation
14 upgrade
14 upgrade
15 installation_win
15 installation_win_old
16 installation_win_old
16 installation_iis
17 installation_iis
17 setup
18 setup
@@ -1,11 +1,11 b''
1 .. _installation_win_old:
1 .. _installation_win_old:
2
2
3
3
4 Step by step Installation for Windows
4 Installation and upgrade on Windows (XP/Vista/Server 2003/Server 2008)
5 =====================================
5 ======================================================================
6
6
7
7 First time install
8 Kallithea step-by-step install Guide for Windows
8 ::::::::::::::::::
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
@@ -28,9 +28,8 b' Step1 - Install Visual Studio 2008 Expre'
28 Optional: You can also install MinGW, but VS2008 installation is easier.
28 Optional: You can also install MinGW, but VS2008 installation is easier.
29
29
30 Download "Visual C++ 2008 Express Edition with SP1" from:
30 Download "Visual C++ 2008 Express Edition with SP1" from:
31 http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express
31 http://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso
32 (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 updated link. This link was taken from http://stackoverflow.com/questions/15318560/visual-c-2008-express-download-link-dead)
33 updated link)
34
33
35 You can also download full ISO file for offline installation, just
34 You can also download full ISO file for offline installation, just
36 choose "All - Offline Install ISO image file" in the previous page and
35 choose "All - Offline Install ISO image file" in the previous page and
@@ -273,7 +272,7 b' What this Guide does not cover:'
273
272
274
273
275 Upgrading
274 Upgrading
276 =========
275 :::::::::
277
276
278 Stop running Kallithea
277 Stop running Kallithea
279 Open a CommandPrompt like in Step7 (VS2008 path + activate) and type::
278 Open a CommandPrompt like in Step7 (VS2008 path + activate) and type::
General Comments 0
You need to be logged in to leave comments. Login now