Created
May 19, 2015 15:13
-
-
Save rastasheep/6fb1cefa4f67793c0c29 to your computer and use it in GitHub Desktop.
Install PostgreSQL 9.3 on Semaphore
This file contains 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 -y remove postgresql-9.4 postgresql-contrib-9.4 postgresql-client-9.4 postgresql-server-dev-9.4 | |
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-client-9.3 postgresql-9.3 postgresql-contrib-9.3 postgresql-server-dev-9.3 | |
sudo su - postgres -c "pg_dropcluster --stop 9.3 main" | |
sudo su - postgres -c "pg_createcluster --start -e UTF-8 9.3 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
Downgrade postgresql on Semaphore to 9.3 with command like:
cd ~ && wget https://gist.github.com/rastasheep/6fb1cefa4f67793c0c29/raw/ddea20d9692583713829bb2c4af0878b43c0bb11/pg_9.3.sh && bash pg_9.3.sh && cd -