comparison docs/installation_win.rst @ 4955:4e6dfdb3fa01

docs: English and consistency corrections
author Michael V. DePalatis <mike@depalatis.net>
date Tue, 31 Mar 2015 22:15:38 +0200
parents 03bbd33bc084
children 22a3fa3c4254
comparison
equal deleted inserted replaced
4954:14f063657078 4955:4e6dfdb3fa01
17 Step 1 - Install Python 17 Step 1 - Install Python
18 ----------------------- 18 -----------------------
19 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. 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 21
22 DO NOT USE A 3.x version. 22 .. warning:: Python 3.x is not supported.
23 23
24 - Download Python 2.x.y from http://www.python.org/download/ 24 - Download Python 2.x.y from http://www.python.org/download/
25 - Choose and click on the version 25 - Choose and click on the version
26 - Click on "Windows X86-64 Installer" for x64 or "Windows x86 MSI installer" for Win32. 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. 27 - Disable UAC or run the installer with admin privileges. If you chose to disable UAC, do not forget to reboot afterwards.
28 28
29 While writing this Guide, the latest version was v2.7.9. 29 While writing this guide, the latest version was v2.7.9.
30 Remember the specific major and minor versions installed, because they will 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". 31 be needed in the next step. In this case, it is "2.7".
32 32
33 33
34 Step 2 - Python BIN 34 Step 2 - Python BIN
35 ------------------- 35 -------------------
36 36
37 Add Python BIN folder to the path 37 Add Python BIN folder to the path. This can be done manually (editing
38 38 "PATH" environment variable) or by using Windows Support Tools that
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. 39 come pre-installed in Windows Vista/7 and later.
40 40
41 Open a CMD and type:: 41 Open a CMD and type::
42 42
43 SETX PATH "%PATH%;[your-python-path]" /M 43 SETX PATH "%PATH%;[your-python-path]" /M
44 44
45 Please substitute [your-python-path] with your Python installation path. Typically: C:\\Python27 45 Please substitute [your-python-path] with your Python installation
46 46 path. Typically this is ``C:\\Python27``.
47 47
48 Step 3 - Install Win32py extensions 48
49 Step 3 - Install pywin32 extensions
49 ----------------------------------- 50 -----------------------------------
50 51
51 Download pywin32 from: 52 Download pywin32 from:
52 http://sourceforge.net/projects/pywin32/files/ 53 http://sourceforge.net/projects/pywin32/files/
53 54
54 - Click on "pywin32" folder 55 - Click on "pywin32" folder
55 - Click on the first folder (in this case, Build 219, maybe newer when you try) 56 - 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 - Choose the file ending with ".amd64-py2.x.exe" (".win32-py2.x.exe"
57 When writing this Guide, the file was: 58 for Win32) where x is the minor version of Python you installed.
58 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win-amd64-py2.7.exe/download (x64) 59 When writing this guide, the file was:
59 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win32-py2.7.exe/download (Win32) 60 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win-amd64-py2.7.exe/download
61 (x64)
62 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win32-py2.7.exe/download
63 (Win32)
60 64
61 65
62 Step 4 - Install pip 66 Step 4 - Install pip
63 -------------------- 67 --------------------
64 68
70 74
71 - Go to https://bootstrap.pypa.io 75 - Go to https://bootstrap.pypa.io
72 - Right-click on get-pip.py and choose Saves as... 76 - 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). 77 - Run "python get-pip.py" in the folder where you downloaded get-pip.py (may require admin access).
74 78
75 (See http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows for explanations or alternatives) 79 .. note::
76 80
77 Note that pip.exe will be placed inside your Python installation's Scripts folder, which is likely not on your path. 81 See http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows
78 82 for details and alternative methods.
79 Open a CMD and type:: 83
84 Note that pip.exe will be placed inside your Python installation's
85 Scripts folder, which is likely not on your path. To correct this,
86 open a CMD and type::
80 87
81 SETX PATH "%PATH%;[your-python-path]\Scripts" /M 88 SETX PATH "%PATH%;[your-python-path]\Scripts" /M
82 89
83 90
84 Step 5 - Kallithea Folder Structure 91 Step 5 - Kallithea Folder Structure
85 ----------------------------------- 92 -----------------------------------
86 93
87 Create a Kallithea folder structure. 94 Create a Kallithea folder structure.
88 95
89 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... 96 This is only an example to install Kallithea. Of course, you can
97 change it. However, this guide will follow the proposed structure, so
98 please later adapt the paths if you change them. Folders without
99 spaces are recommended.
90 100
91 Create the following folder structure:: 101 Create the following folder structure::
92 102
93 C:\Kallithea 103 C:\Kallithea
94 C:\Kallithea\Bin 104 C:\Kallithea\Bin
99 Step 6 - Install virtualenv 109 Step 6 - Install virtualenv
100 --------------------------- 110 ---------------------------
101 111
102 .. note:: 112 .. note::
103 A python virtual environment will allow for isolation between the Python packages of your system and those used for Kallithea. 113 A python virtual environment will allow for isolation between the Python packages of your system and those used for Kallithea.
104 It is strongly recommended to use it to ensure that Kallithea does not change a dependency that another software uses or vice versa. 114 It is strongly recommended to use it to ensure that Kallithea does not change a dependency that other software uses or vice versa.
105 If you are using your server (or VM) only for Kallithea, you can skip this step, at your own risk.
106
107 Install Virtual Env for Python
108 115
109 In a command prompt type:: 116 In a command prompt type::
110 117
111 pip install virtualenv 118 pip install virtualenv
112 119
118 125
119 126
120 Step 7 - Install Kallithea 127 Step 7 - Install Kallithea
121 -------------------------- 128 --------------------------
122 129
123 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. 130 In order to install Kallithea, you need to be able to run "pip install kallithea". It will use pip to install the Kallithea Python package and its dependencies.
124 Some Python packages use managed code and need to be compiled. 131 Some Python packages use managed code and need to be compiled.
125 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. 132 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.
126 133
127 Download and install "Microsoft Visual C++ Compiler for Python 2.7" from http://aka.ms/vcpython27 134 Download and install "Microsoft Visual C++ Compiler for Python 2.7" from http://aka.ms/vcpython27
128 135
137 The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar 144 The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar
138 (depending of your folder structure). Then type:: 145 (depending of your folder structure). Then type::
139 146
140 pip install kallithea 147 pip install kallithea
141 148
142 (Long step, please wait until fully complete) 149 .. note:: This will take some time. Please wait patiently until it is fully
143 150 complete. Some warnings will appear. Don't worry, they are
144 Some warnings will appear. Don't worry, they are normal. 151 normal.
145 152
146 153
147 Step 8 - (Optional) Install git 154 Step 8 - (Optional) Install git
148 ------------------------------- 155 -------------------------------
156
149 Mercurial being a python package, it was installed automatically when doing "pip install kallithea". 157 Mercurial being a python package, it was installed automatically when doing "pip install kallithea".
150 158
151 You need to install git manually if you want Kallithea to be able to host git repositories. 159 You need to install git manually if you want Kallithea to be able to host git repositories.
152 160
153 See http://git-scm.com/book/en/v2/Getting-Started-Installing-Git#Installing-on-Windows for instructions. 161 See http://git-scm.com/book/en/v2/Getting-Started-Installing-Git#Installing-on-Windows for instructions.
156 Step 9 - Configuring Kallithea 164 Step 9 - Configuring Kallithea
157 ------------------------------ 165 ------------------------------
158 166
159 Steps taken from `<setup.html>`_ 167 Steps taken from `<setup.html>`_
160 168
161 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). 169 You have to use the same command prompt as in Step 7, so if you closed
162 170 it, reopen it following the same commands (including the "activate"
163 When ready, type:: 171 one). When ready, type::
164 172
165 cd C:\Kallithea\Bin 173 cd C:\Kallithea\Bin
166 paster make-config Kallithea production.ini 174 paster make-config Kallithea production.ini
167 175
168 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/). 176 Then you must edit production.ini to fit your needs (IP address, IP
169 177 port, mail settings, database, etc.). `NotePad++`__ or a similar text
170 For the sake of simplicity, run it with the default settings. After your edits (if any), in the previous Command Prompt, type:: 178 editor is recommended to properly handle the newline character
179 differences between Unix and Windows.
180
181 __ http://notepad-plus-plus.org/
182
183 For the sake of simplicity, run it with the default settings. After your edits (if any) in the previous command prompt, type::
171 184
172 paster setup-db production.ini 185 paster setup-db production.ini
173 186
174 (This time a NEW database will be installed. You must follow a different step to later UPGRADE to a newer Kallithea version) 187 .. warning:: This time a *new* database will be installed. You must
175 188 follow a different step to later *upgrade* to a newer
176 The script will ask you for confirmation about creating a NEW database, answer yes (y) 189 Kallithea version)
177 190
178 The script will ask you for repository path, answer C:\\Kallithea\\Repos (or similar). 191 The script will ask you for confirmation about creating a new database, answer yes (y)
179 192
180 The script will ask you for admin username and password, answer "admin" + "123456" (or whatever you want) 193 The script will ask you for the repository path, answer C:\\Kallithea\\Repos (or similar).
181 194
182 The script will ask you for admin mail, answer "admin@xxxx.com" (or whatever you want) 195 The script will ask you for the admin username and password, answer "admin" + "123456" (or whatever you want)
196
197 The script will ask you for admin mail, answer "admin@xxxx.com" (or whatever you want).
183 198
184 If you make a mistake and the script doesn't end, don't worry: start it again. 199 If you make a mistake and the script doesn't end, don't worry: start it again.
185 200
186 If you decided not to install git, you will get errors about it that you can ignore. 201 If you decided not to install git, you will get errors about it that you can ignore.
187 202
199 214
200 Remark: 215 Remark:
201 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. 216 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.
202 217
203 218
204 What this Guide does not cover: 219 What this guide does not cover:
205 220
206 - Installing Celery 221 - Installing Celery
207 - Running Kallithea as a Windows Service. You can investigate here: 222 - Running Kallithea as a Windows Service. You can investigate here:
208 223
209 - http://pypi.python.org/pypi/wsgisvc 224 - http://pypi.python.org/pypi/wsgisvc
224 pip install kallithea --upgrade 239 pip install kallithea --upgrade
225 cd \Kallithea\Bin 240 cd \Kallithea\Bin
226 241
227 Backup your production.ini file now. 242 Backup your production.ini file now.
228 243
229 Then, run:: 244 Then run::
230 245
231 paster make-config Kallithea production.ini 246 paster make-config Kallithea production.ini
232 247
233 Look for changes and update your production.ini accordingly. 248 Look for changes and update your production.ini accordingly.
234 249
235 Then, update the database:: 250 Next, update the database::
236 251
237 paster upgrade-db production.ini 252 paster upgrade-db production.ini
238 253
239 Full steps in `<upgrade.html>`_ 254 More details can be found in `<upgrade.html>`_.