문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 마지막 판 양쪽 다음 판 | ||
dbms:pgsql [2007/11/13 14:22] 218.239.242.130 |
dbms:pgsql [2008/02/08 13:04] starlits |
||
---|---|---|---|
줄 1: | 줄 1: | ||
====== PostgreSQL ====== | ====== PostgreSQL ====== | ||
- | ===== Install ===== | ||
- | ==== on Debian Linux ==== | + | ===== 설치 및 관리 |
- | < | + | - [[dbms: |
- | # apt-get install postgresql postgresql-client postgresql-dev libpg-perl libdbd-pg-perl | + | - [[dbms: |
- | </ | + | |
- | + | ||
- | ==== on Ubuntu Linux ==== | + | |
- | <code bash> | + | |
- | # apt-get install | + | |
- | </ | + | |
- | + | ||
- | ===== Create User, Database ===== | + | |
- | <code bash> | + | |
- | # su - postgres | + | |
- | # psql -d template1 | + | |
- | template1=# CREATE USER 아이디 WITH PASSWORD ' | + | |
- | template1=# CREATE DATABASE 디비이름 WITH ENCODING=' | + | |
- | </ | + | |
- | + | ||
- | + | ||
- | ===== 계정으로 로그인할 수 있도록 연결설정 | + | |
- | <code bash> | + | |
- | # su - | + | |
- | # cd / | + | |
- | # vi pg_hba.conf | + | |
- | 모두 주석으로 막고 아래만 남김 | + | |
- | host all | + | |
- | local | + | |
- | local | + | |
- | # / | + | |
- | # psql -d 디비이름 -U 아이디 -W | + | |
- | </ | + | |
- | + | ||
- | ===== DB List 보기 ===== | + | |
- | <code bash> | + | |
- | # psql -U postgres -l | + | |
- | List of databases | + | |
- | Name | + | |
- | -------------+-------------+---------- | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | (4 rows) | + | |
- | </ | + | |
+ | ===== Administrator ===== | ||
+ | - [[dbms: | ||