debian12をクライアントOSとして利用 PgAdminをインストール

未分類

本ページは広告が含まれています。気になる広告をクリック頂けますと、サーバ運営費になります(^^

必要なパッケージのインストール (curl など)
まず、リポジトリの追加に必要な curl と gpg がインストール

apt install curl gpg
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
gpg is already the newest version (2.2.40-1.1+deb12u1).
gpg set to manually installed.
The following NEW packages will be installed:
  curl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 316 kB of archives.
After this operation, 501 kB of additional disk space will be used.

pgAdmin の GPG キーを追加

リポジトリの正当性を検証するために、公式の GPG キーをシステムに追加します。

# curl -fsS https://www.pgadmin.org/static/packages_pgadmin_org.pub | gpg --dearmor -o /usr/share/keyrings/packages-pgadmin-org.gpg

pgAdmin のリポジトリ設定ファイルを作成

APT が pgAdmin のパッケージを見つけられるように、設定ファイルを作成します。

sh -c 'echo "deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list'

パッケージリストを更新

新しいリポジトリの情報をシステムに読み込ませます。

 apt-get update
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
Hit:3 https://dl.google.com/linux/chrome/deb stable InRelease                  
Hit:4 http://security.debian.org/debian-security bookworm-security InRelease   
Get:5 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/bookworm pgadmin4 InRelease [4,217 B]
Get:6 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/bookworm pgadmin4/main all Packages [3,478 B]
Get:7 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/bookworm pgadmin4/main amd64 Packages [6,154 B]
Fetched 13.8 kB in 1s (16.5 kB/s)
Reading package lists... Done

pgAdmin4 関連のアプリケーションがaptで取得できるようになります。

# apt-cache search pgadmin
postgresql-15-pldebugger - PostgreSQL pl/pgsql Debugger API
pgadmin4-desktop - The desktop user interface for pgAdmin. pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.
pgadmin4-server - The core server package for pgAdmin. pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.
pgadmin4-web - The web interface for pgAdmin, hosted under Apache HTTPD. pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.
pgadmin4 - Installs all required components to run pgAdmin in desktop and web modes. pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.

pgAdmin 4 をインストール

これで apt コマンドで pgAdmin 4 をインストールできるようになります。

デスクトップアプリケーションとして使いたい場合は、pgadmin4-desktop をインストールするのが最も簡単です。

apt-get install pgadmin4-desktop
タイトルとURLをコピーしました