##// END OF EJS Templates
docs: reminder to add c:\path\to\git\bin to PATH
domruf -
r5938:d9e6e489 default
parent child Browse files
Show More
@@ -1,221 +1,223 b''
1 .. _installation_win:
1 .. _installation_win:
2
2
3 ====================================================
3 ====================================================
4 Installation on Windows (7/Server 2008 R2 and newer)
4 Installation on Windows (7/Server 2008 R2 and newer)
5 ====================================================
5 ====================================================
6
6
7
7
8 First time install
8 First time install
9 ------------------
9 ------------------
10
10
11 Target OS: Windows 7 and newer or Windows Server 2008 R2 and newer
11 Target OS: Windows 7 and newer or Windows Server 2008 R2 and newer
12
12
13 Tested on Windows 8.1, Windows Server 2008 R2 and Windows Server 2012
13 Tested on Windows 8.1, Windows Server 2008 R2 and Windows Server 2012
14
14
15 To install on an older version of Windows, see `<installation_win_old.html>`_
15 To install on an older version of Windows, see `<installation_win_old.html>`_
16
16
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 .. warning:: Python 3.x is not supported.
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 Step 2 -- Python BIN
33 Step 2 -- Python BIN
34 ^^^^^^^^^^^^^^^^^^^^
34 ^^^^^^^^^^^^^^^^^^^^
35
35
36 Add Python BIN folder to the path. This can be done manually (editing
36 Add Python BIN folder to the path. This can be done manually (editing
37 "PATH" environment variable) or by using Windows Support Tools that
37 "PATH" environment variable) or by using Windows Support Tools that
38 come pre-installed in Windows Vista/7 and later.
38 come pre-installed in Windows Vista/7 and later.
39
39
40 Open a CMD and type::
40 Open a CMD and type::
41
41
42 SETX PATH "%PATH%;[your-python-path]" /M
42 SETX PATH "%PATH%;[your-python-path]" /M
43
43
44 Please substitute [your-python-path] with your Python installation
44 Please substitute [your-python-path] with your Python installation
45 path. Typically this is ``C:\\Python27``.
45 path. Typically this is ``C:\\Python27``.
46
46
47 Step 3 -- Install pywin32 extensions
47 Step 3 -- Install pywin32 extensions
48 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49
49
50 Download pywin32 from:
50 Download pywin32 from:
51 http://sourceforge.net/projects/pywin32/files/
51 http://sourceforge.net/projects/pywin32/files/
52
52
53 - Click on "pywin32" folder
53 - Click on "pywin32" folder
54 - Click on the first folder (in this case, Build 219, maybe newer when you try)
54 - Click on the first folder (in this case, Build 219, maybe newer when you try)
55 - Choose the file ending with ".amd64-py2.x.exe" (".win32-py2.x.exe"
55 - Choose the file ending with ".amd64-py2.x.exe" (".win32-py2.x.exe"
56 for Win32) where x is the minor version of Python you installed.
56 for Win32) where x is the minor version of Python you installed.
57 When writing this guide, the file was:
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
58 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win-amd64-py2.7.exe/download
59 (x64)
59 (x64)
60 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win32-py2.7.exe/download
60 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win32-py2.7.exe/download
61 (Win32)
61 (Win32)
62
62
63 Step 4 -- Install pip
63 Step 4 -- Install pip
64 ^^^^^^^^^^^^^^^^^^^^^
64 ^^^^^^^^^^^^^^^^^^^^^
65
65
66 pip is a package management system for Python. You will need it to install Kallithea and its dependencies.
66 pip is a package management system for Python. You will need it to install Kallithea and its dependencies.
67
67
68 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 If you installed Python 2.7.9+, you already have it (as long as you ran the installer with admin privileges or disabled UAC).
69
69
70 If it was not installed or if you are using Python>=2.6,<2.7.9:
70 If it was not installed or if you are using Python>=2.6,<2.7.9:
71
71
72 - Go to https://bootstrap.pypa.io
72 - Go to https://bootstrap.pypa.io
73 - Right-click on get-pip.py and choose Saves as...
73 - Right-click on get-pip.py and choose Saves as...
74 - Run "python2 get-pip.py" in the folder where you downloaded get-pip.py (may require admin access).
74 - Run "python2 get-pip.py" in the folder where you downloaded get-pip.py (may require admin access).
75
75
76 .. note::
76 .. note::
77
77
78 See http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows
78 See http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows
79 for details and alternative methods.
79 for details and alternative methods.
80
80
81 Note that pip.exe will be placed inside your Python installation's
81 Note that pip.exe will be placed inside your Python installation's
82 Scripts folder, which is likely not on your path. To correct this,
82 Scripts folder, which is likely not on your path. To correct this,
83 open a CMD and type::
83 open a CMD and type::
84
84
85 SETX PATH "%PATH%;[your-python-path]\Scripts" /M
85 SETX PATH "%PATH%;[your-python-path]\Scripts" /M
86
86
87 Step 5 -- Kallithea folder structure
87 Step 5 -- Kallithea folder structure
88 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
89
89
90 Create a Kallithea folder structure.
90 Create a Kallithea folder structure.
91
91
92 This is only an example to install Kallithea. Of course, you can
92 This is only an example to install Kallithea. Of course, you can
93 change it. However, this guide will follow the proposed structure, so
93 change it. However, this guide will follow the proposed structure, so
94 please later adapt the paths if you change them. Folders without
94 please later adapt the paths if you change them. Folders without
95 spaces are recommended.
95 spaces are recommended.
96
96
97 Create the following folder structure::
97 Create the following folder structure::
98
98
99 C:\Kallithea
99 C:\Kallithea
100 C:\Kallithea\Bin
100 C:\Kallithea\Bin
101 C:\Kallithea\Env
101 C:\Kallithea\Env
102 C:\Kallithea\Repos
102 C:\Kallithea\Repos
103
103
104 Step 6 -- Install virtualenv
104 Step 6 -- Install virtualenv
105 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
105 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106
106
107 .. note::
107 .. note::
108 A python virtual environment will allow for isolation between the Python packages of your system and those used for Kallithea.
108 A python virtual environment will allow for isolation between the Python packages of your system and those used for Kallithea.
109 It is strongly recommended to use it to ensure that Kallithea does not change a dependency that other software uses or vice versa.
109 It is strongly recommended to use it to ensure that Kallithea does not change a dependency that other software uses or vice versa.
110
110
111 In a command prompt type::
111 In a command prompt type::
112
112
113 pip install virtualenv
113 pip install virtualenv
114
114
115 Virtualenv will now be inside your Python Scripts path (C:\\Python27\\Scripts or similar).
115 Virtualenv will now be inside your Python Scripts path (C:\\Python27\\Scripts or similar).
116
116
117 To create a virtual environment, run::
117 To create a virtual environment, run::
118
118
119 virtualenv C:\Kallithea\Env
119 virtualenv C:\Kallithea\Env
120
120
121 Step 7 -- Install Kallithea
121 Step 7 -- Install Kallithea
122 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
122 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
123
123
124 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 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.
125 Some Python packages use managed code and need to be compiled.
125 Some Python packages use managed code and need to be compiled.
126 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 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.
127
127
128 Download and install "Microsoft Visual C++ Compiler for Python 2.7" from http://aka.ms/vcpython27
128 Download and install "Microsoft Visual C++ Compiler for Python 2.7" from http://aka.ms/vcpython27
129
129
130 .. note::
130 .. note::
131 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.
131 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.
132
132
133 In a command prompt type (adapting paths if necessary)::
133 In a command prompt type (adapting paths if necessary)::
134
134
135 cd C:\Kallithea\Env\Scripts
135 cd C:\Kallithea\Env\Scripts
136 activate
136 activate
137 pip install --upgrade pip setuptools
137 pip install --upgrade pip setuptools
138
138
139 The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar
139 The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar
140 (depending of your folder structure). Then type::
140 (depending of your folder structure). Then type::
141
141
142 pip install kallithea
142 pip install kallithea
143
143
144 .. note:: This will take some time. Please wait patiently until it is fully
144 .. note:: This will take some time. Please wait patiently until it is fully
145 complete. Some warnings will appear. Don't worry, they are
145 complete. Some warnings will appear. Don't worry, they are
146 normal.
146 normal.
147
147
148 Step 8 -- Install git (optional)
148 Step 8 -- Install Git (optional)
149 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
149 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
150
150
151 Mercurial being a python package, it was installed automatically when doing "pip install kallithea".
151 Mercurial being a python package, was installed automatically when doing ``pip install kallithea``.
152
152
153 You need to install git manually if you want Kallithea to be able to host git repositories.
153 You need to install Git manually if you want Kallithea to be able to host Git repositories.
154
155 See http://git-scm.com/book/en/v2/Getting-Started-Installing-Git#Installing-on-Windows for instructions.
154 See http://git-scm.com/book/en/v2/Getting-Started-Installing-Git#Installing-on-Windows for instructions.
155 The location of the Git binaries (like ``c:\path\to\git\bin``) must be
156 added to the ``PATH`` environment variable so ``git.exe`` and other tools like
157 ``gzip.exe`` are available.
156
158
157 Step 9 -- Configuring Kallithea
159 Step 9 -- Configuring Kallithea
158 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
160 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
159
161
160 Steps taken from `<setup.html>`_
162 Steps taken from `<setup.html>`_
161
163
162 You have to use the same command prompt as in Step 7, so if you closed
164 You have to use the same command prompt as in Step 7, so if you closed
163 it, reopen it following the same commands (including the "activate"
165 it, reopen it following the same commands (including the "activate"
164 one). When ready, type::
166 one). When ready, type::
165
167
166 cd C:\Kallithea\Bin
168 cd C:\Kallithea\Bin
167 paster make-config Kallithea production.ini
169 paster make-config Kallithea production.ini
168
170
169 Then you must edit production.ini to fit your needs (IP address, IP
171 Then you must edit production.ini to fit your needs (IP address, IP
170 port, mail settings, database, etc.). `NotePad++`__ or a similar text
172 port, mail settings, database, etc.). `NotePad++`__ or a similar text
171 editor is recommended to properly handle the newline character
173 editor is recommended to properly handle the newline character
172 differences between Unix and Windows.
174 differences between Unix and Windows.
173
175
174 __ http://notepad-plus-plus.org/
176 __ http://notepad-plus-plus.org/
175
177
176 For the sake of simplicity, run it with the default settings. After your edits (if any) in the previous command prompt, type::
178 For the sake of simplicity, run it with the default settings. After your edits (if any) in the previous command prompt, type::
177
179
178 paster setup-db production.ini
180 paster setup-db production.ini
179
181
180 .. warning:: This time a *new* database will be installed. You must
182 .. warning:: This time a *new* database will be installed. You must
181 follow a different process to later :ref:`upgrade <upgrade>`
183 follow a different process to later :ref:`upgrade <upgrade>`
182 to a newer Kallithea version.
184 to a newer Kallithea version.
183
185
184 The script will ask you for confirmation about creating a new database, answer yes (y)
186 The script will ask you for confirmation about creating a new database, answer yes (y)
185
187
186 The script will ask you for the repository path, answer C:\\Kallithea\\Repos (or similar).
188 The script will ask you for the repository path, answer C:\\Kallithea\\Repos (or similar).
187
189
188 The script will ask you for the admin username and password, answer "admin" + "123456" (or whatever you want)
190 The script will ask you for the admin username and password, answer "admin" + "123456" (or whatever you want)
189
191
190 The script will ask you for admin mail, answer "admin@xxxx.com" (or whatever you want).
192 The script will ask you for admin mail, answer "admin@xxxx.com" (or whatever you want).
191
193
192 If you make a mistake and the script doesn't end, don't worry: start it again.
194 If you make a mistake and the script doesn't end, don't worry: start it again.
193
195
194 If you decided not to install git, you will get errors about it that you can ignore.
196 If you decided not to install Git, you will get errors about it that you can ignore.
195
197
196 Step 10 -- Running Kallithea
198 Step 10 -- Running Kallithea
197 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
199 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
198
200
199 In the previous command prompt, being in the C:\\Kallithea\\Bin folder, type::
201 In the previous command prompt, being in the C:\\Kallithea\\Bin folder, type::
200
202
201 paster serve production.ini
203 paster serve production.ini
202
204
203 Open your web server, and go to http://127.0.0.1:5000
205 Open your web server, and go to http://127.0.0.1:5000
204
206
205 It works!! :-)
207 It works!! :-)
206
208
207 Remark:
209 Remark:
208 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.
210 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.
209
211
210 What this guide does not cover:
212 What this guide does not cover:
211
213
212 - Installing Celery
214 - Installing Celery
213 - Running Kallithea as a Windows Service. You can investigate here:
215 - Running Kallithea as a Windows Service. You can investigate here:
214
216
215 - http://pypi.python.org/pypi/wsgisvc
217 - http://pypi.python.org/pypi/wsgisvc
216 - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/
218 - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/
217 - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service
219 - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service
218
220
219 - Using Apache. You can investigate here:
221 - Using Apache. You can investigate here:
220
222
221 - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4
223 - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4
General Comments 0
You need to be logged in to leave comments. Login now