Sentry installation

Create a directory called sentry:

# mkdir /opt/sentry && cd /opt/sentry

Create a virtual environment and activate it:

# virtualenv sentry && source /opt/sentry/sentry/bin/activate

Install Sentry:

# easy_install -UZ sentry[postgres]
# easy_install -UZ sentry

Initialize the conifguration

# sentry init /opt/sentry/sentry.conf.py

In the configuration file /opt/sentry/sentry.conf.py, you are going to change:

  • the database configuration such as:
DATABASES = {
  'default': {
                'ENGINE': 'django.db.backends.postgresql_psycopg2',
                'NAME': 'sentry',
                'USER': 'sentry',
                'PASSWORD': 'sentry',
                'HOST': 'localhost',
                'PORT': '',
             }
           }
  • And the url:
SENTRY_URL_PREFIX = 'http://192.168.50.4:9000' # the ip address of the server

Install postgresql

# apt-get install postgresql-9.3

Create a user for sentry:

# sudo su postgres
$ createuser sentry
$ psql template1
# alter role sentry with password 'sentry';

Create the database as postgres:

# createdb -E utf-8 sentry

Create the initial schema using the upgrade command as root:

# sentry --config=/opt/sentry/sentry.conf.py upgrade

If you did not create the user on the first run, you can correct this by doing the following:

# sentry --config=/opt/sentry/sentry.conf.py createsuperuser
# sentry --config=/opt/sentry/sentry.conf.py repair --owner=sentry

You can start Sentry with:

# sentry --config=/opt/sentry/sentry.conf.py start

Comments

Comments powered by Disqus