Skip to content

Instantly share code, notes, and snippets.

@cecepm
Last active December 30, 2015 08:19
Show Gist options
  • Save cecepm/7801973 to your computer and use it in GitHub Desktop.
Save cecepm/7801973 to your computer and use it in GitHub Desktop.
Install Sentry on Ubuntu 12.04

Install Prerequisites

Build dependencies

sudo apt-get install build-essential python-dev python-pip

Database

sudo apt-get install postgresql-9.1 postgresql-server-dev-9.1

Cache backend and celery message broker

sudo apt-get install memcached redis-server

Services manager

sudo apt-get install supervisor

Mail server (required for sending email from sentry)

sudo apt-get install postfix

Other utilities

sudo apt-get install bc pgtune

Install Sentry

Create VirtualEnv

pip install virtualenv virtualenvwrapper
mkvirtualenv sentry

Sentry PostgreSQL Backend

Install Sentry and other dependencies for PostgreSQL backend

easy_install -UZ sentry[postgres]

Create Database for Sentry

Craate database-user and database for sentry

su - postgres
createuser --pwprompt sentry
createdb -E utf8 -O sentry sentry

Configure Sentry

Init configuration

sentry init /etc/sentry.conf.py

Edit configuration, for example change database settings.

Running migration (init database schema)

sentry --config=/etc/sentry.conf.py upgrade

Create superuser, sentry

sentry --config=/etc/sentry.conf.py createsuperuser

Run the automated repair script

sentry --config=/etc/sentry.conf.py repair --owner=sentry

Starting Sentry

Install Nginx

Setup mainline repository

wget http://nginx.org/keys/nginx_signing.key
sudo apt-key add nginx_signing.key

Edit /etc/apt/sources.list, append this line

deb http://nginx.org/packages/mainline/ubuntu/ precise nginx
deb-src http://nginx.org/packages/mainline/ubuntu/ precise nginx

Install nginx

sudo apt-get update
sudo apt-get install nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment