backend/sql (postgres)

Mac (OS X)에 postgres 설치하기 (sierra 10.12.6)

seul chan 2017. 11. 28. 15:01
brew tap petere/postgresql
# search로 원하는 postgresql 버전을 찾을 수 있다.
brew search postgresql

brew install petere/postgresql/postgresql@10

Run this command to start postgres manually

pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
psql postgres


사실 postgres 설치는 매우 간단하게 할 수 있지만, 이를 실행시키는 데서 잠깐 애를 먹었다. 

ubuntu에서는 service 명령어로 postgres를 실행시키던걸 pg_ctl 명령어로 실행시켜주면 된다.