Last active
July 11, 2017 20:10
Install PostgreSQL 9.4 on Semaphore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get remove -y postgresql-client-9.3 postgresql-9.3 postgresql-contrib-9.3 postgresql-server-dev-9.3 | |
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - | |
echo " deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee -a /etc/apt/sources.list | |
sudo apt-get update | |
sudo apt-get -y --force-yes install postgresql-9.4 postgresql-contrib-9.4 | |
sudo su - postgres -c "pg_dropcluster --stop 9.4 main" | |
sudo su - postgres -c "pg_createcluster --start -e UTF-8 9.4 main" | |
sudo su - postgres -c "psql -c \"CREATE USER runner WITH PASSWORD 'semaphoredb';\" -d template1" | |
sudo su - postgres -c "psql -c \"ALTER USER runner CREATEUSER CREATEDB;\" -d template1" | |
sudo service postgresql start || true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Upgrade postgresql on Semaphore to 9.4 with command like:
cd ~ && wget https://gist.githubusercontent.com/rastasheep/4b7bf6ce1344dc0c00a0/raw/pg_9.4.sh && bash pg_9.4.sh && cd -