반응형
1. 최신버전 다운로드
http://www.postgres.org
2. 압축풀기 (루트유저로 접속)
# cd /usr/local/src
# tar zxvf postgresql-7.3.4.tar.gz
3. 설치 (설치 및 사용자와 그룹 생성)
# cd /usr/local/src/postgresql-7.0.3/src
# ./configure --enable-multibyte \
--enable-locale \
--with-tcl
#
# make
# make install
# adduser postgres
# chown -R postgres:postgres /usr/local/pgsql
4. 환경설정
# vi /etc/ld.so.conf
#마지막 라인에 추가
/usr/local/pgsql/lib
#
# /sbin/ldconfig
#
# vi /etc/profile
...
...
PGDATA=/usr/local/pgsql/data
PGLIB=/usr/local/pgsql/lib
MANPATH=$MANPATH:/usr/local/pgsql/man
PATH=$PATH:/usr/local/pgsql/bin
export PGDATA PGLIB MANPATH PATH
#
# . /etc/profile
#
5. 실행 및 확인
$ su - postgres
$ initdb -E EUC_KR
$ pg_ctl start
$ createdb mydb
CREATE DATABASE
$ psql mydb
mydb=# select current_date;
http://www.postgres.org
2. 압축풀기 (루트유저로 접속)
# cd /usr/local/src
# tar zxvf postgresql-7.3.4.tar.gz
3. 설치 (설치 및 사용자와 그룹 생성)
# cd /usr/local/src/postgresql-7.0.3/src
# ./configure --enable-multibyte \
--enable-locale \
--with-tcl
#
# make
# make install
# adduser postgres
# chown -R postgres:postgres /usr/local/pgsql
4. 환경설정
# vi /etc/ld.so.conf
#마지막 라인에 추가
/usr/local/pgsql/lib
#
# /sbin/ldconfig
#
# vi /etc/profile
...
...
PGDATA=/usr/local/pgsql/data
PGLIB=/usr/local/pgsql/lib
MANPATH=$MANPATH:/usr/local/pgsql/man
PATH=$PATH:/usr/local/pgsql/bin
export PGDATA PGLIB MANPATH PATH
#
# . /etc/profile
#
5. 실행 및 확인
$ su - postgres
$ initdb -E EUC_KR
$ pg_ctl start
$ createdb mydb
CREATE DATABASE
$ psql mydb
mydb=# select current_date;
반응형