Installation

Поиск
Список
Период
Сортировка
От Albert REINER
Тема Installation
Дата
Msg-id 19990430221845.A512@frithjof
обсуждение исходный текст
Список pgsql-ports
A couple of days ago I succeeded in installing PostgreSQL, Version
6.3.2, on my IBM-compatible PC (AMD-K6) running Linux (Kernel 2.0.35,
S.u.S.E. 5.3).

The Makefile as obtained after "configure" did not work; psql was not
correctly make'd. But at the end of the run of make, I still got the
(wrong) message that all of PostgreSQL was successfully made; there
seems to be something very wrong with the Makefile.

In order to compile successfully, I had to add not only "-ltermcap"
(as stated in the FAQ_Linux) but also an explicit path:
"-L/usr/lib/termcap".

The script provided in the contrib section for starting the postmaster
every time the system is booted does not work for me; my adaptation of
that script, which seems to work fine for the Linux SuSE 5.3
distribution I use (and under bash), is as follows:

----------------------------------------------------------------
#!/bin/sh
#
# postgres.init Start postgres back end system.
#
# Author:   Thomas Lockhart <lockhart@alumni.caltech.edu>
#           modified from other startup files in the RedHat Linux distribution
# modified by Albert Reiner <areiner@tph.tuwien.ac.at> for SuSE 5.3, 19990425:
#
PGACCOUNT="postgres"    # the postgres account (you called it something else?)
POSTMASTER="postmaster"    # this probably won't change

PGLOGFILE="/home/postgres/log.postgres"

#PGOPTS="-i -B 256"    # -i to enable TCP/IP rather than Unix socket
#PGOPTS="-B 256"        # Do we need 256 buffers? a.r.
PGOPTS=

# See how we were called.
case "$1" in
  start)
    if [ -f ${PGLOGFILE} ]
    then
        mv ${PGLOGFILE} ${PGLOGFILE}.old
    fi
    echo -n "Starting postgres: "
# force full login to get path names
    su --login --command="$POSTMASTER $PGOPTS >& $PGLOGFILE &" \
                   $PGACCOUNT > /dev/null &
    sleep 5
    pid=`pidof ${POSTMASTER}`
    echo -n "${POSTMASTER} [$pid]"
    echo
    ;;
  stop)
    echo -n "Stopping postgres: "
    pid=`pidof ${POSTMASTER}`
    if [ "$pid" != "" ] ; then
        echo -n "${POSTMASTER} [$pid]"
        kill -TERM $pid
        sleep 1
    fi
    echo
    ;;
  *)
    echo "Usage: $0 {start|stop}"
    exit 1
esac

exit 0
----------------------------------------------------------------

In order to make it work, one should

*) login as root

*) copy the above script (possibly after editing to suit one's needs)
   to /sbin/init.d/postgres

*) # cd rc2.d

*) # ln -s ../postgres K85postgres

*) # ln -s ../postgres S85postgres

*) # cd /sbin/init.d/rc3.d

*) # ln -s ../postgres K85postgres

*) # ln -s ../postgres S85postgres

The number in the links' names (I use 85) can be chosen differently
but should be a relatively high one but still less than that of
zzreached.

Another point I feel I should address is the following: in the
Installation Instructions there are a number of differences with
respect to the programs' real behavior; in particular, I noted the
following:

*) Step 11): The Installation instructinos claim that configure will
   "ask you to choose one" of the template files; this did not happen for
   me.

*) Step 13): The Installation instructions claim that the last line
   displayed will be "gmake[1]: Leaving directory...". This does not take
   into account the final make-command "cat ../register.txt".

*) Step 18): In the regression tests' README file,
   /usr/src/pgsql/src/test/regress/README, you should add the hint that
   one has to "cd /usr/src/pgsql/src/test/regress" first.

*) Step 25): At least the first two "rm"-commands are relevant only
   for people who are upgrading an older version of PostgreSQL.


Hoping that some of these hints may prove to be of interest for
someone out there,

Albert.

--

---------------------------------------------------------------------------
  Post an / Mail to / Skribu al: Albert Reiner <areiner@tph.tuwien.ac.at>
---------------------------------------------------------------------------


В списке pgsql-ports по дате отправления:

Предыдущее
От: Rick Dole
Дата:
Сообщение: ...
Следующее
От: Unprivileged user
Дата:
Сообщение: Port Bug Report: gmake all fails due to "buggy Flex"