installation.rst
133 lines
| 4.2 KiB
| text/x-rst
|
RstLexer
/ docs / installation.rst
r568 | .. _installation: | |||
r2095 | ============ | |||
r568 | Installation | |||
============ | ||||
Bradley M. Kuhn
|
r4192 | ``Kallithea`` is written entirely in Python. Before posting any issues make | ||
r3224 | sure, your not missing any system libraries and using right version of | |||
Bradley M. Kuhn
|
r4192 | libraries required by Kallithea. There's also restriction in terms of mercurial | ||
clients. Minimal version of hg client known working fine with Kallithea is | ||||
r1439 | **1.6**. If you're using older client, please upgrade. | |||
r568 | ||||
Bradley M. Kuhn
|
r4192 | Installing Kallithea from PyPI (aka "Cheeseshop") | ||
H Waldo G
|
r2806 | ------------------------------------------------- | ||
r568 | ||||
Mads Kiilerich
|
r4522 | Kallithea requires python version 2.6 or higher. | ||
r1092 | ||||
Bradley M. Kuhn
|
r4192 | The easiest way to install ``kallithea`` is to run:: | ||
r568 | ||||
Bradley M. Kuhn
|
r4192 | easy_install kallithea | ||
r568 | ||||
Or:: | ||||
Bradley M. Kuhn
|
r4192 | pip install kallithea | ||
r568 | ||||
Bradley M. Kuhn
|
r4192 | If you prefer to install Kallithea manually simply grab latest release from | ||
http://pypi.python.org/pypi/Kallithea, decompress the archive and run:: | ||||
r568 | ||||
r1062 | python setup.py install | |||
r568 | ||||
r2358 | Step by step installation example for Windows | |||
--------------------------------------------- | ||||
r568 | ||||
r2358 | :ref:`installation_win` | |||
Step by step installation example for Linux | ||||
------------------------------------------- | ||||
r568 | ||||
Bradley M. Kuhn
|
r4192 | For installing Kallithea i highly recommend using separate virtualenv_. This | ||
way many required by Kallithea libraries will remain sandboxed from your main | ||||
r3224 | python and making things less problematic when doing system python updates. | |||
r1309 | ||||
r3169 | Alternative very detailed installation instructions for Ubuntu Server with | |||
celery, indexer and daemon scripts: https://gist.github.com/4546398 | ||||
r3224 | - Assuming you have installed virtualenv_ create a new virtual environment | |||
using virtualenv command:: | ||||
r572 | ||||
Bradley M. Kuhn
|
r4192 | virtualenv --no-site-packages /opt/kallithea-venv | ||
r572 | ||||
r1092 | ||||
.. note:: Using ``--no-site-packages`` when generating your | ||||
virtualenv is **very important**. This flag provides the necessary | ||||
isolation for running the set of packages required by | ||||
Bradley M. Kuhn
|
r4192 | Kallithea. If you do not specify ``--no-site-packages``, | ||
it's possible that Kallithea will not install properly into | ||||
r1092 | the virtualenv, or, even if it does, may not run properly, | |||
depending on the packages you've already got installed into your | ||||
Python's "main" site-packages dir. | ||||
Bradley M. Kuhn
|
r4192 | - this will install new virtualenv_ into `/opt/kallithea-venv`. | ||
r1092 | - Activate the virtualenv_ by running:: | |||
r572 | ||||
Bradley M. Kuhn
|
r4192 | source /opt/kallithea-venv/bin/activate | ||
r1092 | ||||
.. note:: If you're using UNIX, *do not* use ``sudo`` to run the | ||||
``virtualenv`` script. It's perfectly acceptable (and desirable) | ||||
to create a virtualenv as a normal user. | ||||
r3224 | ||||
Bradley M. Kuhn
|
r4192 | - Make a folder for Kallithea data files, and configuration somewhere on the | ||
r1309 | filesystem. For example:: | |||
r572 | ||||
Bradley M. Kuhn
|
r4192 | mkdir /opt/kallithea | ||
r3224 | ||||
Bradley M. Kuhn
|
r4192 | - Go into the created directory run this command to install kallithea:: | ||
r572 | ||||
Bradley M. Kuhn
|
r4192 | easy_install kallithea | ||
r3224 | ||||
r1309 | or:: | |||
r572 | ||||
Bradley M. Kuhn
|
r4192 | pip install kallithea | ||
r3224 | ||||
Bradley M. Kuhn
|
r4192 | - This will install Kallithea together with pylons and all other required | ||
r1309 | python libraries into activated virtualenv | |||
r572 | ||||
r855 | Requirements for Celery (optional) | |||
---------------------------------- | ||||
r1309 | In order to gain maximum performance | |||
Bradley M. Kuhn
|
r4192 | there are some third-party you must install. When Kallithea is used | ||
r1309 | together with celery you have to install some kind of message broker, | |||
recommended one is rabbitmq_ to make the async tasks work. | ||||
Bradley M. Kuhn
|
r4192 | Of course Kallithea works in sync mode also and then you do not have to install | ||
r3224 | any third party applications. However, using Celery_ will give you a large | |||
speed improvement when using many big repositories. If you plan to use | ||||
Bradley M. Kuhn
|
r4192 | Kallithea for say 7 to 10 repositories, Kallithea will perform perfectly well | ||
r1309 | without celery running. | |||
r3224 | ||||
Bradley M. Kuhn
|
r4192 | If you make the decision to run Kallithea with celery make sure you run | ||
r3224 | celeryd using paster and message broker together with the application. | |||
r1309 | ||||
r855 | .. note:: | |||
Bradley M. Kuhn
|
r4192 | Installing message broker and using celery is optional, Kallithea will | ||
r1092 | work perfectly fine without them. | |||
r855 | ||||
r3224 | **Message Broker** | |||
r855 | ||||
- preferred is `RabbitMq <http://www.rabbitmq.com/>`_ | ||||
r1092 | - A possible alternative is `Redis <http://code.google.com/p/redis/>`_ | |||
r855 | ||||
r3224 | For installation instructions you can visit: | |||
r1092 | http://ask.github.com/celery/getting-started/index.html. | |||
This is a very nice tutorial on how to start using celery_ with rabbitmq_ | ||||
r855 | ||||
r572 | ||||
You can now proceed to :ref:`setup` | ||||
r855 | ----------------------------------- | |||
r568 | ||||
r3224 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv | |||
r572 | .. _python: http://www.python.org/ | |||
.. _mercurial: http://mercurial.selenic.com/ | ||||
.. _celery: http://celeryproject.org/ | ||||
H Waldo G
|
r2806 | .. _rabbitmq: http://www.rabbitmq.com/ | ||