[root@localhost postgresql-9.5.1]# ./configure
[root@localhost postgresql-9.5.1]# make
[root@localhost postgresql-9.5.1]# make install
[root@localhost /]# useradd -c postgres -d /home/postgres -s /bin/bash -m postgres
[root@localhost /]# passwd postgres
[root@localhost /]# cat /etc/group
postgres:x:500:
[root@localhost /]# cat /etc/passwd
postgres:x:500:500:postgres:/home/postgres:/bin/bash
[root@localhost /]# mkdir /usr/local/pgsql
[root@localhost /]# chown postgres.postgres /usr/local/pgsql
[root@localhost /]su - postgres
[postgres@localhost ~]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
[postgres@localhost ~]$ /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
[postgres@localhost ~]$ /usr/local/pgsql/bin/createdb test
[postgres@localhost ~]$ /usr/local/pgsql/bin/psql test
psql (9.5.1)
Type "help" for help.
test=#
test-# \q
[root@localhost /]su - root
외부에서 접속이 될수 있도록 IP주소 추가 설정
[root@localhost ~]# vi /usr/local/pgsql/data/pg_hba.conf
host all all 192.168.1.0/24 md5
host all all 192.168.1.0/24 trust
해당 파일에 접속 가능한 IP주소를 넣어준다. md5대신 trust를 적으면 패스워드를 암호화 하지 않는다.