# PgHero for Linux Packaged for: - Ubuntu 16.04 (Xenial) - Ubuntu 14.04 (Trusty) - Ubuntu 12.04 (Precise) - Debian 7 (Wheezy) - Debian 8 (Jesse) - CentOS / RHEL 7 - SUSE Linux Enterprise Server 12 64-bit only ## Installation Ubuntu 16.04 (Xenial) ```sh wget -qO - https://deb.packager.io/key | sudo apt-key add - echo "deb https://deb.packager.io/gh/pghero/pghero xenial master" | sudo tee /etc/apt/sources.list.d/pghero.list sudo apt-get update sudo apt-get -y install pghero ``` Ubuntu 14.04 (Trusty) ```sh wget -qO - https://deb.packager.io/key | sudo apt-key add - echo "deb https://deb.packager.io/gh/pghero/pghero trusty master" | sudo tee /etc/apt/sources.list.d/pghero.list sudo apt-get update sudo apt-get -y install pghero ``` Ubuntu 12.04 (Precise) ```sh wget -qO - https://deb.packager.io/key | sudo apt-key add - echo "deb https://deb.packager.io/gh/pghero/pghero precise master" | sudo tee /etc/apt/sources.list.d/pghero.list sudo apt-get update sudo apt-get -y install pghero ``` Debian 7 (Wheezy) ```sh sudo apt-get -y install apt-transport-https wget -qO - https://deb.packager.io/key | sudo apt-key add - echo "deb https://deb.packager.io/gh/pghero/pghero wheezy master" | sudo tee /etc/apt/sources.list.d/pghero.list sudo apt-get update sudo apt-get -y install pghero ``` Debian 8 (Jesse) ```sh sudo apt-get -y install apt-transport-https wget -qO - https://deb.packager.io/key | sudo apt-key add - echo "deb https://deb.packager.io/gh/pghero/pghero jessie master" | sudo tee /etc/apt/sources.list.d/pghero.list sudo apt-get update sudo apt-get -y install pghero ``` CentOS / RHEL 7 ```sh sudo rpm --import https://rpm.packager.io/key echo "[pghero] name=Repository for pghero/pghero application. baseurl=https://rpm.packager.io/gh/pghero/pghero/centos7/master enabled=1" | sudo tee /etc/yum.repos.d/pghero.repo sudo yum -y install pghero ``` SUSE Linux Enterprise Server 12 ```sh sudo rpm --import https://rpm.packager.io/key sudo zypper addrepo "https://rpm.packager.io/gh/pghero/pghero/sles12/master" "pghero" sudo zypper install pghero ``` ## Setup Add your database. ```sh sudo pghero config:set DATABASE_URL=postgres://user:password@hostname:5432/dbname ``` And optional authentication. ```sh sudo pghero config:set PGHERO_USERNAME=link sudo pghero config:set PGHERO_PASSWORD=hyrule ``` Start the server ```sh sudo pghero config:set PORT=3001 sudo pghero config:set RAILS_LOG_TO_STDOUT=disabled sudo pghero scale web=1 ``` Confirm it’s running with: ```sh curl -v http://localhost:3001/ ``` To open to the outside world, add a proxy. Here’s how to do it with Nginx on Ubuntu. ```sh sudo apt-get install -y nginx cat | sudo tee /etc/nginx/sites-available/default <