Show More
@@ -1,159 +1,160 b'' | |||||
1 | .. _contributing: |
|
1 | .. _contributing: | |
2 |
|
2 | |||
3 | ========================= |
|
3 | ========================= | |
4 | Contributing to Kallithea |
|
4 | Contributing to Kallithea | |
5 | ========================= |
|
5 | ========================= | |
6 |
|
6 | |||
7 | Kallithea is developed and maintained by its users. Please join us and scratch |
|
7 | Kallithea is developed and maintained by its users. Please join us and scratch | |
8 | your own itch. |
|
8 | your own itch. | |
9 |
|
9 | |||
10 |
|
10 | |||
11 | Infrastructure |
|
11 | Infrastructure | |
12 | -------------- |
|
12 | -------------- | |
13 |
|
13 | |||
14 | The main repository is hosted on Our Own Kallithea (aka OOK) at |
|
14 | The main repository is hosted on Our Own Kallithea (aka OOK) at | |
15 | https://kallithea-scm.org/repos/kallithea/, our self-hosted instance |
|
15 | https://kallithea-scm.org/repos/kallithea/, our self-hosted instance | |
16 | of Kallithea. |
|
16 | of Kallithea. | |
17 |
|
17 | |||
18 | For now, we use Bitbucket_ for `pull requests`_ and `issue tracking`_. The |
|
18 | For now, we use Bitbucket_ for `pull requests`_ and `issue tracking`_. The | |
19 | issue tracker is for tracking bugs, not for support, discussion, or ideas -- |
|
19 | issue tracker is for tracking bugs, not for support, discussion, or ideas -- | |
20 | please use the `mailing list`_ or :ref:`IRC <readme>` to reach the community. |
|
20 | please use the `mailing list`_ or :ref:`IRC <readme>` to reach the community. | |
21 |
|
21 | |||
22 | We use Weblate_ to translate the user interface messages into languages other |
|
22 | We use Weblate_ to translate the user interface messages into languages other | |
23 | than English. Join our project on `Hosted Weblate`_ to help us. |
|
23 | than English. Join our project on `Hosted Weblate`_ to help us. | |
24 | To register, you can use your Bitbucket or GitHub account. See :ref:`translations` |
|
24 | To register, you can use your Bitbucket or GitHub account. See :ref:`translations` | |
25 | for more details. |
|
25 | for more details. | |
26 |
|
26 | |||
27 |
|
27 | |||
28 | Getting started |
|
28 | Getting started | |
29 | --------------- |
|
29 | --------------- | |
30 |
|
30 | |||
31 | To get started with development:: |
|
31 | To get started with development:: | |
32 |
|
32 | |||
33 | hg clone https://kallithea-scm.org/repos/kallithea |
|
33 | hg clone https://kallithea-scm.org/repos/kallithea | |
34 | cd kallithea |
|
34 | cd kallithea | |
35 | virtualenv ../kallithea-venv |
|
35 | virtualenv ../kallithea-venv | |
36 | source ../kallithea-venv/bin/activate |
|
36 | source ../kallithea-venv/bin/activate | |
|
37 | pip install --upgrade pip setuptools | |||
37 | python2 setup.py develop |
|
38 | python2 setup.py develop | |
38 | paster make-config Kallithea my.ini |
|
39 | paster make-config Kallithea my.ini | |
39 | paster setup-db my.ini --user=user --email=user@example.com --password=password --repos=/tmp |
|
40 | paster setup-db my.ini --user=user --email=user@example.com --password=password --repos=/tmp | |
40 | paster serve my.ini --reload & |
|
41 | paster serve my.ini --reload & | |
41 | firefox http://127.0.0.1:5000/ |
|
42 | firefox http://127.0.0.1:5000/ | |
42 |
|
43 | |||
43 | You can also start out by forking https://bitbucket.org/conservancy/kallithea |
|
44 | You can also start out by forking https://bitbucket.org/conservancy/kallithea | |
44 | on Bitbucket_ and create a local clone of your own fork. |
|
45 | on Bitbucket_ and create a local clone of your own fork. | |
45 |
|
46 | |||
46 |
|
47 | |||
47 | Running tests |
|
48 | Running tests | |
48 | ------------- |
|
49 | ------------- | |
49 |
|
50 | |||
50 | After finishing your changes make sure all tests pass cleanly. You can run |
|
51 | After finishing your changes make sure all tests pass cleanly. You can run | |
51 | the testsuite running ``nosetests`` from the project root, or if you use tox |
|
52 | the testsuite running ``nosetests`` from the project root, or if you use tox | |
52 | run ``tox`` for Python 2.6--2.7 with multiple database test. |
|
53 | run ``tox`` for Python 2.6--2.7 with multiple database test. | |
53 |
|
54 | |||
54 | When running tests, Kallithea uses `kallithea/tests/test.ini` and populates the |
|
55 | When running tests, Kallithea uses `kallithea/tests/test.ini` and populates the | |
55 | SQLite database specified there. |
|
56 | SQLite database specified there. | |
56 |
|
57 | |||
57 | It is possible to avoid recreating the full test database on each invocation of |
|
58 | It is possible to avoid recreating the full test database on each invocation of | |
58 | the tests, thus eliminating the initial delay. To achieve this, run the tests as:: |
|
59 | the tests, thus eliminating the initial delay. To achieve this, run the tests as:: | |
59 |
|
60 | |||
60 | paster serve kallithea/tests/test.ini --pid-file=test.pid --daemon |
|
61 | paster serve kallithea/tests/test.ini --pid-file=test.pid --daemon | |
61 | KALLITHEA_WHOOSH_TEST_DISABLE=1 KALLITHEA_NO_TMP_PATH=1 nosetests |
|
62 | KALLITHEA_WHOOSH_TEST_DISABLE=1 KALLITHEA_NO_TMP_PATH=1 nosetests | |
62 | kill -9 $(cat test.pid) |
|
63 | kill -9 $(cat test.pid) | |
63 |
|
64 | |||
64 | You can run individual tests by specifying their path as argument to nosetests. |
|
65 | You can run individual tests by specifying their path as argument to nosetests. | |
65 | nosetests also has many more options, see `nosetests -h`. Some useful options |
|
66 | nosetests also has many more options, see `nosetests -h`. Some useful options | |
66 | are:: |
|
67 | are:: | |
67 |
|
68 | |||
68 | -x, --stop Stop running tests after the first error or failure |
|
69 | -x, --stop Stop running tests after the first error or failure | |
69 | -s, --nocapture Don't capture stdout (any stdout output will be |
|
70 | -s, --nocapture Don't capture stdout (any stdout output will be | |
70 | printed immediately) [NOSE_NOCAPTURE] |
|
71 | printed immediately) [NOSE_NOCAPTURE] | |
71 | --failed Run the tests that failed in the last test run. |
|
72 | --failed Run the tests that failed in the last test run. | |
72 |
|
73 | |||
73 |
|
74 | |||
74 | Coding/contribution guidelines |
|
75 | Coding/contribution guidelines | |
75 | ------------------------------ |
|
76 | ------------------------------ | |
76 |
|
77 | |||
77 | Kallithea is GPLv3 and we assume all contributions are made by the |
|
78 | Kallithea is GPLv3 and we assume all contributions are made by the | |
78 | committer/contributor and under GPLv3 unless explicitly stated. We do care a |
|
79 | committer/contributor and under GPLv3 unless explicitly stated. We do care a | |
79 | lot about preservation of copyright and license information for existing code |
|
80 | lot about preservation of copyright and license information for existing code | |
80 | that is brought into the project. |
|
81 | that is brought into the project. | |
81 |
|
82 | |||
82 | We don't have a formal coding/formatting standard. We are currently using a mix |
|
83 | We don't have a formal coding/formatting standard. We are currently using a mix | |
83 | of Mercurial (http://mercurial.selenic.com/wiki/CodingStyle), pep8, and |
|
84 | of Mercurial (http://mercurial.selenic.com/wiki/CodingStyle), pep8, and | |
84 | consistency with existing code. Run whitespacecleanup.sh to avoid stupid |
|
85 | consistency with existing code. Run whitespacecleanup.sh to avoid stupid | |
85 | whitespace noise in your patches. |
|
86 | whitespace noise in your patches. | |
86 |
|
87 | |||
87 | We support both Python 2.6.x and 2.7.x and nothing else. For now we don't care |
|
88 | We support both Python 2.6.x and 2.7.x and nothing else. For now we don't care | |
88 | about Python 3 compatibility. |
|
89 | about Python 3 compatibility. | |
89 |
|
90 | |||
90 | We try to support the most common modern web browsers. IE9 is still supported |
|
91 | We try to support the most common modern web browsers. IE9 is still supported | |
91 | to the extent it is feasible, IE8 is not. |
|
92 | to the extent it is feasible, IE8 is not. | |
92 |
|
93 | |||
93 | We primarily support Linux and OS X on the server side but Windows should also work. |
|
94 | We primarily support Linux and OS X on the server side but Windows should also work. | |
94 |
|
95 | |||
95 | HTML templates should use 2 spaces for indentation ... but be pragmatic. We |
|
96 | HTML templates should use 2 spaces for indentation ... but be pragmatic. We | |
96 | should use templates cleverly and avoid duplication. We should use reasonable |
|
97 | should use templates cleverly and avoid duplication. We should use reasonable | |
97 | semantic markup with element classes and IDs that can be used for styling and testing. |
|
98 | semantic markup with element classes and IDs that can be used for styling and testing. | |
98 | We should only use inline styles in places where it really is semantic (such as |
|
99 | We should only use inline styles in places where it really is semantic (such as | |
99 | ``display: none``). |
|
100 | ``display: none``). | |
100 |
|
101 | |||
101 | JavaScript must use ``;`` between/after statements. Indentation 4 spaces. Inline |
|
102 | JavaScript must use ``;`` between/after statements. Indentation 4 spaces. Inline | |
102 | multiline functions should be indented two levels -- one for the ``()`` and one for |
|
103 | multiline functions should be indented two levels -- one for the ``()`` and one for | |
103 | ``{}``. |
|
104 | ``{}``. | |
104 | Variables holding jQuery objects should be named with a leading ``$``. |
|
105 | Variables holding jQuery objects should be named with a leading ``$``. | |
105 |
|
106 | |||
106 | Commit messages should have a leading short line summarizing the changes. For |
|
107 | Commit messages should have a leading short line summarizing the changes. For | |
107 | bug fixes, put ``(Issue #123)`` at the end of this line. |
|
108 | bug fixes, put ``(Issue #123)`` at the end of this line. | |
108 |
|
109 | |||
109 | Use American English grammar and spelling overall. Use `English title case`_ for |
|
110 | Use American English grammar and spelling overall. Use `English title case`_ for | |
110 | page titles, button labels, headers, and 'labels' for fields in forms. |
|
111 | page titles, button labels, headers, and 'labels' for fields in forms. | |
111 |
|
112 | |||
112 | .. _English title case: https://en.wikipedia.org/wiki/Capitalization#Title_case |
|
113 | .. _English title case: https://en.wikipedia.org/wiki/Capitalization#Title_case | |
113 |
|
114 | |||
114 | Contributions will be accepted in most formats -- such as pull requests on |
|
115 | Contributions will be accepted in most formats -- such as pull requests on | |
115 | bitbucket, something hosted on your own Kallithea instance, or patches sent by |
|
116 | bitbucket, something hosted on your own Kallithea instance, or patches sent by | |
116 | email to the `kallithea-general`_ mailing list. |
|
117 | email to the `kallithea-general`_ mailing list. | |
117 |
|
118 | |||
118 | Make sure to test your changes both manually and with the automatic tests |
|
119 | Make sure to test your changes both manually and with the automatic tests | |
119 | before posting. |
|
120 | before posting. | |
120 |
|
121 | |||
121 | We care about quality and review and keeping a clean repository history. We |
|
122 | We care about quality and review and keeping a clean repository history. We | |
122 | might give feedback that requests polishing contributions until they are |
|
123 | might give feedback that requests polishing contributions until they are | |
123 | "perfect". We might also rebase and collapse and make minor adjustments to your |
|
124 | "perfect". We might also rebase and collapse and make minor adjustments to your | |
124 | changes when we apply them. |
|
125 | changes when we apply them. | |
125 |
|
126 | |||
126 | We try to make sure we have consensus on the direction the project is taking. |
|
127 | We try to make sure we have consensus on the direction the project is taking. | |
127 | Everything non-sensitive should be discussed in public -- preferably on the |
|
128 | Everything non-sensitive should be discussed in public -- preferably on the | |
128 | mailing list. We aim at having all non-trivial changes reviewed by at least |
|
129 | mailing list. We aim at having all non-trivial changes reviewed by at least | |
129 | one other core developer before pushing. Obvious non-controversial changes will |
|
130 | one other core developer before pushing. Obvious non-controversial changes will | |
130 | be handled more casually. |
|
131 | be handled more casually. | |
131 |
|
132 | |||
132 | For now we just have one official branch ("default") and will keep it so stable |
|
133 | For now we just have one official branch ("default") and will keep it so stable | |
133 | that it can be (and is) used in production. Experimental changes should live |
|
134 | that it can be (and is) used in production. Experimental changes should live | |
134 | elsewhere (for example in a pull request) until they are ready. |
|
135 | elsewhere (for example in a pull request) until they are ready. | |
135 |
|
136 | |||
136 | .. _translations: |
|
137 | .. _translations: | |
137 | .. include:: ./../kallithea/i18n/how_to |
|
138 | .. include:: ./../kallithea/i18n/how_to | |
138 |
|
139 | |||
139 |
|
140 | |||
140 | "Roadmap" |
|
141 | "Roadmap" | |
141 | --------- |
|
142 | --------- | |
142 |
|
143 | |||
143 | We do not have a road map but are waiting for your contributions. Refer to the |
|
144 | We do not have a road map but are waiting for your contributions. Refer to the | |
144 | wiki_ for some ideas of places we might want to go -- contributions in these |
|
145 | wiki_ for some ideas of places we might want to go -- contributions in these | |
145 | areas are very welcome. |
|
146 | areas are very welcome. | |
146 |
|
147 | |||
147 |
|
148 | |||
148 | Thank you for your contribution! |
|
149 | Thank you for your contribution! | |
149 | -------------------------------- |
|
150 | -------------------------------- | |
150 |
|
151 | |||
151 |
|
152 | |||
152 | .. _Weblate: http://weblate.org/ |
|
153 | .. _Weblate: http://weblate.org/ | |
153 | .. _issue tracking: https://bitbucket.org/conservancy/kallithea/issues?status=new&status=open |
|
154 | .. _issue tracking: https://bitbucket.org/conservancy/kallithea/issues?status=new&status=open | |
154 | .. _pull requests: https://bitbucket.org/conservancy/kallithea/pull-requests |
|
155 | .. _pull requests: https://bitbucket.org/conservancy/kallithea/pull-requests | |
155 | .. _bitbucket: http://bitbucket.org/ |
|
156 | .. _bitbucket: http://bitbucket.org/ | |
156 | .. _mailing list: http://lists.sfconservancy.org/mailman/listinfo/kallithea-general |
|
157 | .. _mailing list: http://lists.sfconservancy.org/mailman/listinfo/kallithea-general | |
157 | .. _kallithea-general: http://lists.sfconservancy.org/mailman/listinfo/kallithea-general |
|
158 | .. _kallithea-general: http://lists.sfconservancy.org/mailman/listinfo/kallithea-general | |
158 | .. _Hosted Weblate: https://hosted.weblate.org/projects/kallithea/kallithea/ |
|
159 | .. _Hosted Weblate: https://hosted.weblate.org/projects/kallithea/kallithea/ | |
159 | .. _wiki: https://bitbucket.org/conservancy/kallithea/wiki/Home |
|
160 | .. _wiki: https://bitbucket.org/conservancy/kallithea/wiki/Home |
@@ -1,200 +1,203 b'' | |||||
1 | .. _installation: |
|
1 | .. _installation: | |
2 |
|
2 | |||
3 | ========================== |
|
3 | ========================== | |
4 | Installation on Unix/Linux |
|
4 | Installation on Unix/Linux | |
5 | ========================== |
|
5 | ========================== | |
6 |
|
6 | |||
7 | The following describes three different ways of installing Kallithea: |
|
7 | The following describes three different ways of installing Kallithea: | |
8 |
|
8 | |||
9 | - :ref:`installation-source`: The simplest way to keep the installation |
|
9 | - :ref:`installation-source`: The simplest way to keep the installation | |
10 | up-to-date and track any local customizations is to run directly from |
|
10 | up-to-date and track any local customizations is to run directly from | |
11 | source in a Kallithea repository clone, preferably inside a virtualenv |
|
11 | source in a Kallithea repository clone, preferably inside a virtualenv | |
12 | virtual Python environment. |
|
12 | virtual Python environment. | |
13 |
|
13 | |||
14 | - :ref:`installation-virtualenv`: If you prefer to only use released versions |
|
14 | - :ref:`installation-virtualenv`: If you prefer to only use released versions | |
15 | of Kallithea, the recommended method is to install Kallithea in a virtual |
|
15 | of Kallithea, the recommended method is to install Kallithea in a virtual | |
16 | Python environment using `virtualenv`. The advantages of this method over |
|
16 | Python environment using `virtualenv`. The advantages of this method over | |
17 | direct installation is that Kallithea and its dependencies are completely |
|
17 | direct installation is that Kallithea and its dependencies are completely | |
18 | contained inside the virtualenv (which also means you can have multiple |
|
18 | contained inside the virtualenv (which also means you can have multiple | |
19 | installations side by side or remove it entirely by just removing the |
|
19 | installations side by side or remove it entirely by just removing the | |
20 | virtualenv directory) and does not require root privileges. |
|
20 | virtualenv directory) and does not require root privileges. | |
21 |
|
21 | |||
22 | - :ref:`installation-without-virtualenv`: The alternative method of installing |
|
22 | - :ref:`installation-without-virtualenv`: The alternative method of installing | |
23 | a Kallithea release is using standard pip. The package will be installed in |
|
23 | a Kallithea release is using standard pip. The package will be installed in | |
24 | the same location as all other Python packages you have ever installed. As a |
|
24 | the same location as all other Python packages you have ever installed. As a | |
25 | result, removing it is not as straightforward as with a virtualenv, as you'd |
|
25 | result, removing it is not as straightforward as with a virtualenv, as you'd | |
26 | have to remove its dependencies manually and make sure that they are not |
|
26 | have to remove its dependencies manually and make sure that they are not | |
27 | needed by other packages. |
|
27 | needed by other packages. | |
28 |
|
28 | |||
29 | .. _installation-source: |
|
29 | .. _installation-source: | |
30 |
|
30 | |||
31 |
|
31 | |||
32 | Installation from repository source |
|
32 | Installation from repository source | |
33 | ----------------------------------- |
|
33 | ----------------------------------- | |
34 |
|
34 | |||
35 | To install Kallithea in a virtualenv_ using the stable branch of the development |
|
35 | To install Kallithea in a virtualenv_ using the stable branch of the development | |
36 | repository, follow the instructions below:: |
|
36 | repository, follow the instructions below:: | |
37 |
|
37 | |||
38 | hg clone https://kallithea-scm.org/repos/kallithea -u stable |
|
38 | hg clone https://kallithea-scm.org/repos/kallithea -u stable | |
39 | cd kallithea |
|
39 | cd kallithea | |
40 | virtualenv ../kallithea-venv |
|
40 | virtualenv ../kallithea-venv | |
41 | source ../kallithea-venv/bin/activate |
|
41 | source ../kallithea-venv/bin/activate | |
|
42 | pip install --upgrade pip setuptools | |||
42 | python2 setup.py develop |
|
43 | python2 setup.py develop | |
43 | python2 setup.py compile_catalog # for translation of the UI |
|
44 | python2 setup.py compile_catalog # for translation of the UI | |
44 |
|
45 | |||
45 | You can now proceed to :ref:`setup`. |
|
46 | You can now proceed to :ref:`setup`. | |
46 |
|
47 | |||
47 | To upgrade, simply update the repository with ``hg pull -u`` and restart the |
|
48 | To upgrade, simply update the repository with ``hg pull -u`` and restart the | |
48 | server. |
|
49 | server. | |
49 |
|
50 | |||
50 | .. _installation-virtualenv: |
|
51 | .. _installation-virtualenv: | |
51 |
|
52 | |||
52 |
|
53 | |||
53 | Installing a released version in a virtualenv |
|
54 | Installing a released version in a virtualenv | |
54 | --------------------------------------------- |
|
55 | --------------------------------------------- | |
55 |
|
56 | |||
56 | It is highly recommended to use a separate virtualenv_ for installing Kallithea. |
|
57 | It is highly recommended to use a separate virtualenv_ for installing Kallithea. | |
57 | This way, all libraries required by Kallithea will be installed separately from your |
|
58 | This way, all libraries required by Kallithea will be installed separately from your | |
58 | main Python installation and other applications and things will be less |
|
59 | main Python installation and other applications and things will be less | |
59 | problematic when upgrading the system or Kallithea. |
|
60 | problematic when upgrading the system or Kallithea. | |
60 | An additional benefit of virtualenv_ is that it doesn't require root privileges. |
|
61 | An additional benefit of virtualenv_ is that it doesn't require root privileges. | |
61 |
|
62 | |||
62 | - Assuming you have installed virtualenv_, create a new virtual environment |
|
63 | - Assuming you have installed virtualenv_, create a new virtual environment | |
63 | for example, in `/srv/kallithea/venv`, using the virtualenv command:: |
|
64 | for example, in `/srv/kallithea/venv`, using the virtualenv command:: | |
64 |
|
65 | |||
65 | virtualenv /srv/kallithea/venv |
|
66 | virtualenv /srv/kallithea/venv | |
66 |
|
67 | |||
67 |
- Activate the virtualenv_ in your current shell session |
|
68 | - Activate the virtualenv_ in your current shell session and make sure the | |
|
69 | basic requirements are up-to-date by running:: | |||
68 |
|
70 | |||
69 | source /srv/kallithea/venv/bin/activate |
|
71 | source /srv/kallithea/venv/bin/activate | |
|
72 | pip install --upgrade pip setuptools | |||
70 |
|
73 | |||
71 | .. note:: You can't use UNIX ``sudo`` to source the ``virtualenv`` script; it |
|
74 | .. note:: You can't use UNIX ``sudo`` to source the ``virtualenv`` script; it | |
72 | will "activate" a shell that terminates immediately. It is also perfectly |
|
75 | will "activate" a shell that terminates immediately. It is also perfectly | |
73 | acceptable (and desirable) to create a virtualenv as a normal user. |
|
76 | acceptable (and desirable) to create a virtualenv as a normal user. | |
74 |
|
77 | |||
75 | - Make a folder for Kallithea data files, and configuration somewhere on the |
|
78 | - Make a folder for Kallithea data files, and configuration somewhere on the | |
76 | filesystem. For example:: |
|
79 | filesystem. For example:: | |
77 |
|
80 | |||
78 | mkdir /srv/kallithea |
|
81 | mkdir /srv/kallithea | |
79 |
|
82 | |||
80 | - Go into the created directory and run this command to install Kallithea:: |
|
83 | - Go into the created directory and run this command to install Kallithea:: | |
81 |
|
84 | |||
82 | pip install kallithea |
|
85 | pip install kallithea | |
83 |
|
86 | |||
84 | Alternatively, download a .tar.gz from http://pypi.python.org/pypi/Kallithea, |
|
87 | Alternatively, download a .tar.gz from http://pypi.python.org/pypi/Kallithea, | |
85 | extract it and run:: |
|
88 | extract it and run:: | |
86 |
|
89 | |||
87 | python2 setup.py install |
|
90 | python2 setup.py install | |
88 |
|
91 | |||
89 | - This will install Kallithea together with pylons_ and all other required |
|
92 | - This will install Kallithea together with pylons_ and all other required | |
90 | python libraries into the activated virtualenv. |
|
93 | python libraries into the activated virtualenv. | |
91 |
|
94 | |||
92 | You can now proceed to :ref:`setup`. |
|
95 | You can now proceed to :ref:`setup`. | |
93 |
|
96 | |||
94 | .. _installation-without-virtualenv: |
|
97 | .. _installation-without-virtualenv: | |
95 |
|
98 | |||
96 |
|
99 | |||
97 | Installing a released version without virtualenv |
|
100 | Installing a released version without virtualenv | |
98 | ------------------------------------------------ |
|
101 | ------------------------------------------------ | |
99 |
|
102 | |||
100 | For installation without virtualenv, 'just' use:: |
|
103 | For installation without virtualenv, 'just' use:: | |
101 |
|
104 | |||
102 | pip install kallithea |
|
105 | pip install kallithea | |
103 |
|
106 | |||
104 | Note that this method requires root privileges and will install packages |
|
107 | Note that this method requires root privileges and will install packages | |
105 | globally without using the system's package manager. |
|
108 | globally without using the system's package manager. | |
106 |
|
109 | |||
107 | To install as a regular user in ``~/.local``, you can use:: |
|
110 | To install as a regular user in ``~/.local``, you can use:: | |
108 |
|
111 | |||
109 | pip install --user kallithea |
|
112 | pip install --user kallithea | |
110 |
|
113 | |||
111 | You can now proceed to :ref:`setup`. |
|
114 | You can now proceed to :ref:`setup`. | |
112 |
|
115 | |||
113 |
|
116 | |||
114 | Upgrading Kallithea from Python Package Index (PyPI) |
|
117 | Upgrading Kallithea from Python Package Index (PyPI) | |
115 | ---------------------------------------------------- |
|
118 | ---------------------------------------------------- | |
116 |
|
119 | |||
117 | .. note:: |
|
120 | .. note:: | |
118 | It is strongly recommended that you **always** perform a database and |
|
121 | It is strongly recommended that you **always** perform a database and | |
119 | configuration backup before doing an upgrade. |
|
122 | configuration backup before doing an upgrade. | |
120 |
|
123 | |||
121 | These directions will use '{version}' to note that this is the version of |
|
124 | These directions will use '{version}' to note that this is the version of | |
122 | Kallithea that these files were used with. If backing up your Kallithea |
|
125 | Kallithea that these files were used with. If backing up your Kallithea | |
123 | instance from version 0.1 to 0.2, the ``my.ini`` file could be |
|
126 | instance from version 0.1 to 0.2, the ``my.ini`` file could be | |
124 | backed up to ``my.ini.0-1``. |
|
127 | backed up to ``my.ini.0-1``. | |
125 |
|
128 | |||
126 | If using a SQLite database, stop the Kallithea process/daemon/service, and |
|
129 | If using a SQLite database, stop the Kallithea process/daemon/service, and | |
127 | then make a copy of the database file:: |
|
130 | then make a copy of the database file:: | |
128 |
|
131 | |||
129 | service kallithea stop |
|
132 | service kallithea stop | |
130 | cp kallithea.db kallithea.db.{version} |
|
133 | cp kallithea.db kallithea.db.{version} | |
131 |
|
134 | |||
132 | Back up your configuration file:: |
|
135 | Back up your configuration file:: | |
133 |
|
136 | |||
134 | cp my.ini my.ini.{version} |
|
137 | cp my.ini my.ini.{version} | |
135 |
|
138 | |||
136 | Ensure that you are using the Python virtual environment that you originally |
|
139 | Ensure that you are using the Python virtual environment that you originally | |
137 | installed Kallithea in by running:: |
|
140 | installed Kallithea in by running:: | |
138 |
|
141 | |||
139 | pip freeze |
|
142 | pip freeze | |
140 |
|
143 | |||
141 | This will list all packages installed in the current environment. If |
|
144 | This will list all packages installed in the current environment. If | |
142 | Kallithea isn't listed, activate the correct virtual environment:: |
|
145 | Kallithea isn't listed, activate the correct virtual environment:: | |
143 |
|
146 | |||
144 | source /srv/kallithea/venv/bin/activate |
|
147 | source /srv/kallithea/venv/bin/activate | |
145 |
|
148 | |||
146 | Once you have verified the environment you can upgrade Kallithea with:: |
|
149 | Once you have verified the environment you can upgrade Kallithea with:: | |
147 |
|
150 | |||
148 | pip install --upgrade kallithea |
|
151 | pip install --upgrade kallithea | |
149 |
|
152 | |||
150 | Then run the following command from the installation directory:: |
|
153 | Then run the following command from the installation directory:: | |
151 |
|
154 | |||
152 | paster make-config Kallithea my.ini |
|
155 | paster make-config Kallithea my.ini | |
153 |
|
156 | |||
154 | This will display any changes made by the new version of Kallithea to your |
|
157 | This will display any changes made by the new version of Kallithea to your | |
155 | current configuration. It will try to perform an automerge. It is recommended |
|
158 | current configuration. It will try to perform an automerge. It is recommended | |
156 | that you recheck the content after the automerge. |
|
159 | that you recheck the content after the automerge. | |
157 |
|
160 | |||
158 | .. note:: |
|
161 | .. note:: | |
159 | Please always make sure your .ini files are up to date. Errors can |
|
162 | Please always make sure your .ini files are up to date. Errors can | |
160 | often be caused by missing parameters added in new versions. |
|
163 | often be caused by missing parameters added in new versions. | |
161 |
|
164 | |||
162 | It is also recommended that you rebuild the whoosh index after upgrading since |
|
165 | It is also recommended that you rebuild the whoosh index after upgrading since | |
163 | the new whoosh version could introduce some incompatible index changes. Please |
|
166 | the new whoosh version could introduce some incompatible index changes. Please | |
164 | read the changelog to see if there were any changes to whoosh. |
|
167 | read the changelog to see if there were any changes to whoosh. | |
165 |
|
168 | |||
166 | The final step is to upgrade the database. To do this simply run:: |
|
169 | The final step is to upgrade the database. To do this simply run:: | |
167 |
|
170 | |||
168 | paster upgrade-db my.ini |
|
171 | paster upgrade-db my.ini | |
169 |
|
172 | |||
170 | This will upgrade the schema and update some of the defaults in the database, |
|
173 | This will upgrade the schema and update some of the defaults in the database, | |
171 | and will always recheck the settings of the application, if there are no new |
|
174 | and will always recheck the settings of the application, if there are no new | |
172 | options that need to be set. |
|
175 | options that need to be set. | |
173 |
|
176 | |||
174 | .. note:: |
|
177 | .. note:: | |
175 | The DB schema upgrade library has some limitations and can sometimes fail if you try to |
|
178 | The DB schema upgrade library has some limitations and can sometimes fail if you try to | |
176 | upgrade from older major releases. In such a case simply run upgrades sequentially, e.g., |
|
179 | upgrade from older major releases. In such a case simply run upgrades sequentially, e.g., | |
177 | upgrading from 0.1.X to 0.3.X should be done like this: 0.1.X. > 0.2.X > 0.3.X |
|
180 | upgrading from 0.1.X to 0.3.X should be done like this: 0.1.X. > 0.2.X > 0.3.X | |
178 | You can always specify what version of Kallithea you want to install for example in pip |
|
181 | You can always specify what version of Kallithea you want to install for example in pip | |
179 | `pip install Kallithea==0.2` |
|
182 | `pip install Kallithea==0.2` | |
180 |
|
183 | |||
181 | You may find it helpful to clear out your log file so that new errors are |
|
184 | You may find it helpful to clear out your log file so that new errors are | |
182 | readily apparent:: |
|
185 | readily apparent:: | |
183 |
|
186 | |||
184 | echo > kallithea.log |
|
187 | echo > kallithea.log | |
185 |
|
188 | |||
186 | Once that is complete, you may now start your upgraded Kallithea Instance:: |
|
189 | Once that is complete, you may now start your upgraded Kallithea Instance:: | |
187 |
|
190 | |||
188 | service kallithea start |
|
191 | service kallithea start | |
189 |
|
192 | |||
190 | Or:: |
|
193 | Or:: | |
191 |
|
194 | |||
192 | paster serve /srv/kallithea/my.ini |
|
195 | paster serve /srv/kallithea/my.ini | |
193 |
|
196 | |||
194 | .. note:: |
|
197 | .. note:: | |
195 | If you're using Celery, make sure you restart all instances of it after |
|
198 | If you're using Celery, make sure you restart all instances of it after | |
196 | upgrade. |
|
199 | upgrade. | |
197 |
|
200 | |||
198 |
|
201 | |||
199 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv |
|
202 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv | |
200 | .. _pylons: http://www.pylonsproject.org/ |
|
203 | .. _pylons: http://www.pylonsproject.org/ |
@@ -1,244 +1,245 b'' | |||||
1 | .. _installation_win: |
|
1 | .. _installation_win: | |
2 |
|
2 | |||
3 | ================================================================ |
|
3 | ================================================================ | |
4 | Installation and upgrade on Windows (7/Server 2008 R2 and newer) |
|
4 | Installation and upgrade 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 |
|
138 | |||
138 | 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 | |
139 | (depending of your folder structure). Then type:: |
|
140 | (depending of your folder structure). Then type:: | |
140 |
|
141 | |||
141 | pip install kallithea |
|
142 | pip install kallithea | |
142 |
|
143 | |||
143 | .. 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 | |
144 | complete. Some warnings will appear. Don't worry, they are |
|
145 | complete. Some warnings will appear. Don't worry, they are | |
145 | normal. |
|
146 | normal. | |
146 |
|
147 | |||
147 | Step 8 -- Install git (optional) |
|
148 | Step 8 -- Install git (optional) | |
148 | -------------------------------- |
|
149 | -------------------------------- | |
149 |
|
150 | |||
150 | Mercurial being a python package, it was installed automatically when doing "pip install kallithea". |
|
151 | Mercurial being a python package, it was installed automatically when doing "pip install kallithea". | |
151 |
|
152 | |||
152 | 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. | |
153 |
|
154 | |||
154 | See http://git-scm.com/book/en/v2/Getting-Started-Installing-Git#Installing-on-Windows for instructions. |
|
155 | See http://git-scm.com/book/en/v2/Getting-Started-Installing-Git#Installing-on-Windows for instructions. | |
155 |
|
156 | |||
156 | Step 9 -- Configuring Kallithea |
|
157 | Step 9 -- Configuring Kallithea | |
157 | ------------------------------- |
|
158 | ------------------------------- | |
158 |
|
159 | |||
159 | Steps taken from `<setup.html>`_ |
|
160 | Steps taken from `<setup.html>`_ | |
160 |
|
161 | |||
161 | You have to use the same command prompt as in Step 7, so if you closed |
|
162 | You have to use the same command prompt as in Step 7, so if you closed | |
162 | it, reopen it following the same commands (including the "activate" |
|
163 | it, reopen it following the same commands (including the "activate" | |
163 | one). When ready, type:: |
|
164 | one). When ready, type:: | |
164 |
|
165 | |||
165 | cd C:\Kallithea\Bin |
|
166 | cd C:\Kallithea\Bin | |
166 | paster make-config Kallithea production.ini |
|
167 | paster make-config Kallithea production.ini | |
167 |
|
168 | |||
168 | Then you must edit production.ini to fit your needs (IP address, IP |
|
169 | Then you must edit production.ini to fit your needs (IP address, IP | |
169 | port, mail settings, database, etc.). `NotePad++`__ or a similar text |
|
170 | port, mail settings, database, etc.). `NotePad++`__ or a similar text | |
170 | editor is recommended to properly handle the newline character |
|
171 | editor is recommended to properly handle the newline character | |
171 | differences between Unix and Windows. |
|
172 | differences between Unix and Windows. | |
172 |
|
173 | |||
173 | __ http://notepad-plus-plus.org/ |
|
174 | __ http://notepad-plus-plus.org/ | |
174 |
|
175 | |||
175 | For the sake of simplicity, run it with the default settings. After your edits (if any) in the previous command prompt, type:: |
|
176 | For the sake of simplicity, run it with the default settings. After your edits (if any) in the previous command prompt, type:: | |
176 |
|
177 | |||
177 | paster setup-db production.ini |
|
178 | paster setup-db production.ini | |
178 |
|
179 | |||
179 | .. warning:: This time a *new* database will be installed. You must |
|
180 | .. warning:: This time a *new* database will be installed. You must | |
180 | follow a different step to later *upgrade* to a newer |
|
181 | follow a different step to later *upgrade* to a newer | |
181 | Kallithea version) |
|
182 | Kallithea version) | |
182 |
|
183 | |||
183 | The script will ask you for confirmation about creating a new database, answer yes (y) |
|
184 | The script will ask you for confirmation about creating a new database, answer yes (y) | |
184 |
|
185 | |||
185 | The script will ask you for the repository path, answer C:\\Kallithea\\Repos (or similar). |
|
186 | The script will ask you for the repository path, answer C:\\Kallithea\\Repos (or similar). | |
186 |
|
187 | |||
187 | The script will ask you for the admin username and password, answer "admin" + "123456" (or whatever you want) |
|
188 | The script will ask you for the admin username and password, answer "admin" + "123456" (or whatever you want) | |
188 |
|
189 | |||
189 | The script will ask you for admin mail, answer "admin@xxxx.com" (or whatever you want). |
|
190 | The script will ask you for admin mail, answer "admin@xxxx.com" (or whatever you want). | |
190 |
|
191 | |||
191 | If you make a mistake and the script doesn't end, don't worry: start it again. |
|
192 | If you make a mistake and the script doesn't end, don't worry: start it again. | |
192 |
|
193 | |||
193 | If you decided not to install git, you will get errors about it that you can ignore. |
|
194 | If you decided not to install git, you will get errors about it that you can ignore. | |
194 |
|
195 | |||
195 | Step 10 -- Running Kallithea |
|
196 | Step 10 -- Running Kallithea | |
196 | ---------------------------- |
|
197 | ---------------------------- | |
197 |
|
198 | |||
198 | In the previous command prompt, being in the C:\\Kallithea\\Bin folder, type:: |
|
199 | In the previous command prompt, being in the C:\\Kallithea\\Bin folder, type:: | |
199 |
|
200 | |||
200 | paster serve production.ini |
|
201 | paster serve production.ini | |
201 |
|
202 | |||
202 | Open your web server, and go to http://127.0.0.1:5000 |
|
203 | Open your web server, and go to http://127.0.0.1:5000 | |
203 |
|
204 | |||
204 | It works!! :-) |
|
205 | It works!! :-) | |
205 |
|
206 | |||
206 | Remark: |
|
207 | Remark: | |
207 | 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. |
|
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. | |
208 |
|
209 | |||
209 | What this guide does not cover: |
|
210 | What this guide does not cover: | |
210 |
|
211 | |||
211 | - Installing Celery |
|
212 | - Installing Celery | |
212 | - Running Kallithea as a Windows Service. You can investigate here: |
|
213 | - Running Kallithea as a Windows Service. You can investigate here: | |
213 |
|
214 | |||
214 | - http://pypi.python.org/pypi/wsgisvc |
|
215 | - http://pypi.python.org/pypi/wsgisvc | |
215 | - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/ |
|
216 | - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/ | |
216 | - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service |
|
217 | - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service | |
217 |
|
218 | |||
218 | - Using Apache. You can investigate here: |
|
219 | - Using Apache. You can investigate here: | |
219 |
|
220 | |||
220 | - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4 |
|
221 | - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4 | |
221 |
|
222 | |||
222 |
|
223 | |||
223 | Upgrading |
|
224 | Upgrading | |
224 | ::::::::: |
|
225 | ::::::::: | |
225 |
|
226 | |||
226 | Stop running Kallithea |
|
227 | Stop running Kallithea | |
227 | Open a CommandPrompt like in Step 7 (cd to C:\Kallithea\Env\Scripts and activate) and type:: |
|
228 | Open a CommandPrompt like in Step 7 (cd to C:\Kallithea\Env\Scripts and activate) and type:: | |
228 |
|
229 | |||
229 | pip install kallithea --upgrade |
|
230 | pip install kallithea --upgrade | |
230 | cd \Kallithea\Bin |
|
231 | cd \Kallithea\Bin | |
231 |
|
232 | |||
232 | Backup your production.ini file now. |
|
233 | Backup your production.ini file now. | |
233 |
|
234 | |||
234 | Then run:: |
|
235 | Then run:: | |
235 |
|
236 | |||
236 | paster make-config Kallithea production.ini |
|
237 | paster make-config Kallithea production.ini | |
237 |
|
238 | |||
238 | Look for changes and update your production.ini accordingly. |
|
239 | Look for changes and update your production.ini accordingly. | |
239 |
|
240 | |||
240 | Next, update the database:: |
|
241 | Next, update the database:: | |
241 |
|
242 | |||
242 | paster upgrade-db production.ini |
|
243 | paster upgrade-db production.ini | |
243 |
|
244 | |||
244 | More details can be found in `<upgrade.html>`_. |
|
245 | More details can be found in `<upgrade.html>`_. |
@@ -1,281 +1,282 b'' | |||||
1 | .. _installation_win_old: |
|
1 | .. _installation_win_old: | |
2 |
|
2 | |||
3 | ====================================================================== |
|
3 | ====================================================================== | |
4 | Installation and upgrade on Windows (XP/Vista/Server 2003/Server 2008) |
|
4 | Installation and upgrade on Windows (XP/Vista/Server 2003/Server 2008) | |
5 | ====================================================================== |
|
5 | ====================================================================== | |
6 |
|
6 | |||
7 |
|
7 | |||
8 | First-time install |
|
8 | First-time install | |
9 | :::::::::::::::::: |
|
9 | :::::::::::::::::: | |
10 |
|
10 | |||
11 | Target OS: Windows XP SP3 32-bit English (Clean installation) |
|
11 | Target OS: Windows XP SP3 32-bit English (Clean installation) | |
12 | + All Windows Updates until 24-may-2012 |
|
12 | + All Windows Updates until 24-may-2012 | |
13 |
|
13 | |||
14 | .. note:: |
|
14 | .. note:: | |
15 |
|
15 | |||
16 | This installation is for 32-bit systems, for 64-bit Windows you might need |
|
16 | This installation is for 32-bit systems, for 64-bit Windows you might need | |
17 | to download proper 64-bit versions of the different packages (Windows Installer, Win32py extensions) |
|
17 | to download proper 64-bit versions of the different packages (Windows Installer, Win32py extensions) | |
18 | plus some extra tweaks. |
|
18 | plus some extra tweaks. | |
19 | These extra steps haven been marked as "64-bit". |
|
19 | These extra steps haven been marked as "64-bit". | |
20 | Tested on Windows Server 2008 R2 SP1, 9-feb-2013. |
|
20 | Tested on Windows Server 2008 R2 SP1, 9-feb-2013. | |
21 | If you run into any 64-bit related problems, please check these pages: |
|
21 | If you run into any 64-bit related problems, please check these pages: | |
22 |
|
22 | |||
23 | - http://blog.victorjabur.com/2011/06/05/compiling-python-2-7-modules-on-windows-32-and-64-using-msvc-2008-express/ |
|
23 | - http://blog.victorjabur.com/2011/06/05/compiling-python-2-7-modules-on-windows-32-and-64-using-msvc-2008-express/ | |
24 | - http://bugs.python.org/issue7511 |
|
24 | - http://bugs.python.org/issue7511 | |
25 |
|
25 | |||
26 | Step 1 -- Install Visual Studio 2008 Express |
|
26 | Step 1 -- Install Visual Studio 2008 Express | |
27 | -------------------------------------------- |
|
27 | -------------------------------------------- | |
28 |
|
28 | |||
29 | Optional: You can also install MinGW, but VS2008 installation is easier. |
|
29 | Optional: You can also install MinGW, but VS2008 installation is easier. | |
30 |
|
30 | |||
31 | Download "Visual C++ 2008 Express Edition with SP1" from: |
|
31 | Download "Visual C++ 2008 Express Edition with SP1" from: | |
32 | http://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso |
|
32 | http://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso | |
33 | (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 | (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) | |
34 |
|
34 | |||
35 | You can also download full ISO file for offline installation, just |
|
35 | You can also download full ISO file for offline installation, just | |
36 | choose "All -- Offline Install ISO image file" in the previous page and |
|
36 | choose "All -- Offline Install ISO image file" in the previous page and | |
37 | choose "Visual C++ 2008 Express" when installing. |
|
37 | choose "Visual C++ 2008 Express" when installing. | |
38 |
|
38 | |||
39 | .. note:: |
|
39 | .. note:: | |
40 |
|
40 | |||
41 | Using other versions of Visual Studio will lead to random crashes. |
|
41 | Using other versions of Visual Studio will lead to random crashes. | |
42 | You must use Visual Studio 2008!" |
|
42 | You must use Visual Studio 2008!" | |
43 |
|
43 | |||
44 | .. note:: |
|
44 | .. note:: | |
45 |
|
45 | |||
46 | Silverlight Runtime and SQL Server 2008 Express Edition are not |
|
46 | Silverlight Runtime and SQL Server 2008 Express Edition are not | |
47 | required, you can uncheck them |
|
47 | required, you can uncheck them | |
48 |
|
48 | |||
49 | .. note:: |
|
49 | .. note:: | |
50 |
|
50 | |||
51 | 64-bit: You also need to install the Microsoft Windows SDK for .NET 3.5 SP1 (.NET 4.0 won't work). |
|
51 | 64-bit: You also need to install the Microsoft Windows SDK for .NET 3.5 SP1 (.NET 4.0 won't work). | |
52 | Download from: http://www.microsoft.com/en-us/download/details.aspx?id=3138 |
|
52 | Download from: http://www.microsoft.com/en-us/download/details.aspx?id=3138 | |
53 |
|
53 | |||
54 | .. note:: |
|
54 | .. note:: | |
55 |
|
55 | |||
56 | 64-bit: You also need to copy and rename a .bat file to make the Visual C++ compiler work. |
|
56 | 64-bit: You also need to copy and rename a .bat file to make the Visual C++ compiler work. | |
57 | I am not sure why this is not necessary for 32-bit. |
|
57 | I am not sure why this is not necessary for 32-bit. | |
58 | 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 |
|
58 | 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 | |
59 |
|
59 | |||
60 | Step 2 -- Install Python |
|
60 | Step 2 -- Install Python | |
61 | ------------------------ |
|
61 | ------------------------ | |
62 |
|
62 | |||
63 | Install Python 2.x.y (x = 6 or 7) x86 version (32-bit). DO NOT USE A 3.x version. |
|
63 | Install Python 2.x.y (x = 6 or 7) x86 version (32-bit). DO NOT USE A 3.x version. | |
64 | Download Python 2.x.y from: |
|
64 | Download Python 2.x.y from: | |
65 | http://www.python.org/download/ |
|
65 | http://www.python.org/download/ | |
66 |
|
66 | |||
67 | Choose "Windows Installer" (32-bit version) not "Windows X86-64 |
|
67 | Choose "Windows Installer" (32-bit version) not "Windows X86-64 | |
68 | Installer". While writing this guide, the latest version was v2.7.3. |
|
68 | Installer". While writing this guide, the latest version was v2.7.3. | |
69 | Remember the specific major and minor version installed, because it will |
|
69 | Remember the specific major and minor version installed, because it will | |
70 | be needed in the next step. In this case, it is "2.7". |
|
70 | be needed in the next step. In this case, it is "2.7". | |
71 |
|
71 | |||
72 | .. note:: |
|
72 | .. note:: | |
73 |
|
73 | |||
74 | 64-bit: Just download and install the 64-bit version of python. |
|
74 | 64-bit: Just download and install the 64-bit version of python. | |
75 |
|
75 | |||
76 | Step 3 -- Install Win32py extensions |
|
76 | Step 3 -- Install Win32py extensions | |
77 | ------------------------------------ |
|
77 | ------------------------------------ | |
78 |
|
78 | |||
79 | Download pywin32 from: |
|
79 | Download pywin32 from: | |
80 | http://sourceforge.net/projects/pywin32/files/ |
|
80 | http://sourceforge.net/projects/pywin32/files/ | |
81 |
|
81 | |||
82 | - Click on "pywin32" folder |
|
82 | - Click on "pywin32" folder | |
83 | - Click on the first folder (in this case, Build 217, maybe newer when you try) |
|
83 | - Click on the first folder (in this case, Build 217, maybe newer when you try) | |
84 | - Choose the file ending with ".win32-py2.x.exe" -> x being the minor |
|
84 | - Choose the file ending with ".win32-py2.x.exe" -> x being the minor | |
85 | version of Python you installed (in this case, 7) |
|
85 | version of Python you installed (in this case, 7) | |
86 | When writing this guide, the file was: |
|
86 | When writing this guide, the file was: | |
87 | http://sourceforge.net/projects/pywin32/files/pywin32/Build%20217/pywin32-217.win32-py2.7.exe/download |
|
87 | http://sourceforge.net/projects/pywin32/files/pywin32/Build%20217/pywin32-217.win32-py2.7.exe/download | |
88 |
|
88 | |||
89 | .. note:: |
|
89 | .. note:: | |
90 |
|
90 | |||
91 | 64-bit: Download and install the 64-bit version. |
|
91 | 64-bit: Download and install the 64-bit version. | |
92 | At the time of writing you can find this at: |
|
92 | At the time of writing you can find this at: | |
93 | http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/pywin32-218.win-amd64-py2.7.exe/download |
|
93 | http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/pywin32-218.win-amd64-py2.7.exe/download | |
94 |
|
94 | |||
95 | Step 4 -- Python BIN |
|
95 | Step 4 -- Python BIN | |
96 | -------------------- |
|
96 | -------------------- | |
97 |
|
97 | |||
98 | Add Python BIN folder to the path |
|
98 | Add Python BIN folder to the path | |
99 |
|
99 | |||
100 | You have to add the Python folder to the path, you can do it manually |
|
100 | You have to add the Python folder to the path, you can do it manually | |
101 | (editing "PATH" environment variable) or using Windows Support Tools |
|
101 | (editing "PATH" environment variable) or using Windows Support Tools | |
102 | that came preinstalled in Vista/7 and can be installed in Windows XP. |
|
102 | that came preinstalled in Vista/7 and can be installed in Windows XP. | |
103 |
|
103 | |||
104 | - Using support tools on WINDOWS XP: |
|
104 | - Using support tools on WINDOWS XP: | |
105 | If you use Windows XP you can install them using Windows XP CD and |
|
105 | If you use Windows XP you can install them using Windows XP CD and | |
106 | navigating to \SUPPORT\TOOLS. There, execute Setup.EXE (not MSI). |
|
106 | navigating to \SUPPORT\TOOLS. There, execute Setup.EXE (not MSI). | |
107 | Afterwards, open a CMD and type:: |
|
107 | Afterwards, open a CMD and type:: | |
108 |
|
108 | |||
109 | SETX PATH "%PATH%;[your-python-path]" -M |
|
109 | SETX PATH "%PATH%;[your-python-path]" -M | |
110 |
|
110 | |||
111 | Close CMD (the path variable will be updated then) |
|
111 | Close CMD (the path variable will be updated then) | |
112 |
|
112 | |||
113 | - Using support tools on WINDOWS Vista/7: |
|
113 | - Using support tools on WINDOWS Vista/7: | |
114 |
|
114 | |||
115 | Open a CMD and type:: |
|
115 | Open a CMD and type:: | |
116 |
|
116 | |||
117 | SETX PATH "%PATH%;[your-python-path]" /M |
|
117 | SETX PATH "%PATH%;[your-python-path]" /M | |
118 |
|
118 | |||
119 | Please substitute [your-python-path] with your Python installation path. |
|
119 | Please substitute [your-python-path] with your Python installation path. | |
120 | Typically: C:\\Python27 |
|
120 | Typically: C:\\Python27 | |
121 |
|
121 | |||
122 | Step 5 -- Kallithea folder structure |
|
122 | Step 5 -- Kallithea folder structure | |
123 | ------------------------------------ |
|
123 | ------------------------------------ | |
124 |
|
124 | |||
125 | Create a Kallithea folder structure |
|
125 | Create a Kallithea folder structure | |
126 |
|
126 | |||
127 | This is only a example to install Kallithea, you can of course change |
|
127 | This is only a example to install Kallithea, you can of course change | |
128 | it. However, this guide will follow the proposed structure, so please |
|
128 | it. However, this guide will follow the proposed structure, so please | |
129 | later adapt the paths if you change them. My recommendation is to use |
|
129 | later adapt the paths if you change them. My recommendation is to use | |
130 | folders with NO SPACES. But you can try if you are brave... |
|
130 | folders with NO SPACES. But you can try if you are brave... | |
131 |
|
131 | |||
132 | Create the following folder structure:: |
|
132 | Create the following folder structure:: | |
133 |
|
133 | |||
134 | C:\Kallithea |
|
134 | C:\Kallithea | |
135 | C:\Kallithea\Bin |
|
135 | C:\Kallithea\Bin | |
136 | C:\Kallithea\Env |
|
136 | C:\Kallithea\Env | |
137 | C:\Kallithea\Repos |
|
137 | C:\Kallithea\Repos | |
138 |
|
138 | |||
139 | Step 6 -- Install virtualenv |
|
139 | Step 6 -- Install virtualenv | |
140 | ---------------------------- |
|
140 | ---------------------------- | |
141 |
|
141 | |||
142 | Install Virtual Env for Python |
|
142 | Install Virtual Env for Python | |
143 |
|
143 | |||
144 | Navigate to: http://www.virtualenv.org/en/latest/index.html#installation |
|
144 | Navigate to: http://www.virtualenv.org/en/latest/index.html#installation | |
145 | Right click on "virtualenv.py" file and choose "Save link as...". |
|
145 | Right click on "virtualenv.py" file and choose "Save link as...". | |
146 | Download to C:\\Kallithea (or whatever you want) |
|
146 | Download to C:\\Kallithea (or whatever you want) | |
147 | (the file is located at |
|
147 | (the file is located at | |
148 | https://raw.github.com/pypa/virtualenv/master/virtualenv.py) |
|
148 | https://raw.github.com/pypa/virtualenv/master/virtualenv.py) | |
149 |
|
149 | |||
150 | Create a virtual Python environment in C:\\Kallithea\\Env (or similar). To |
|
150 | Create a virtual Python environment in C:\\Kallithea\\Env (or similar). To | |
151 | do so, open a CMD (Python Path should be included in Step3), navigate |
|
151 | do so, open a CMD (Python Path should be included in Step3), navigate | |
152 | where you downloaded "virtualenv.py", and write:: |
|
152 | where you downloaded "virtualenv.py", and write:: | |
153 |
|
153 | |||
154 | python2 virtualenv.py C:\Kallithea\Env |
|
154 | python2 virtualenv.py C:\Kallithea\Env | |
155 |
|
155 | |||
156 | (--no-site-packages is now the default behaviour of virtualenv, no need |
|
156 | (--no-site-packages is now the default behaviour of virtualenv, no need | |
157 | to include it) |
|
157 | to include it) | |
158 |
|
158 | |||
159 | Step 7 -- Install Kallithea |
|
159 | Step 7 -- Install Kallithea | |
160 | --------------------------- |
|
160 | --------------------------- | |
161 |
|
161 | |||
162 | Finally, install Kallithea |
|
162 | Finally, install Kallithea | |
163 |
|
163 | |||
164 | Close previously opened command prompt/s, and open a Visual Studio 2008 |
|
164 | Close previously opened command prompt/s, and open a Visual Studio 2008 | |
165 | Command Prompt (**IMPORTANT!!**). To do so, go to Start Menu, and then open |
|
165 | Command Prompt (**IMPORTANT!!**). To do so, go to Start Menu, and then open | |
166 | "Microsoft Visual C++ 2008 Express Edition" -> "Visual Studio Tools" -> |
|
166 | "Microsoft Visual C++ 2008 Express Edition" -> "Visual Studio Tools" -> | |
167 | "Visual Studio 2008 Command Prompt" |
|
167 | "Visual Studio 2008 Command Prompt" | |
168 |
|
168 | |||
169 | .. note:: |
|
169 | .. note:: | |
170 |
|
170 | |||
171 | 64-bit: For 64-bit you need to modify the shortcut that is used to start the |
|
171 | 64-bit: For 64-bit you need to modify the shortcut that is used to start the | |
172 | Visual Studio 2008 Command Prompt. Use right-mouse click to open properties. |
|
172 | Visual Studio 2008 Command Prompt. Use right-mouse click to open properties. | |
173 |
|
173 | |||
174 | Change commandline from:: |
|
174 | Change commandline from:: | |
175 |
|
175 | |||
176 | %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" x86 |
|
176 | %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" x86 | |
177 |
|
177 | |||
178 | to:: |
|
178 | to:: | |
179 |
|
179 | |||
180 | %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" amd64 |
|
180 | %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" amd64 | |
181 |
|
181 | |||
182 | In that CMD (loaded with VS2008 PATHs) type:: |
|
182 | In that CMD (loaded with VS2008 PATHs) type:: | |
183 |
|
183 | |||
184 | cd C:\Kallithea\Env\Scripts (or similar) |
|
184 | cd C:\Kallithea\Env\Scripts (or similar) | |
185 | activate |
|
185 | activate | |
|
186 | pip install --upgrade pip setuptools | |||
186 |
|
187 | |||
187 | The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar |
|
188 | The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar | |
188 | (depending of your folder structure). Then type:: |
|
189 | (depending of your folder structure). Then type:: | |
189 |
|
190 | |||
190 | pip install kallithea |
|
191 | pip install kallithea | |
191 |
|
192 | |||
192 | (long step, please wait until fully complete) |
|
193 | (long step, please wait until fully complete) | |
193 |
|
194 | |||
194 | Some warnings will appear, don't worry as they are normal. |
|
195 | Some warnings will appear, don't worry as they are normal. | |
195 |
|
196 | |||
196 | Step 8 -- Configuring Kallithea |
|
197 | Step 8 -- Configuring Kallithea | |
197 | ------------------------------- |
|
198 | ------------------------------- | |
198 |
|
199 | |||
199 | steps taken from http://packages.python.org/Kallithea/setup.html |
|
200 | steps taken from http://packages.python.org/Kallithea/setup.html | |
200 |
|
201 | |||
201 | You have to use the same Visual Studio 2008 command prompt as Step7, so |
|
202 | You have to use the same Visual Studio 2008 command prompt as Step7, so | |
202 | if you closed it reopen it following the same commands (including the |
|
203 | if you closed it reopen it following the same commands (including the | |
203 | "activate" one). When ready, just type:: |
|
204 | "activate" one). When ready, just type:: | |
204 |
|
205 | |||
205 | cd C:\Kallithea\Bin |
|
206 | cd C:\Kallithea\Bin | |
206 | paster make-config Kallithea production.ini |
|
207 | paster make-config Kallithea production.ini | |
207 |
|
208 | |||
208 | Then, you must edit production.ini to fit your needs (network address and |
|
209 | Then, you must edit production.ini to fit your needs (network address and | |
209 | port, mail settings, database, whatever). I recommend using NotePad++ |
|
210 | port, mail settings, database, whatever). I recommend using NotePad++ | |
210 | (free) or similar text editor, as it handles well the EndOfLine |
|
211 | (free) or similar text editor, as it handles well the EndOfLine | |
211 | character differences between Unix and Windows |
|
212 | character differences between Unix and Windows | |
212 | (http://notepad-plus-plus.org/) |
|
213 | (http://notepad-plus-plus.org/) | |
213 |
|
214 | |||
214 | For the sake of simplicity lets run it with the default settings. After |
|
215 | For the sake of simplicity lets run it with the default settings. After | |
215 | your edits (if any), in the previous Command Prompt, type:: |
|
216 | your edits (if any), in the previous Command Prompt, type:: | |
216 |
|
217 | |||
217 | paster setup-db production.ini |
|
218 | paster setup-db production.ini | |
218 |
|
219 | |||
219 | (this time a NEW database will be installed, you must follow a different |
|
220 | (this time a NEW database will be installed, you must follow a different | |
220 | step to later UPGRADE to a newer Kallithea version) |
|
221 | step to later UPGRADE to a newer Kallithea version) | |
221 |
|
222 | |||
222 | The script will ask you for confirmation about creating a NEW database, |
|
223 | The script will ask you for confirmation about creating a NEW database, | |
223 | answer yes (y) |
|
224 | answer yes (y) | |
224 | The script will ask you for repository path, answer C:\\Kallithea\\Repos |
|
225 | The script will ask you for repository path, answer C:\\Kallithea\\Repos | |
225 | (or similar) |
|
226 | (or similar) | |
226 | The script will ask you for admin username and password, answer "admin" |
|
227 | The script will ask you for admin username and password, answer "admin" | |
227 | + "123456" (or whatever you want) |
|
228 | + "123456" (or whatever you want) | |
228 | The script will ask you for admin mail, answer "admin@xxxx.com" (or |
|
229 | The script will ask you for admin mail, answer "admin@xxxx.com" (or | |
229 | whatever you want) |
|
230 | whatever you want) | |
230 |
|
231 | |||
231 | If you make some mistake and the script does not end, don't worry, start |
|
232 | If you make some mistake and the script does not end, don't worry, start | |
232 | it again. |
|
233 | it again. | |
233 |
|
234 | |||
234 | Step 9 -- Running Kallithea |
|
235 | Step 9 -- Running Kallithea | |
235 | --------------------------- |
|
236 | --------------------------- | |
236 |
|
237 | |||
237 | In the previous command prompt, being in the C:\\Kallithea\\Bin folder, |
|
238 | In the previous command prompt, being in the C:\\Kallithea\\Bin folder, | |
238 | just type:: |
|
239 | just type:: | |
239 |
|
240 | |||
240 | paster serve production.ini |
|
241 | paster serve production.ini | |
241 |
|
242 | |||
242 | Open yout web server, and go to http://127.0.0.1:5000 |
|
243 | Open yout web server, and go to http://127.0.0.1:5000 | |
243 |
|
244 | |||
244 | It works!! :-) |
|
245 | It works!! :-) | |
245 |
|
246 | |||
246 | Remark: |
|
247 | Remark: | |
247 | If it does not work first time, just Ctrl-C the CMD process and start it |
|
248 | If it does not work first time, just Ctrl-C the CMD process and start it | |
248 | again. Don't forget the "http://" in Internet Explorer |
|
249 | again. Don't forget the "http://" in Internet Explorer | |
249 |
|
250 | |||
250 | What this Guide does not cover: |
|
251 | What this Guide does not cover: | |
251 |
|
252 | |||
252 | - Installing Celery |
|
253 | - Installing Celery | |
253 | - Running Kallithea as Windows Service. You can investigate here: |
|
254 | - Running Kallithea as Windows Service. You can investigate here: | |
254 |
|
255 | |||
255 | - http://pypi.python.org/pypi/wsgisvc |
|
256 | - http://pypi.python.org/pypi/wsgisvc | |
256 | - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/ |
|
257 | - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/ | |
257 | - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service |
|
258 | - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service | |
258 |
|
259 | |||
259 | - Using Apache. You can investigate here: |
|
260 | - Using Apache. You can investigate here: | |
260 |
|
261 | |||
261 | - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4 |
|
262 | - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4 | |
262 |
|
263 | |||
263 |
|
264 | |||
264 | Upgrading |
|
265 | Upgrading | |
265 | ::::::::: |
|
266 | ::::::::: | |
266 |
|
267 | |||
267 | Stop running Kallithea |
|
268 | Stop running Kallithea | |
268 | Open a CommandPrompt like in Step7 (VS2008 path + activate) and type:: |
|
269 | Open a CommandPrompt like in Step7 (VS2008 path + activate) and type:: | |
269 |
|
270 | |||
270 | easy_install -U kallithea |
|
271 | easy_install -U kallithea | |
271 | cd \Kallithea\Bin |
|
272 | cd \Kallithea\Bin | |
272 |
|
273 | |||
273 | { backup your production.ini file now} :: |
|
274 | { backup your production.ini file now} :: | |
274 |
|
275 | |||
275 | paster make-config Kallithea production.ini |
|
276 | paster make-config Kallithea production.ini | |
276 |
|
277 | |||
277 | (check changes and update your production.ini accordingly) :: |
|
278 | (check changes and update your production.ini accordingly) :: | |
278 |
|
279 | |||
279 | paster upgrade-db production.ini (update database) |
|
280 | paster upgrade-db production.ini (update database) | |
280 |
|
281 | |||
281 | Full steps in http://packages.python.org/Kallithea/upgrade.html |
|
282 | Full steps in http://packages.python.org/Kallithea/upgrade.html |
General Comments 0
You need to be logged in to leave comments.
Login now