1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

wsl Ubuntu18.04にPostgreSQLをインストールする

Posted at

備忘録を兼ねてメモ
インストール後の操作についても記録しておきたい

環境

・ホストOS: Windows10 Home
・ゲストOS: wsl Ubuntu18.04 LTS
・PostgreSQL12.2

手順

基本的に全てPostgreSQL wiki(https://wiki.postgresql.org/wiki/Apt) に基づいて作業を行います。公式webページよりも理解しやすいです。

① リポジトリを追加する

sudo apt-get install curl ca-certificates gnupg
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add

② リストの作成

deb http://apt.postgresql.org/pub/repos/apt bionic-pgdg main

③ パッケージのアップデートとPostgreSQLのインストール

$ sudo apt-get update
  sudo apt-get install postgresql

④ バージョンの確認

$ psql --version
  psql (PostgreSQL) 12.2 (Ubuntu 12.2-2.pgdg18.04+1)

psqlのバージョンが表示されれば無事インストールができています。

参考資料

PostgreSQL wiki

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?