• 締切済み

PostgreSqlインストールで

Linux環境にPostgreSqlをインストールしたいのですが以下のエラーがでて困ってます; 手順としては 1, ./configure 2, gmake 3, su 4, gmake install 5, mkdir /usr/local/pgsql/data 6, chown postgres /usr/local/pgsql/data 7, su - postgres 8, /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data 9, /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 & 10, /usr/local/pgsql/bin/createdb test 11, /usr/local/pgsql/bin/psql test まず手順8で以下のエラーが出ます database "postgres" does not exist その後、手順9を実行すると以下のエラーがでます createdb: could not connect to database template1: could not connect to server: そのようなファイルやディレクトリはありません Is the server runnning locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? 解決策等ご存知でしたら教えて頂けないでしょうか? よろしくお願い致します。

みんなの回答

  • TA-HT81S
  • ベストアンサー率39% (72/184)
回答No.1

事前にユーザpostgresを作成してから実行していますか? 一度、/usr/local/pgsql/data以下を全て削除してから、initdbし直してみて下さい。 ユーザpostgresで、データベースpostgresが生成できないと前に進みません。

関連するQ&A

  • PostgreSQLをCentOS5にインストールしました。

    閲覧有難うございます。 質問内容なのですが、Postgresqlをインストールしたのですがpostgresql.confとpg_hba.confが見つかりません。 OSはCentOS5です。 インストール方法は以下の手順で行いました。 # /usr/sbin/adduser postgres # chown postgres:postgres /usr/local/pgsql # mkdir /usr/local/src/postgres-8.2.6 # chown postgres:postgres /usr/local/src/postgresql-8.3.7 # su - postgres # cd /usr/local/src # tar xfz /usr/local/src/postgres-8.2.6.tar.gz # cd /usr/local/src/postgres-8.2.6 # ./configure # make # make install また、 [root@ ~]# su - postgres -bash:  LD_LIBRARY_PATH=/usr/local/pgsql/lib: そのようなファイルやディレクトリはありません -bash:  export: command not found -bash:  PATH=/usr/local/pgsql/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin: そのようなファイルやディレクトリはありません -bash:  export: command not found -bash:  MANPATH=/usr/local/pgsql/man:: そのようなファイルやディレクトリはありません -bash:  export: command not found -bash:  export: command not found -bash:  PATH=/usr/local/pgsql/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin: そのようなファイルやディレクトリはありません -bash:  export: command not found -bash:  MANPATH=/usr/local/pgsql/man:: そのようなファイルやディレクトリはありません -bash:  export: command not found [postgres@ ~]$ のようなエラーがはかれるようになりました。 どうか皆様のお力をお貸しください。

  • RedHat9にPostgreSQL構築できるが、再起動すると消滅

    WindowsXP内のVMWareに仮想マシンRedHat9を構築して便利に使っています。今回この中ににPostgreSQL構築しpostgresql-8.1.3.tar.gzを/usr/local/srcにダウンロード #useradd postgres #mkdir /usr/local/pgsql #mkdir /usr/local/pgsql/data #cd /usr/lcal/src #tar zxfv postgres-8.1.3.tar.gz #chown postgres.postgres /usr/locl/pgsql #chown -R postgres.postgres postgresql.1.3 #su - postgres $cd /usr/local/src/postgresql-8.1.3 $./configure $gmake $gmake install 以上で無事postgreSQLデータベースが完成 引き続きユーザpostgresで $/usr/local/pgsql/bin/initdb -D /usr/local/pogsql/data $/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data $/usr/local/pgsql/bin/createdb TestDB $/usr/local/pgsql/bin/psql TestDB で作成したTestDBに接続でき、テーブルも作りました。 ところがRedHat9をいったん再起動するとできている筈のTestDBに接続できなくなります。どこかにどこかに設定ミスがありますか。何かヒントをいただければうれしいです。 $/usr/local/

  • createdbができません。

    createdbができません。 PostgreSQLをインストールし、createdbを実行したところ次のようなエラーが出てしまいました。 C:\Program Files\PostgreSQL\8.3\bin>createdb -U postgres test createdb: could not connect to database postgres: FATAL: password authentication failed for user "postgres" 自分で調べてみたところ、-Wでパスワードを打ち込めば良いとあったので 試してみましたが、エラーが createdb: could not connect to database postgres: FATAL: password authentication failed for user "Administrator" となるだけです。どうすればよいのでしょうか。 環境はwindows xpです。 よろしくお願いします。

  • postgreSQLのinitdb

    postgreSQL7.2.3のインストールを行いました。 % tar vxfz postgresql-7.2.3.tar.gz % cd postgresql-7.2.3 % ./configure --enable-locale --enable-multibyte=EUC_JP |& tee Configure.out % make | & tee Make.out % su # tcsh % make install | &tee Make_install.out % chown -R postgres:postgres /usr/local/pgsql ここまでは何も問題なく終わったのですが、 次に initdb を実行したところ以下エラーが出ます。 % su postgres % /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data ld.so.1: /usr/local/pgsql/bin/pg_encoding: 重大なエラー: libgcc_s.so.1: open に 失敗しました: ファイルもディレクトリもありません。 initdb: pg_encoding failed Perhaps you did not configure PostgreSQL for multibyte support or the program was not successfully installed. ↑ここまで 「マルチバイトサポートしていません」 「インストールに失敗しています」というような内容なのですが、 何がダメだったのでしょうか? ちなみにOSは Solaris9/02です。

  • PostgreSQLはインストールされている?

    $ /usr/local/pgsql/bin/postmaster -D PGDATA を実行すると、 database system is ready と表示されますが、 # rpm -qa|grep postgres を実行すると、何も表示されません。PostgreSQL7.2.3はインストールされているといえるのでしょうか?

  • 続 PostgreSQLのインストール

    fedora core1です。 postgreSQLで 一般ユーザーでログイン後 vi .bashrcで エディターを起動し export PATH=$PATH;/usr/local/pgsql/bin export MANPATH=$MANPATH:/usr/local/pgsql/man export POSTGRES_HOME=/usr/local/pgsql export PGLIB=$POSTGRES_HOME/lib 追加編集後 :wqで終了すると E45: 'readonly' オプションが設定されています (! を追加で上書き) :wq!で ".bashrc" ".bashrc" E212: 書込み用にファイルを開けません というエラーがでました。 これはどう対処したらよいでしょうか?

  • postgreSQLが初期化できないのです。

    初めまして。vine Linux にPostgreSQLをインストールしたのですが、 初期化の initdb が成功しません。 his user will own all the data files and must also own the server process. Creating database system directory /usr/local/pgsql/data Creating database system directory /usr/local/pgsql/data/base Creating database XLOG directory /usr/local/pgsql/data/pg_xlog Creating template database in /usr/local/pgsql/data/base/template1 021109.20:31:19.898 [14757] ERROR: Error: unknown type 'oid8'. 021109.20:31:19.898 [14757] ERROR: Error: unknown type 'oid8'. Creating global relations in /usr/local/pgsql/data/base Adding template1 database to pg_database initdb failed. Removing /usr/local/pgsql/data. Removing temp file /tmp/initdb.14730. のように、 unknown type 'oid8' と言われてしまいます。 この対処の方法をどなたか、教えてください。 お願いします。

  • PostgreSQLのinitdbでエラーが出てしまいます。

    どなたか教えて下さい。 RedhatLinux6.2J に PostgreSQL7.0.3をインストールしようとしています。 ソースファイルのコンパイルとインストールは正常に終了したつもりです。 postgres用ユーザーの環境変数も設定したつもりです。 しかし、postgres用ユーザーでinitdbを実行したところ、 Creating template database in /usr/local/pgsql/data/base/template1 ERROR: Error:unknown type 'oidvector'. ERROR: Error:unknown type 'oidvector'.  syntax error 12: parse errorinitdb:could not create templatedatebase というエラーメッセージが出てしまいます。 template1というデータベースが作成できなかった、ということは何となく わかるのですが、エラーの原因が何かさっぱり分かりません。 どうぞ、教えて下さい。お願いします。

  • PHPのpostgreSqlの関数???

    Postgresqlへのパスは下記のとおり通っています。 fumi@tsl fumi]$ echo $PATH /usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/pgsql/bin:/home/fumi/bin PHPを起動したら下記のエラーが出るのは何故でしょうか?どうすれはpostgresqlの関数をPHPで使えるようになりますか? Fatal error: Call to undefined function: pg_connect() in /home/fumi/www/pgimage-1.2/init.inc on line 54 よきアドバイスお願いいたします。

    • 締切済み
    • PHP
  • initdbのオプション

    PostgreSQL7.2.3インストール後、 $ /usr/local/pgsql/bin/initdb を実行したところ、 You must identify where the data for this database system will reside. Do this with either a -D invocation option or a PGDATA environment variable. と表示されます。これは、.bashrcで追加した下記内容が読み込まれていないからでしょうか? POSTGRES_HOME=/usr/local/pgsql export PATH="$PATH":/usr/local/pgsql/bin export PGLIB=$POSTGRES_HOME/lib export PGDATA=$POSTGRES_HOME/data export MANPATH="$MANPATH":$POSTGRES_HOME/man 上記オプションはどちらを選べばよいでしょうか?また、PGDATAの場合、"-"なしでそのままPGDATAでしょうか?