리눅스 PostgreSQL설치

[root@css ~]$ useradd pgsql
[root@css ~]$ tar xzvf postgresql-8.0.2.tar.gz

(중략)
postgresql-8.0.2/src/tutorial/complex.c
postgresql-8.0.2/src/tutorial/complex.source
postgresql-8.0.2/src/tutorial/funcs.c
postgresql-8.0.2/src/tutorial/funcs.source
postgresql-8.0.2/src/tutorial/funcs_new.c
postgresql-8.0.2/src/tutorial/syscat.source
postgresql-8.0.2/src/utils/
postgresql-8.0.2/src/utils/Makefile
postgresql-8.0.2/src/utils/dllinit.c
postgresql-8.0.2/HISTORY
postgresql-8.0.2/INSTALL
[root@css ~]$ cd postgresql-8.0.2
[root@css ~/postgresql-8.0.2]$ ./configure ?prefix=/usr/local/pgsql

(중략 )
checking for sgmlspl... sgmlspl
configure: creating ./config.status
config.status: creating GNUmakefile
config.status: creating src/Makefile.global
config.status: creating src/include/pg_config.h
config.status: linking ./src/backend/port/tas/dummy.s to src/backend/port/tas.s
config.status: linking ./src/backend/port/dynloader/linux.c to src/backend/port/dynloader.c
config.status: linking ./src/backend/port/sysv_sema.c to src/backend/port/pg_sema.c
config.status: linking ./src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c
config.status: linking ./src/backend/port/dynloader/linux.h to src/include/dynloader.h
config.status: linking ./src/include/port/linux.h to src/include/pg_config_os.h
config.status: linking ./src/makefiles/Makefile.linux to src/Makefile.port
[root@css ~/postgresql-8.0.2]$ make
(중략)
rm -f libplpgsql.so.1
ln -s libplpgsql.so.1.0 libplpgsql.so.1
rm -f libplpgsql.so
ln -s libplpgsql.so.1.0 libplpgsql.so
make[4]: Leaving directory `/root/postgresql-8.0.2/src/pl/plpgsql/src'
make[3]: Leaving directory `/root/postgresql-8.0.2/src/pl/plpgsql'
make[2]: Leaving directory `/root/postgresql-8.0.2/src/pl'
make -C makefiles all
make[2]: Entering directory `/root/postgresql-8.0.2/src/makefiles'
make[2]: Leaving directory `/root/postgresql-8.0.2/src/makefiles'
make -C utils all
make[2]: Entering directory `/root/postgresql-8.0.2/src/utils'
make[2]: Leaving directory `/root/postgresql-8.0.2/src/utils'
make[1]: Leaving directory `/root/postgresql-8.0.2/src'
make -C config all
make[1]: Entering directory `/root/postgresql-8.0.2/config'
make[1]: Leaving directory `/root/postgresql-8.0.2/config'
All of PostgreSQL successfully made. Ready to install.
[root@css ~/postgresql-8.0.2]$ make install
(중략)
make[1]: Leaving directory `/root/postgresql-8.0.2/src'
make -C config install
make[1]: Entering directory `/root/postgresql-8.0.2/config'
mkdir -p -- /usr/local/pgsql/lib/pgxs/config
/bin/sh ../config/install-sh -c -m 755 ./install-sh /usr/local/pgsql/lib/pgxs/config/install-sh
/bin/sh ../config/install-sh -c -m 755 ./mkinstalldirs /usr/local/pgsql/lib/pgxs/config/mkinstalldirs
make[1]: Leaving directory `/root/postgresql-8.0.2/config'
PostgreSQL installation complete.
[root@css ~/postgresql-8.0.2]$ mkdir /usr/local/pgsql/data
[root@css ~/postgresql-8.0.2]$ chown pgsql /usr/local/pgsql/data
[root@css ~/postgresql-8.0.2]$ su ? pgsql
[pgsql@css ~]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data

The files belonging to this database system will be owned by user "linuxone".
This user must also own the server process.

The database cluster will be initialized with locale ko_KR.UTF-8.
The default database encoding has accordingly been set to UNICODE.

fixing permissions on existing directory /usr/local/pgsql/data ... ok
creating directory /usr/local/pgsql/data/global ... ok
creating directory /usr/local/pgsql/data/pg_xlog ... ok
creating directory /usr/local/pgsql/data/pg_xlog/archive_status ... ok
creating directory /usr/local/pgsql/data/pg_clog ... ok
creating directory /usr/local/pgsql/data/pg_subtrans ... ok
creating directory /usr/local/pgsql/data/base ... ok
creating directory /usr/local/pgsql/data/base/1 ... ok
creating directory /usr/local/pgsql/data/pg_tblspc ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 1000
creating configuration files ... ok
creating template1 database in /usr/local/pgsql/data/base/1 ... ok
initializing pg_shadow ... ok
enabling unlimited row size for system tables ... ok
initializing pg_depend ... ok
creating system views ... ok
loading pg_description ... ok
creating conversions ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... 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:

/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
or
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start

[pgsql@css ~]$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data &
[1] 7386
[pgsql@css ~]$ /usr/local/pgsql/bin/createdb test
CREATE DATABASE
[pgsql@css ~]$ /usr/local/pgsql/bin/psql test
Welcome to psql 8.0.2, the PostgreSQL interactive terminal.

Type: \\copyright for distribution terms
\\h for help with SQL commands
\\? for help with psql commands
\\g or terminate with semicolon to execute query
\\q to quit

test=#







출처 : 카페 > LinuxOne::리눅스원 / 리눅스원님
원문 : http://cafe.naver.com/linuxone/41

이 글과 관련있는 글을 자동검색한 결과입니다 [?]

by 수호천사 | 2008/02/25 13:21 | Programming | 트랙백 | 핑백(1) | 덧글(0)

트랙백 주소 : http://unfade.egloos.com/tb/1456581
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]
Linked at 이젠 open-source D.. at 2008/04/01 12:27

... m/412 PostgreSQL 설치 방법 - http://richlino.egloos.com/1816137 리눅스 PostgreSQL 설치 - http://unfade.egloos.com/1456581 정말로 빠르다PostgreSQL 8.1 - http://blog.naver.com/hdlee91/150027192212 Postgres ... more

:         :

:

비공개 덧글

◀ 이전 페이지          다음 페이지 ▶