Skip to content

Instantly share code, notes, and snippets.

@vincent178
Created March 31, 2014 09:03
Show Gist options
  • Save vincent178/9888287 to your computer and use it in GitHub Desktop.
Save vincent178/9888287 to your computer and use it in GitHub Desktop.

Install Package

$ sudo yum install postgresql-devel

Setting PostgresSQL

Initilize Database

$ sudo /etc/init.d/postgresql initdb

Start PostgresSQL

$ sudo /etc/init.d/postgresql start

Setting Password for postgres user

$ sudo su postgres
$ psql
$ ALTER USER postgres with password 'pass';

Logout from postgres user and login with deploy

$ sudo vi /var/lib/pgsql/9.3/data/pg_hba.conf

At the bottom of the file change authentication method to md5

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     md5
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5

Then Restart PostgreSQL

$ sudo /etc/init.d/postgresql restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment