티스토리 뷰

Database

PostgreSQL 수동 설치

파란크리스마스 2009. 8. 12. 06:23
728x90

OS : Windows 7


1. PostgreSQL 다운받기


경로 : http://www.enterprisedb.com/products/pgbindownload.do

2. 압축풀기

7z.exe x postgresql-8.4.0-1-windows-binaries.zip -oC:\

3. OS 사용자 만들기 (관리자 권한으로 실행)

C:\pgsql>net user postgres 1234 /add
명령을 잘 실행했습니다.

4. C:\pgsql\bin 폴더 Path에 추가

제어판 > 시스템 > 환경변수의 Path 추가

5. 새로 생성한 postgres로 로그인

C:\pgsql>runas /user:postgres cmd
postgres의 암호 입력:
cmd을(를) 사용자 "BLUESANTA-PC\postgres"(으)로 시작하려고 합니다...

6. 데이터베이스 생성

C:\pgsql>path C:\pgsql\lib;%path%

C:\pgsql>bin\initdb -D data -E unicode --no-locale
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.
The default text search configuration will be set to "english".

creating directory data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 32MB
creating configuration files ... ok
creating template1 database in data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

    "bin\postgres" -D "data"
or
    "bin\pg_ctl" -D "data" -l logfile start


C:\pgsql>

7. 윈도우 서비스에 등록 (관리자 권한으로 실행)

C:\pgsql>cd \pgsql\bin

C:\pgsql\bin>pg_ctl register -N postmaster -U postgres -P 1234 -D c:\pgsql\data

8. 해당 서비스의 새 로그인 이름 적용

제어판 > 컴퓨터관리 > 서비스 목록 중에서 postmaster 더블 클릭
사용자 선택하고 암호 입력하고 [확인] 선택


9. 서버 실행

C:\pgsql\bin>net start postmaster
postmaster 서비스를 시작합니다..
postmaster 서비스가 잘 시작되었습니다.

댓글
300x250
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함