/var/lib/pgsql/9.3/data
실행
service postgresql-9.3 start
1.유저 생성
su postgres
createuser -P hamadm
2.db생성
createdb -O hamadm db_ham
3.table space 생성
CREATE TABLESPACE tbs_ham
OWNER hamadm
LOCATION '/home/hamadm/tablespace';
다음과 같은 에러시 다음 참조
ERROR: could not set permissions on directory "/home/hamadm/tablespace": 허가 거부
groupadd ham
chmod -R 770 hamadm/
usermod -a -G ham postgres
chown hamadm:ham hamadm
마지막으로 postgresql 재시작
만약 접속이 안된다면 iptable에서 방화벽 설정을 확인한다
/etc/sysconfig/iptables
다음과 같이 넣어준다
-A INPUT -p tcp -m state --state NEW -m tcp --dport 5432 -j ACCEPT
댓글 없음:
댓글 쓰기