pgAdmin4のインストール(Ubuntu 22.04)
PostgreSQLは、僕は、Dockerで動かしている。
$ cd ~/Docker/postgres
$ docker-compose up -d
Starting postgres … done
$ docker-compose ps
postgres docker-entrypoint.sh postgres Up 0.0.0.0:5432->5432/tcp,:::543 2->5432/tcp
apt-get のリポジトリの更新
以下のコマンドを実行。リポジトリを更新する。
$ sudo curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add
$ sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'
インストール
$ sudo apt install pgadmin4
次のコマンドを実行。
メールアドレスとパスワードを聞かれる。
$ sudo /usr/pgadmin4/bin/setup-web.sh
パスワードは最低6文字が必要だった。
パスワードの設定のあと、以下のように聞かれた。
いずれの場合も y と入力した。
Creating storage and log directories…
We can now configure the Apache Web server for you. This involves enabling the wsgi module and configuring the pgAdmin 4 application to mount at /pgadmin4. Do you wish to continue (y/n)? y
The Apache web server is running and must be restarted for the pgAdmin 4 installation to complete. Continue (y/n)? y
Apache successfully restarted. You can now start using pgAdmin 4 in web mode at http://127.0.0.1/pgadmin4
pgAdmin4を起動。
http://127.0.0.1/pgadmin4
メールアドレスとパスワード(インストール時に設定したもの)を
入力する。
ログイン時に English を Japanese にすると、日本語環境になる。
参考
【Ubuntu Server 20.04】pgAdmin4のインストール手順 | PostgresWeb
カテゴリー: memo, PostgreSQL, Ubuntu
タグ: pgAdmin4, postgresql
カウント: 204