Skip to content

Instantly share code, notes, and snippets.

@Kroid
Created June 5, 2018 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kroid/77f4040dbc785050711190b3aa4610df to your computer and use it in GitHub Desktop.
Save Kroid/77f4040dbc785050711190b3aa4610df to your computer and use it in GitHub Desktop.
Setup sentry on Ubuntu 16.04 server
# Project: https://github.com/getsentry/sentry
# Doc: https://docs.getsentry.com/on-premise/server/installation/python/
sudo apt-get update
sudo apt-get install python-virtualenv
sudo apt-get install python-setuptools
sudo apt-get install python-pip
sudo apt-get install libxslt1-dev
sudo apt-get install gcc
sudo apt-get install libffi-dev
sudo apt-get install libjpeg-dev
sudo apt-get install libxml2-dev
sudo apt-get install libxslt-dev
sudo apt-get install libyaml-dev
sudo apt-get install python-dev
sudo apt-get install postgresql
sudo apt-get install postgresql-server-dev-9.6
sudo apt-get install redis-server
sudo -u postgres createuser -s sentry
sudo -u postgres psql -c "alter user sentry with password 'sentry';"
sudo nano /etc/postgresql/10/main/pg_hba.conf
# local sentry md5
sudo service postgresql restart
virtualenv /var/www/sentry/
source /var/www/sentry/bin/activate
# Note: Activating the environment adjusts your PATH, so that things like pip now install into the virtualenv by default.
sudo easy_install -UZ sentry[postgres]
sudo sentry init # This will create if you a root user: /root/.sentry/config.yml
sudo nano .sentry/sentry.conf.py # Set postgres connection sentry / sentry
createdb -E utf-8 sentry # Note: If you kept the database ``NAME`` as ``sentry``
# If Error: sudo -u postgres psql -c 'alter user sentry with createdb' postgres
sentry config generate-secret-key
# get the secret key!
SENTRY_CONF=/root/.sentry sentry upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment