문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판이전 판다음 판 | 이전 판 | ||
| dbms:pgsql [2007/05/03 08:47] – 218.239.242.130 | dbms:pgsql [2025/10/03 22:30] (현재) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| ====== PostgreSQL ====== | ====== PostgreSQL ====== | ||
| - | ===== Install ===== | ||
| - | ==== on Debian Linux ==== | + | ===== 설치 및 관리 |
| - | <code bash> | + | - [[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) | + | |
| - | </ | + | |