インストール
sudo apt update sudo apt install -y postgresql-10
パスワード設定
postgres
というLinuxユーザーでログイン。
sudo su - postgres
PostgreSQLのフロントエンドを起動。
psql
postgres
ユーザーのパスワードをpostgres
へ変更。
alter role postgres with password 'postgres';
これが出たら成功。
ALTER ROLE
データベースリストを見るには。
\l
リストのLと覚えるとよい。
DBに接続するには。
\c データベース名
connectのcと覚えるとよい。