LoginSignup
15
14

More than 3 years have passed since last update.

2021年最新【EC2】 postgresql9.6、10、11をインストールする方法

Last updated at Posted at 2020-05-14

ググってでて来る記事の通りに作業をするとリンク切れでec2にインストールできなかったのでまとめます。

$  yum update
$  yum install postgresql

noを選択する。すると下記の文字が現れる。

postgresql is available in Amazon Linux Extra topics "postgresql9.6" and "postgresql10" and "postgresql11"

To use, run
# sudo amazon-linux-extras install :topic:

Learn more at
https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras

で、下記を入力すればインストールできる。

$  sudo amazon-linux-extras install postgresql9.6
$  sudo postgresql-setup initdb
$  sudo systemctl start postgresql
$  su - postgres
$  psql

もっというと立ち上げ方法が変わった?ようです。

http://code-aim.work/ec2-postgresql9-61011/

15
14
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
15
14