Skip to content

Instantly share code, notes, and snippets.

@gmailzj
Forked from joho/gist:3735740
Created December 3, 2018 04:28
Show Gist options
  • Save gmailzj/025cb296eaa22e597e76877a01bb4cb6 to your computer and use it in GitHub Desktop.
Save gmailzj/025cb296eaa22e597e76877a01bb4cb6 to your computer and use it in GitHub Desktop.

Revisions

  1. @joho joho revised this gist Sep 17, 2012. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -8,4 +8,8 @@ Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X)
    5. initdb /usr/local/var/postgres -E utf8
    6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres
    7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
    8. pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
    8. pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

    If you're using ruby, also:

    gem pristine pg
  2. @joho joho revised this gist Sep 17, 2012. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,11 @@
    Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X)
    (if you aren't using version 9.1.5, change line 6 with the correct version)

    1. pg_ctl -D /usr/local/var/postgres stop -s -m fast
    1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
    2. mv /usr/local/var/postgres /usr/local/var/postgres91
    3. curl https://raw.github.com/fragility/homebrew/737af01178590950749cf5e841f2d086c57c5a80/Library/Formula/postgresql.rb > /usr/local/Library/Formula/postgresql.rb
    3. brew update
    4. brew upgrade postgresql
    5. initdb /usr/local/var/postgres -E utf8
    6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres
    7. pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
    7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
    8. pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
  3. @rafaelss rafaelss created this gist Sep 11, 2012.
    10 changes: 10 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X)
    (if you aren't using version 9.1.5, change line 6 with the correct version)

    1. pg_ctl -D /usr/local/var/postgres stop -s -m fast
    2. mv /usr/local/var/postgres /usr/local/var/postgres91
    3. curl https://raw.github.com/fragility/homebrew/737af01178590950749cf5e841f2d086c57c5a80/Library/Formula/postgresql.rb > /usr/local/Library/Formula/postgresql.rb
    4. brew upgrade postgresql
    5. initdb /usr/local/var/postgres -E utf8
    6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres
    7. pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start