Skip to content

Instantly share code, notes, and snippets.

@matthewjackowski
Created July 12, 2017 08:01
Show Gist options
  • Save matthewjackowski/7127d837be319f9964454c270d81a00f to your computer and use it in GitHub Desktop.
Save matthewjackowski/7127d837be319f9964454c270d81a00f to your computer and use it in GitHub Desktop.
Pg-cron on a Amazon AMI
sudo yum -y update
sudo yum -y localinstall https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-ami201503-96-9.6-2.noarch.rpm
sudo yum -y install postgresql96 postgresql96-server
sudo su - postgres -c "/usr/pgsql-9.6/bin/initdb"
sudo service postgresql-9.6 start
curl https://install.citusdata.com/community/rpm.sh | sudo bash
sudo yum install -y pg_cron_96
sudo -u postgres echo "shared_preload_libraries = 'pg_cron'" >> /var/lib/pgsql/9.6/data/postgresql.conf
sudo service postgresql-9.6 restart
sudo -u postgres psql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment