Just do IT

思うは招く

vagrant + ubuntu の環境にPostgreSQLをインストールするメモ

インストール

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と覚えるとよい。