[6275] | 1 | Installation on Linux production system |
---|
| 2 | *************************************** |
---|
[5341] | 3 | |
---|
[7823] | 4 | .. note:: `waeup.kofa` might not work with Python > 2.6 |
---|
[6275] | 5 | currently. Use of Python 2.6 is recommended. |
---|
[5341] | 6 | |
---|
| 7 | Prerequisites |
---|
| 8 | ============= |
---|
| 9 | |
---|
[7823] | 10 | The `waeup.kofa` package is based on `Grok`_, which is a Python |
---|
[5341] | 11 | framework for agile webapplication development. Grok itself is based |
---|
| 12 | on `Zope`_. |
---|
| 13 | |
---|
| 14 | .. _Grok: http://grok.zope.org/ |
---|
| 15 | |
---|
| 16 | .. _Zope: http://www.zope.org/ |
---|
| 17 | |
---|
| 18 | Both, Grok and Zope, are written in Python (with parts written in |
---|
| 19 | C). You therefore need `Python`_ installed. |
---|
| 20 | |
---|
| 21 | .. _Python: http://www.python.org/ |
---|
| 22 | |
---|
| 23 | Note, that you also need the Python header files and a compiler to |
---|
| 24 | compile the parts written in C. |
---|
| 25 | |
---|
[7823] | 26 | To deploy `waeup.kofa` most easily, we use `zc.buildout`_ |
---|
[5341] | 27 | |
---|
| 28 | .. _zc.buildout: http://cheeseshop.python.org/pypi/zc.buildout |
---|
| 29 | |
---|
| 30 | You may have setuptools already installed for your system Python. In |
---|
| 31 | that case, you may need to upgrade it first because buildout requires |
---|
| 32 | a very recent version:: |
---|
| 33 | |
---|
| 34 | $ sudo easy_install -U setuptools |
---|
| 35 | |
---|
| 36 | If this command fails because easy_install is not available, there is |
---|
| 37 | a good chance you do not have setuptools available for your system |
---|
| 38 | Python. If so, there is no problem because setuptools will be |
---|
| 39 | installed locally by buildout. |
---|
| 40 | |
---|
| 41 | Bootstrap the buildout environment:: |
---|
| 42 | |
---|
[6330] | 43 | $ python2.6 bootstrap/bootstrap.py |
---|
[5341] | 44 | |
---|
| 45 | and run the buildout command:: |
---|
| 46 | |
---|
| 47 | $ bin/buildout |
---|
| 48 | [lots of stuff will be downloaded and installed here] |
---|
| 49 | |
---|
| 50 | Note that if you have more than one sandbox for a Zope-based web |
---|
| 51 | application, it will probably make sense to share the eggs between the |
---|
| 52 | different sandboxes. You can tell ``zc.buildout`` to use a central |
---|
| 53 | eggs directory by creating ``~/.buildout/default.cfg`` with the |
---|
| 54 | following contents:: |
---|
| 55 | |
---|
| 56 | [buildout] |
---|
| 57 | eggs-directory = /home/bruno/buildout-eggs |
---|
| 58 | |
---|
[7823] | 59 | Running the `waeup.kofa` application |
---|
[5341] | 60 | ====================================== |
---|
| 61 | |
---|
| 62 | You can start Zope with the with the following command:: |
---|
| 63 | |
---|
[7823] | 64 | $ bin/kofactl fg |
---|
[5767] | 65 | |
---|
| 66 | Alternatively you can do: |
---|
[5341] | 67 | |
---|
[5767] | 68 | $ bin/paster serve parts/etc/deploy.ini |
---|
| 69 | |
---|
[5341] | 70 | If you now connect to port 8080 and log in with username 'grok', |
---|
| 71 | password 'grok', you should be able to add the grok-based applications |
---|
| 72 | (such as ``University``) from the menu. |
---|
| 73 | |
---|
| 74 | Add an instance of ``University`` and click on the link next to the |
---|
| 75 | then visible entry in the list of installed applications. |
---|
| 76 | |
---|
| 77 | Running the tests |
---|
| 78 | ================= |
---|
| 79 | |
---|
| 80 | The tests are easily run by executing the test runner that's |
---|
| 81 | installed in the ``bin`` directory:: |
---|
| 82 | |
---|
| 83 | $ bin/test |
---|
| 84 | |
---|