Re: novato instalacion 7.4 sobre 7.0 en RH7

From: Juanky Moral <juanky(dot)moral(at)gmail(dot)com>
To: Alexis Vasquez <lxvasquez(at)yahoo(dot)es>
Cc: postgres-es postgres-es <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: novato instalacion 7.4 sobre 7.0 en RH7
Date: 2004-12-22 19:39:13
Message-ID: 463a53a404122211397448de40@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Como no es muy largo, pego el script:

>>>>>aquí comienza<<<<<<<
#! /bin/sh

# chkconfig: 2345 98 02
# description: PostgreSQL RDBMS

# This is an example of a start/stop script for SysV-style init, such
# as is used on Linux systems. You should edit some of the variables
# and maybe the 'echo' commands.
#
# Place this file at /etc/init.d/postgresql (or
# /etc/rc.d/init.d/postgresql) and make symlinks to
# /etc/rc.d/rc0.d/K02postgresql
# /etc/rc.d/rc1.d/K02postgresql
# /etc/rc.d/rc2.d/K02postgresql
# /etc/rc.d/rc3.d/S98postgresql
# /etc/rc.d/rc4.d/S98postgresql
# /etc/rc.d/rc5.d/S98postgresql
# Or, if you have chkconfig, simply:
# chkconfig --add postgresql
#
# Proper init scripts on Linux systems normally require setting lock
# and pid files under /var/run as well as reacting to network
# settings, so you should treat this with care.

# Original author: Ryan Kirkpatrick <pgsql(at)rkirkpat(dot)net>

# $PostgreSQL: pgsql-server/contrib/start-scripts/linux,v 1.6
2003/11/29 19:51:36 pgsql Exp $

## EDIT FROM HERE

# Installation prefix
prefix=/usr/local/pgsql

# Data directory
PGDATA="/usr/local/pgsql/data"

# Who to run pg_ctl as, should be "postgres".
PGUSER=postgres

# Where to keep a log file
PGLOG="$PGDATA/serverlog"

## STOP EDITING HERE

# Check for echo -n vs echo \c
if echo '\c' | grep -s c >/dev/null 2>&1 ; then
ECHO_N="echo -n"
ECHO_C=""
else
ECHO_N="echo"
ECHO_C='\c'
fi

# The path that is to be used for the script
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# What to use to start up the postmaster
DAEMON="$prefix/bin/pg_ctl"

set -e

# Only start if we can find pg_ctl.
test -f $DAEMON || exit 0

# Parse command line parameters.
case $1 in
start)
$ECHO_N "Starting PostgreSQL: "$ECHO_C
su - $PGUSER -c "$DAEMON start -D '$PGDATA' -s -l $PGLOG"
echo "ok"
;;
stop)
echo -n "Stopping PostgreSQL: "
su - $PGUSER -c "$DAEMON stop -D '$PGDATA' -s -m fast"
echo "ok"
;;
restart)
echo -n "Restarting PostgreSQL: "
su - $PGUSER -c "$DAEMON restart -D '$PGDATA' -s -m fast -l $PGLOG"
echo "ok"
;;
reload)
echo -n "Reload PostgreSQL: "
su - $PGUSER -c "$DAEMON reload -D '$PGDATA' -s"
echo "ok"
;;
status)
su - $PGUSER -c "$DAEMON status -D '$PGDATA'"
;;
*)
# Print help
echo "Usage: $0 {start|stop|restart|reload|status}" 1>&2
exit 1
;;
esac

exit 0
<<<<<<<<aquí termina >>>>>>

