# PgHero for Linux Packaged for: - Ubuntu 14.04 (Trusty) - Ubuntu 12.04 (Precise) - Debian 7 (Wheezy) - CentOS and RHEL 6 - Fedora 20 - SUSE Linux Enterprise Server 64-bit only ## Installation 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 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 install pghero ``` Debian 7 (Wheezy) ```sh 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 install pghero ``` CentOS and RHEL 6 ```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/centos6/master enabled=1" | sudo tee /etc/yum.repos.d/pghero.repo sudo yum install pghero ``` Fedora 20 ```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/fedora20/master enabled=1" | sudo tee /etc/yum.repos.d/pghero.repo sudo yum install pghero ``` SUSE Linux Enterprise Server ```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 - defaults to port `6000`. ```sh sudo pghero scale web=1 ``` Confirm it’s running with: ```sh curl -v http://localhost:6000/ ``` 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 <