[pgsql-jp: 35027] Re: accessのmdb のテーブルをpostgresql へ移行し

misoyuki misoyuki @ poplar.ocn.ne.jp
2005年 3月 12日 (土) 21:22:55 JST


こんばんは、

>サーバ側のポートは開いていますか?
>nmapなりで標準の5432ポートの確認をしてください。

はい、nmap と spp にてポートスキャンして
5432/tcp open postgres
起動スクリプトに -i オプションを追加して
やっと確認できました。

ところが
いざはじめようとしても

# su - postgres
%psql -l
psql: Command not found.
%/usr/local/pgsql/bin/psql -l
psql: FATAL:  user "postgres" does not exist

となり受け付けてもらえません。
createdb
createuser
でも同じようなFATALがでます。

以下、起動スクリプトです。
長いですが一応載せさせていただきました。
############################################################################
##
#!/bin/sh

# $FreeBSD: ports/databases/postgresql80-server/files/pgsql.sh.tmpl,v 1.18
2005/
02/15 00:30:50 girgen Exp $
#
# PROVIDE: postgresql
# REQUIRE: LOGIN
# KEYWORD: FreeBSD shutdown
#
# Add the following line to /etc/rc.conf to enable PostgreSQL:
#
#  postgresql_enable="YES"
#  # optional
#  postgresql_data="/usr/local/pgsql/data"
#  postgresql_flags="-w -s -m fast"
#
# This scripts takes one of the following commands:
#
#   start stop restart reload status initdb
#
# For postmaster startup options, edit ${postgresql_data}/postgresql.conf

prefix=/usr/local/pgsql
010.pgsql.sh: unmodified: line 1
#!/bin/sh

# $FreeBSD: ports/databases/postgresql80-server/files/pgsql.sh.tmpl,v 1.18
2005/02/15 00:30:50 girgen Exp $
#
# PROVIDE: postgresql
# REQUIRE: LOGIN
# KEYWORD: FreeBSD shutdown
#
# Add the following line to /etc/rc.conf to enable PostgreSQL:
#
#  postgresql_enable="YES"
#  # optional
#  postgresql_data="/usr/local/pgsql/data"
#  postgresql_flags="-w -s -m fast"
#
# This scripts takes one of the following commands:
#
#   start stop restart reload status initdb
#
# For postmaster startup options, edit ${postgresql_data}/postgresql.conf

prefix=/usr/local/pgsql

. /etc/rc.subr

load_rc_config postgresql

# set defaults
postgresql_enable=${postgresql_enable:-"YES"}
postgresql_flags=${postgresql_flags:-"-w -s -m fast"}
postgresql_user=pgsql
eval postgresql_data=${postgresql_data:-"~${postgresql_user}/data"}

name=postgresql
rcvar=`set_rcvar`
command=${prefix}/bin/pg_ctl
command_args="-o -i -D ${postgresql_data} ${postgresql_flags} $1"
extra_commands="reload initdb"

start_cmd="postgresql_command start"
stop_cmd="postgresql_command stop"
restart_cmd="postgresql_command restart"
reload_cmd="postgresql_command reload"
status_cmd="postgresql_command status"

initdb_cmd="postgresql_initdb"

postgresql_command()
{
    su -m ${postgresql_user} -c "exec ${command} ${command_args}"
}

postgresql_initdb()
{
    su -l ${postgresql_user} -c "exec ${prefix}/bin/initdb -D
${postgresql_data}"
}

run_rc_command "$1"
############################################################################
##

何がいけないのでしょうか?
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.2 - Release Date: 2005/03/11




pgsql-jp メーリングリストの案内