installation.rst
122 lines
| 4.0 KiB
| text/x-rst
|
RstLexer
/ docs / installation.rst
r568 | .. _installation: | ||
Installation | |||
============ | |||
r1309 | ``RhodeCode`` is written entirely in Python. Before posting any issues make | ||
sure, your not missing any system libraries and using right version of | |||
r1439 | libraries required by RhodeCode. There's also restriction in terms of mercurial | ||
clients. Minimal version of hg client known working fine with RhodeCode is | |||
**1.6**. If you're using older client, please upgrade. | |||
r568 | |||
r1092 | Installing RhodeCode from Cheese Shop | ||
------------------------------------- | |||
r568 | |||
r1092 | Rhodecode requires python version 2.5 or higher. | ||
The easiest way to install ``rhodecode`` is to run:: | |||
r568 | |||
r1062 | easy_install rhodecode | ||
r568 | |||
Or:: | |||
r1062 | pip install rhodecode | ||
r568 | |||
r1092 | If you prefer to install RhodeCode manually simply grab latest release from | ||
http://pypi.python.org/pypi/rhodecode, decompress the archive and run:: | |||
r568 | |||
r1062 | python setup.py install | ||
r568 | |||
r572 | Step by step installation example | ||
--------------------------------- | |||
r568 | |||
r1309 | For installing RhodeCode i highly recommend using separate virtualenv_. This | ||
way many required by RhodeCode libraries will remain sandboxed from your main | |||
python and making things less problematic when doing system python updates. | |||
- Assuming you have installed virtualenv_ create a new virtual environment | |||
using virtualenv command:: | |||
r572 | |||
r1062 | virtualenv --no-site-packages /var/www/rhodecode-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 | |||
RhodeCode. If you do not specify ``--no-site-packages``, | |||
it's possible that RhodeCode will not install properly into | |||
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. | |||
r572 | - this will install new virtualenv_ into `/var/www/rhodecode-venv`. | ||
r1092 | - Activate the virtualenv_ by running:: | ||
r572 | |||
r1062 | source /var/www/rhodecode-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. | |||
r572 | |||
r1309 | - Make a folder for rhodecode data files, and configuration somewhere on the | ||
filesystem. For example:: | |||
r572 | |||
r1062 | mkdir /var/www/rhodecode | ||
r572 | |||
r1309 | - Go into the created directory run this command to install rhodecode:: | ||
r572 | |||
r1309 | easy_install rhodecode | ||
or:: | |||
pip install rhodecode | |||
r572 | |||
r1309 | - This will install rhodecode together with pylons and all other required | ||
python libraries into activated virtualenv | |||
r572 | |||
r855 | Requirements for Celery (optional) | ||
---------------------------------- | |||
r1309 | In order to gain maximum performance | ||
there are some third-party you must install. When RhodeCode is used | |||
together with celery you have to install some kind of message broker, | |||
recommended one is rabbitmq_ to make the async tasks work. | |||
Of course RhodeCode works in sync mode also and then you do not have to install | |||
any third party applications. However, using Celery_ will give you a large | |||
speed improvement when using many big repositories. If you plan to use | |||
RhodeCode for say 7 to 10 repositories, RhodeCode will perform perfectly well | |||
without celery running. | |||
If you make the decision to run RhodeCode with celery make sure you run | |||
celeryd using paster and message broker together with the application. | |||
r855 | .. note:: | ||
Installing message broker and using celery is optional, RhodeCode will | |||
r1092 | work perfectly fine without them. | ||
r855 | |||
**Message Broker** | |||
- preferred is `RabbitMq <http://www.rabbitmq.com/>`_ | |||
r1092 | - A possible alternative is `Redis <http://code.google.com/p/redis/>`_ | ||
r855 | |||
r1092 | For installation instructions you can visit: | ||
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 | |||
r572 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv | ||
.. _python: http://www.python.org/ | |||
.. _mercurial: http://mercurial.selenic.com/ | |||
.. _celery: http://celeryproject.org/ | |||
.. _rabbitmq: http://www.rabbitmq.com/ |