Skip to content

Instantly share code, notes, and snippets.

@fanweixiao
Created September 26, 2012 07:29
Show Gist options
  • Save fanweixiao/3786595 to your computer and use it in GitHub Desktop.
Save fanweixiao/3786595 to your computer and use it in GitHub Desktop.
gem install pg on CentOS 6.3
gem install pg -- --with-pg-lib=/usr/pgsql-9.1/lib --with-pg-config=/usr/pgsql-9.1/bin/pg_config
==========
$ export PATH=/usr/pgsql-9.1/bin:$PATH
$ uname -a
$ export ARCHFLAGS=' -arch x86_64'
$ bundle install
==========
sudo -u postgres createuser -D -P someuser
sudo -u postgres createdb -O someuser somedb
CREATE USER user_name WITH PASSWORD 'user_passwd' superuser createdb superuser;
```make sure pg_hba.conf contails localhost with md5 or trust```
@obelich
Copy link

obelich commented Nov 8, 2013

Thanks this is work to in CentOS 5.9 wit pg 9.2 :P

gem install pg -- --with-pg-lib=/usr/pgsql-9.2/lib --with-pg-config=/usr/pgsql-9.2/bin/pg_config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment