Commits

Martin Geisler  committed 49eb5d0

Describe setup on a Debian machine

  • Participants
  • Parent commits 61d235b

Comments (0)

Files changed (1)

File rhodecode.rst

 .. _Bitbucket: http://bitbucket.org/
 .. _Kiln: http://www.fogcreek.com/kiln/
 
+Setup
+=====
+
+This section is a suplement to the RhodeCode documentation on
+installation_ and setup_ with Debian specific notes.
+
+.. _installation: http://packages.python.org/RhodeCode/installation.html
+.. _setup: http://packages.python.org/RhodeCode/setup.html
+
+Installation
+------------
+
+On Debian GNU/Linux, the following packages should be installed:
+
+* ``python-pip``: Python package installer.
+
+* ``python-virtualenv``: creates virtual Python environments.
+
+* ``python-psycopg2``: Python driver for PostgreSQL, not needed if
+  SQLite is used instead.
+
+* ``rabbitmq-server``: message broker for asynchronous events.
+
+A new virtual environment is created, activated, and ``pip`` is used
+to install RhodeCode::
+
+  $ virtualenv rhodecode-venv
+  $ source rhodecode-venv/bin/activate
+  $ pip install rhodecode
+
+The RhodeCode documentation recommends adding ``--no-site-packages``
+
+Configuration
+-------------
+
+By default, RhodeCode will use a SQLite database and this can be
+created directly with the command::
+
+  $ paster setup-app production.ini
+
+However, if PostgreSQL is used, the database URL must be edited in
+``production.ini`` and a PostgreSQL user and database must be created
+first::
+
+  $ sudo -u postgres createuser rhodecode -P
+  Enter password for new role: <rhodecode>
+  Enter it again: <rhodecode>
+  Shall the new role be a superuser? (y/n) n
+  Shall the new role be allowed to create databases? (y/n) n
+  Shall the new role be allowed to create more new roles? (y/n) n
+  $ sudo -u postgres createdb -O rhodecode rhodecode
+
+The database tables can now be created using the ``setup-app`` command
+above. This will also prompt for some basic RhodeCode configuration
+settings such as admin username and password.
+
+Startup
+-------
+
+When the database has been created and RhodeCode has been configured,
+it is time to start the services. We'll assume that PostgreSQL and
+RabbitMQ are already running. What is left to start is the Celery
+worker daemon::
+
+  $ paster celeryd production.ini
+
+and RhodeCode itself::
+
+  $ paster serve --reload production.ini
+
+The ``--reload`` flag makes sure that RhodeCode is automatically
+respawned if the configuration file is changed. This is very useful
+when testing.
+
+RhodeCode will start and listen for requests on localhost port 5000.
+By default, RhodeCode only binds itself to the localhost interface,
+change the ``host`` option to ``0.0.0.0`` to make it bind to all
+interfaces.
+
 
 Warnings and Errors
 ===================