[LINUX] wsl Install PostgreSQL on Ubuntu 18.04

A memo that doubles as a memorandum I also want to record the operation after installation

environment

-Host OS: Windows10 Home ・ Guest OS: wsl Ubuntu18.04 LTS ・ PostgreSQL 12.2

procedure

Basically everything is based on the PostgreSQL wiki (https://wiki.postgresql.org/wiki/Apt). It is easier to understand than the official web page.

① Add a repository

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

② Create a list

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

③ Package update and PostgreSQL installation

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

④ Check the version

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

If the version of psql is displayed, the installation is successful.

Reference material

PostgreSQL wiki

Recommended Posts

wsl Install PostgreSQL on Ubuntu 18.04
Install Docker on WSL Ubuntu 18.04
Install TensorFlow on Ubuntu
Install python on WSL
Install PySide2 on Ubuntu
Install JModelica on Ubuntu
Install Pleasant on Ubuntu 20.04 (.NetCore3.1 / PostgreSQL version)
Install Python 3.3 on Ubuntu 12.04
Install Theano on Ubuntu 12.04
Install angr on Ubuntu 18.04
Install pip / pip3 on Ubuntu
Install GoLand IDE on Ubuntu
Install OpenCV on Ubuntu + python
[ROS] Install ROS (melodic) on Ubuntu (18.04)
Install Caffe on Ubuntu 14.04 (GPU)
Install CUDA10.1 + cuDNN7.6.5 + tensorflow-2.3.0 on Ubuntu 18.04
Install Python 3.8 on Ubuntu 18.04 (OS standard)
Install Caffe on Ubuntu 14.04 (CPU mode)
Install and run dropbox on Ubuntu 20.04
Install OpenCV and Chainer on Ubuntu
Install CUDA 8.0 and Chainer on Ubuntu 16.04
Install Python 3.8 on Ubuntu 20.04 (OS standard)
Install fabric on Ubuntu and try
Install Python 3.9 on Ubuntu 20.04 (OS standard?)
Install confluent-kafka for Python on Ubuntu
Install Python 2.7 on Ubuntu 20.04 (OS standard?)
How to install Go on Ubuntu
ROS study # 1 Install ros-noetic on ubuntu 20.04
Install wsl2 and master linux on windows
Shebang on Ubuntu 20.04
Steps to install Python environment on Ubuntu
Install ubuntu on 32bit UEFI Ultra Notebook
Install Caffe running 3D-CNN on clean Ubuntu 14.04
Install Puppet Master and Client on Ubuntu 16.04
How to install php7.4 on Linux (Ubuntu)
Install pyenv and Python 3.6.8 on Ubuntu 18.04 LTS
Install PostgreSQL from source code on CentOS
I can't install Dask with pip on Ubuntu
[Procedure memo] Install Python3 + OpenSSL locally on Ubuntu
[Note] Install wxPython 3.x on Linux Mint (Ubuntu)
Install the latest Cuda + CuDNN on Ubuntu 18.04 @ Spring 2020
Install MongoDB on Ubuntu 16.04 and operate via python
Install Ubuntu 20.04 LTS (Server) 64bit version on RaspberryPi3B +
Install mecab on Marvericks
Install Tensorflow on Mac
Install Faiss on CentOS 7
Install pyenv on mac
Install Python on Pidora.
Install mongodb on termux
install diagrams in wsl
Install Scrapy on python3
Install docker on Fedora31
Linux (WSL) on Windows
Install numba on CentOS 7.2
Install Ansible on Mac
Install Python on Mac
Install Python 3 on Mac
Install Plone (4.3.6) on MacOSX (10.10.3)
Install Python3.4 on CentOS 6.6
Install Docker (Ubuntu 18.04 LTS)
Install gensim on Marvericks