리눅스(ubuntu)에 postgreSQL 설치하기
리눅스에 postgreSQL 설치한 과정을 정리해두겠다.
apt-get install로 아래와 같이 패키지 설치를 한다.
sudo apt-get install postgresql postgresql-contrib
# sudo apt-get install postgresql postgresql-contrib
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
duplicity librsync1 python-lockfile
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libossp-uuid16 libpq5 postgresql-9.3 postgresql-client-9.3
postgresql-client-common postgresql-common postgresql-contrib-9.3
Suggested packages:
uuid oidentd ident-server locales-all postgresql-doc-9.3 libdbd-pg-perl
The following NEW packages will be installed:
libossp-uuid16 libpq5 postgresql postgresql-9.3 postgresql-client-9.3
postgresql-client-common postgresql-common postgresql-contrib
postgresql-contrib-9.3
0 upgraded, 9 newly installed, 0 to remove and 578 not upgraded.
Need to get 4,137 kB of archives.
After this operation, 17.7 MB of additional disk space will be used.
Do you want to continue? [Y/n]
...
이제 설치가 완료되었으니 psql로 command line 을 실행해보자.
root로 psql을 실행하면 아래와 같이 root라는 role이 없다고 에러가 나온다.
root# psql
psql: FATAL: role "root" does not exist