On Wed, 22 Dec 2004 20:29:51 +0100 (CET), Alexis Vasquez
<lxvasquez(at)yahoo(dot)es> wrote:
> mil gracias juanky. seguire leyendo para no
> fastidiar mucho.. podrias enviarme de nuevo ese
> script. cuando lo descargo dice que es octal y llega
> todo descompuesto. intente buscarlo por google y me
> pierdo cada vez mas. ya que me hablaban de un pg_ctl
> o postmaster o postgresql y eran todos muy diferentes.
>
>
> --- Juanky Moral <juanky(dot)moral(at)gmail(dot)com> escribió:
> > Te adjunto el script de inicio que va en el
> > directorio contrib de la
> > distribución fuente. Es muy fácil de adecuar a
> > cualquier instalación y
> > a mí siempre me ha funcionado a la primera.
> > Suerte.
> >
> >
> > On Wed, 22 Dec 2004 18:56:30 +0100 (CET), Alexis
> > Vasquez
> > <lxvasquez(at)yahoo(dot)es> wrote:
> > > tal como dijiste.
> > >
> > > bash-2.04$ /usr/local/pgsql/bin/psql -l
> > > List of databases
> > > Name | Owner | Encoding
> > > -----------+----------+-----------
> > > template0 | postgres | SQL_ASCII
> > > template1 | postgres | SQL_ASCII
> > > (2 rows)
> > >
> > > ahora bien. no he visto que el usuario postgres
> > tenga
> > > un .profile o .bash_profile para ponerle el PATH.
> > > o donde decirle al /etc/rc.d/init.d/postgresql
> > donde
> > > debe buscar los datafiles
> > >
> > >
> > > --- Juanky Moral <juanky(dot)moral(at)gmail(dot)com>
> > escribió:
> > > > Eso es porque la ruta a los binarios de postgres
> > no
> > > > se halla en el PATH:
> > > > prueba algo así:
> > > > /usr/local/pgsq/bin/psql -l
> > > > (asumiendo esa ruta en tu instalación)
> > > >
> > > >
> > > >
> > > > On Wed, 22 Dec 2004 18:02:39 +0100 (CET), Alexis
> > > > Vasquez
> > > > <lxvasquez(at)yahoo(dot)es> wrote:
> > > > > psql -l
> > > > > command not found
> > > > >
> > > > > psql template1
> > > > > command not found
> > > > >
> > > > > --- Juanky Moral <juanky(dot)moral(at)gmail(dot)com>
> > > > escribió:
> > > > > > A ver, varias cosas:
> > > > > > - para contestar a la lista, en tu cliente
> > de
> > > > correo
> > > > > > pulsa la opción
> > > > > > de 'contestar a todos' o 'reply to all'.
> > > > > > - no me queda claro si el servidor te
> > arranca
> > > > > > finalmente o no:
> > > > > > bash-2.04$ /usr/local/pgsql/bin/postmaster
> > -D
> > > > > > /usr/local/pgsql/data
> > > > > > LOG: could not resolve "localhost":
> > Temporary
> > > > > > failure
> > > > > > in name resolution
> > > > > > LOG: database system was shut down at
> > > > 2004-12-22
> > > > > > 10:15:13 AST
> > > > > > LOG: checkpoint record is at 0/9B1098
> > > > > > LOG: redo record is at 0/9B1098; undo
> > record is
> > > > at
> > > > > > 0/0; shutdown TRUE
> > > > > > LOG: next transaction ID: 536; next OID:
> > 17142
> > > > > > LOG: database system is ready
> > > > > >
> > > > > > La última línea parece apuntar a que sí.
> > > > > > Haz como usuario postgres (su posgres):
> > > > > > psql -l
> > > > > >
> > > > > > o conéctate a template1;
> > > > > > psql template1
> > > > > >
> > > > > > a ver qué dice el backend... ya nos cuentas.
> > > > > > Un adp.
> > > > > >
> > > > > >
> > > > > > On Wed, 22 Dec 2004 17:02:25 +0100 (CET),
> > Alexis
> > > > > > Vasquez
> > > > > > <lxvasquez(at)yahoo(dot)es> wrote:
> > > > > > > de nuevo gracias juanky.
> > > > > > > el pg_hba.conf estaba bien, pero el
> > > > postgres.conf
> > > > > > > tenia comentada la linea del
> > tcpip_socket..
> > > > la
> > > > > > puse
> > > > > > > true. pero no encontre lo del
> > > > 'hostname_lookup',
> > > > > > y
> > > > > > > excusame lo de la lista. soy nuevo en
> > todo
> > > > > > esto...
> > > > > > >
> > > > > > > el señor mario soto, de esta lista, me
> > dijo
> > > > que
> > > > > > el
> > > > > > > problema puede ser debido a que no
> > desinstale
> > > > el
> > > > > > > postgres 7 que viene con redhat 7. y que
> > lo
> > > > > > instala
> > > > > > > por defecto en /usr/lib/pgsql... yo lo
> > > > instale en
> > > > > > > /usr/local/pgsql.
> > > > > > >
> > > > > > > realmente soy nuevo en esto y me gustaria
> > una
> > > > > > especie
> > > > > > > de instructivo paso a paso de las cosas
> > que
> > > > > > deberia
> > > > > > > verificar... los manuales y documentos
> > me
> > > > tienen
> > > > > > > abrumado. os prometo RTFM later.
> > > > > > >
> > > > > > >
> > > > > > > --- Juanky Moral <juanky(dot)moral(at)gmail(dot)com>
> > > > > > escribió:
> > > > > > > > En primer lugar, por favor, envía los
> > > > mensajes
> > > > > > > > también a lista. De esa
> > > > > > > > forma TODOS te podrán ayudar.
> > > > > > > >
> > > > > > > > Por la información que me das, parece
> > > > problema
> > > > > > de
> > > > > > > > autenticación.
> > > > > > > > ¿te llegas a conectar desde el servidor?
> > > > > > > > Comprueba que al menos esta líneas estén
> > en
> > > > tu
> > > > > > > > pg_hba.conf
> > > > > > > >
> > > > > > > > local all all
> > > > > > > > trust
> > > > > > > > host all all
> > 127.0.0.1
> > > > > > > > 255.255.255.255 trust
> > > > > > > >
> > > > > > > > Para aceptar conexiones externas TCP/IP,
> > > > debes
> > > > > > > > declararlo también en
> > > > > > > > postgresql.conf:
> > > > > > > > tcpip_socket = true
> > > > > > > >
> > > > > > > > Yo probaría también (en el mismo
> > fichero):
> > > > > > > > hostname_lookup = false
> > > > > > > > aunque no sé si esto último ayudará en
> > algo.
> > > > > > > >
> > > > > > > > salu2
> > > > > > > >
> > > > > > > > On Wed, 22 Dec 2004 16:07:23 +0100
> > (CET),
> > > > Alexis
> > > > > > > > Vasquez
> > > > > > > > <lxvasquez(at)yahoo(dot)es> wrote:
> > > > > > > > > Gracias Juanky.
> > > > > > > > >
> > > > > > > > > si he hecho el
> > /usr/local/pgsql/bin/initdb
> > > > -D
> > > > > > > > > /usr/local/pgsql/data
> > > > > > > > >
> > > > > > > > > y creó 'supongo' algo..
> > > > > > > > >
> > > > > > > > > pero luego al darle el comando
> > > > > > > > > bash-2.04$
> > /usr/local/pgsql/bin/postmaster
> > > > -D
> > > > > > > > > /usr/local/pgsql/data
> > > > > > > > > LOG: could not resolve "localhost":
> > > > Temporary
> > > > > > > > failure
> > > > > > > > > in name resolution
> > > > > > > > > LOG: database system was shut down at
> > > > > > 2004-12-22
> > > > > > > > > 10:15:13 AST
> > > > > > > > > LOG: checkpoint record is at 0/9B1098
> > > > > > > > > LOG: redo record is at 0/9B1098; undo
> > > > record
> > > > > > is
> >
> === message truncated ===
>
> > ATTACHMENT part 2 application/octet-stream
> name=postgresql
>
> ______________________________________________
> Renovamos el Correo Yahoo!: ¡250 MB GRATIS!
> Nuevos servicios, más seguridad
> http://correo.yahoo.es
>

--
Juanky Moral
(desde Valencia, España)

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Leonel Nunez 2004-12-22 20:13:27 Re: Sobre conexion
Previous Message Juanky Moral Payá 2004-12-22 19:36:35 RE: novato instalacion 7.4 sobre 7.0 en RH7