0
私はpostgresをインストールするシェルスクリプトを作成しようとしており、その後にいくつかのSQL文を実行しています。私は多くのチュートリアルに従おうとしましたが、peer authentication failed for user postgres
を得続けますか?これまで私は正しくインストールされているが、SQLは実行されていないシェルスクリプトを持っています。ここで開始するpostgresの無人インストールとSQL文
# postgres install
sudo apt-get -y install postgresql postgresql-contrib
# edit configs and restart
sudo echo "listen_addresses = '*'" >> /etc/postgresql/9.5/main/postgresql.conf
sudo echo "local all postgres md5" >> /etc/postgresql/9.5/main/pg_hba.conf
sudo service postgresql restart
sudo -u postgres psql postgres
echo "CREATE USER test WITH LOGIN NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;"
echo "ALTER user postgres WITH PASSWORD '$PASSWORD';"
大丈夫、私は依存postgres' –
'sudoの-uのpostgres psqlの後root'ユーザー'に戻るんか - あなたのスクリプトは何ですか? –
私は、複数のアプリケーションをインストールするインストール後のスクリプトをスクリプト化します。 –