dbms:pgsql:install
문서의 이전 판입니다!
목차
PostgreSQL Installation
Install on Debian Linux
- 데뱐리눅스에 패키지를 설치해 보자.
# apt-get install postgresql postgresql-client postgresql-dev libpg-perl libdbd-pg-perl
Installation on Ubuntu Linux
# apt-get install postgresql-8.1 postgresql-client-8.1 postgresql-client-common postgresql-common postgresql-server-dev-8.1 postgresql-contrib-8.1 postgresql-plperl-8.1 postgresql-plpython-8.1
Create User, Database
- 계정과 데이타베이스를 생성한다.
# su - postgres # psql -d template1 template1=# CREATE USER 아이디 WITH PASSWORD '비밀번호'; template1=# CREATE DATABASE 디비이름 WITH ENCODING='utf-8' OWNER 아이디;
- 예를 들어보자
template1=# create user eecit with password 'userpassword'; CREATE USER template1=# create database eecitdb with encoding='utf-8' owner eecit; CREATE DATABASE
권한설정
- 계정으로 로그인할 수 있도록 연결설정
# su - # cd /etc/postgresql/8.1/main # vi pg_hba.conf 모두 주석으로 막고 아래만 남김 host all all 0.0.0.0 0.0.0.0 password local all postgres trust local all all password # /etc/init.d/postgresql-8.1 restart # psql -d 디비이름 -U 아이디 -W
DB List 보기
# psql -U postgres -l
List of databases
Name | Owner | Encoding
-------------+-------------+----------
eecit | eecit | UNICODE
openwatcher | openwatcher | UNICODE
template0 | postgres | UNICODE
template1 | postgres | UNICODE
(4 rows)
dbms/pgsql/install.1201132399.txt.gz · 마지막으로 수정됨: 저자 starlits
