
OSX LionにPostgresqlをインストールしようとしています。Homebrewを使用しているので、インストールは次のように行います。
brew postgresql をインストール
initdb /usr/local/var/postgres
さて、PostgreSQLを起動しようとすると
postgres -D /usr/local/var/postgres
次のエラーが発生します:
postgres はサーバー設定ファイル "/usr/local/var/postgres/postgresql.conf" にアクセスできません: そのようなファイルまたはディレクトリはありません
何が問題なのかを突き止めるために、「brew doctor」を実行したところ、1つのエラーが表示され、それが私の問題である可能性があるようです(100%確信はありませんが)。
Error: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:
archive
clusterdb
createdb
createlang
createuser
dropdb
droplang
dropuser
ecpg
pg_config
pg_dump
pg_dumpall
pg_restore
pg_upgrade
psql
reindexdb
vacuumdb
Consider amending your PATH so that /usr/local/bin is ahead of /usr/bin in your PATH.
PATH変数に/usr/local/binを追加してみました。
PATH=/usr/local/bin:$PATH
.profile の最初の行として入力しましたが、違いはないようです。
これが本当に私の postgresql で問題が発生している理由ですか? これを解決するにはどうすればよいですか?