PostgreSQL 8.0

今回の対象OSはFedoraCore1?で行う。 2005/05/27時点でのyumでは

Name   : postgresql
Arch   : i386
Version: 7.3.4
Release: 11
Size   : 6.33 MB
Group  : アプリケーション/データベース
Repo   : Fedora Linux 1 - i386 - updates
Summary: PostgreSQL のクライアントプログラムとライブラリ

なので最新8.0系をmakeする

install

ソース入手

# cd /usr/local/src
# wget ftp://ftp.sra.co.jp/pub/cmd/postgres/8.0.2/postgresql-8.0.2.tar.gz

ユーザ作成

// ユーザ追加
# useradd postgres

展開

# tar xvfz postgresql-8.0.2.tar.gz
# chown -R postgres:postgres /usr/local/src/postgresql-8.0.2
# su postgres
$ cd postgresql-8.0.2

configure

configure を実行する。

$ ./configure --enable-multibyte=UTF-8  --with-java
checking build system type... i686-pc-linux-gnuoldld
checking host system type... i686-pc-linux-gnuoldld
checking which template to use... linux
checking whether to build with 64-bit integer date/time support... no
checking whether NLS is wanted... no
checking for default port number... 5432
checking for gcc... no
checking for cc... no
configure: error: no acceptable C compiler found in $PATH

C compilerがないと怒られるのでgccをinstallする。

# yum -y install gcc

再びconfigure を実行する。

$ ./configure --enable-multibyte=UTF-8
--with-java
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking which template to use... linux
checking whether to build with 64-bit integer date/time support... no
checking whether NLS is wanted... no
checking for default port number... 5432
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking if gcc supports -Wdeclaration-after-statement... yes
checking if gcc supports -Wold-style-definition... no
checking if gcc supports -Wendif-labels... yes
checking if gcc supports -fno-strict-aliasing... yes
configure: using CFLAGS=-O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
checking whether the C compiler still works... yes
checking how to run the C preprocessor... gcc -E
checking allow thread-safe client libraries... no
checking whether to build with Tcl... no
checking whether to build Perl modules... no
checking whether to build Python modules... no
checking whether to build with Kerberos 4 support... no
checking whether to build with Kerberos 5 support... no
checking whether to build with PAM support... no
checking whether to build with Rendezvous support... no
checking whether to build with OpenSSL support... no
configure: using CPPFLAGS=-D_GNU_SOURCE
configure: using LDFLAGS=
checking for gawk... gawk
checking for flex... no
configure: WARNING:
*** Without Flex you will not be able to build PostgreSQL from CVS or
*** change any of the scanner definition files.  You can obtain Flex from
*** a GNU mirror site.  (If you are using the official distribution of
*** PostgreSQL then you do not need to worry about this because the Flex
*** output is pre-generated.)
checking whether ln -s works... yes
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for ranlib... ranlib
checking for lorder... no
checking for tar... /bin/tar
checking for strip... strip
checking whether it is possible to strip libraries... yes
checking for bison... no
configure: WARNING:
*** Without Bison you will not be able to build PostgreSQL from CVS or
*** change any of the parser definition files.  You can obtain Bison from
*** a GNU mirror site.  (If you are using the official distribution of
*** PostgreSQL then you do not need to worry about this because the Bison
*** output is pre-generated.)  To use a different yacc program (possible,
*** but not recommended), set the environment variable YACC before running
*** 'configure'.
checking for perl... /usr/bin/perl
checking for main in -lbsd... yes
checking for setproctitle in -lutil... no
checking for main in -lm... yes
checking for main in -ldl... yes
checking for main in -lnsl... yes
checking for main in -lsocket... no
checking for main in -lipc... no
checking for main in -lIPC... no
checking for main in -llc... no
checking for main in -ldld... no
checking for main in -lld... no
checking for main in -lcompat... no
checking for main in -lBSD... no
checking for main in -lgen... no
checking for main in -lPW... no
checking for main in -lresolv... yes
checking for library containing getopt_long... none required
checking for main in -lunix... no
checking for library containing crypt... -lcrypt
checking for library containing fdatasync... none required
checking for shmget in -lcygipc... no
checking for readline... no
configure: error: readline library not found
If you have readline already installed, see config.log for details on the
failure.  It is possible the compiler isn't looking in the proper directory.
Use --without-readline to disable readline support.

readline library がないと怒られるのでinstall
と思ったらinstalledだった。readline-devel もinstalled.
libtermcap-devel もinstalledだった。。。???


なんか良くわからないので--without にする。

$ ./configure --enable-multibyte=UTF-8 --wihtout-readline --wihtout-zlib --with-java

make

$ make all
$ make check

これがでたらOK

======================
 All 96 tests passed.
======================


rootに戻って

# make install

create DB

とりあえずpostgresに権限を与える

# chown -R postgres:postgres ./pgsql/

/etc/init.d/postgres

#!/bin/sh
#
# PostgreSQL start and shutdown script
#
# chkconfig: 345 90 11
# description: PostgreSQL start and shutdown script

. /etc/init.d/functions

case "$1" in
 start)
   su - postgres -c "pg_ctl start -o \"-S -i\""
   touch /var/lock/subsys/postgres
   ;;
 stop)
   su - postgres -c "pg_ctl stop -m fast"
   rm -f /var/lock/subsys/postgres
   ;;
 *)
   echo "Usage: /etc/rc.d/init.d/postgres  {start|stop}"

esac
exit 0

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2017-04-07 (金) 16:01:32 (231d)