作成中

Raspbian busterにPostgreSQLをインストール

本記事では、ラズベリーパイのRaspbian busterにPostgreSQLをインストールし、
ユーザ追加、データベース作成、SQLを実行までの記事になります。

使用した環境

PostgreSQLパッケージをインストールする

LXTerminal t.png を使ってaptコマンドでPostgreSQLをインストール手順になります。

  1. PostgreSQLパッケージインストール前に以下のコマンドを実行しアップデートを実施します。
    sudo apt update
    sudo apt -y upgrade
  2. PostgreSQLパッケージを以下のコマンドを実行しインストールします。
    sudo apt -y install postgresql
    ちなみにインストールするpostgresqlパッケージの情報は以下の通りです。
    apt showコマンドで確認することができます。
    $ apt show postgresql
    
    Package: postgresql
    Version: 11+200+deb10u1
    Priority: optional
    Section: database
    Source: postgresql-common (200+deb10u1)
    Maintainer: Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org>
    Installed-Size: 65.5 kB
    Depends: postgresql-11
    Suggests: postgresql-doc
    Tag: devel::lang:sql, interface::daemon, network::server, network::service,
     role::metapackage, role::program, suite::postgresql, works-with::db
    Download-Size: 60.4 kB
    APT-Sources: http://ftp.jaist.ac.jp/raspbian buster/main armhf Packages
    Description: object-relational SQL database (supported version)
     This metapackage always depends on the currently supported PostgreSQL
     database server version.
     .
     PostgreSQL is a fully featured object-relational database management
     system.  It supports a large part of the SQL standard and is designed
     to be extensible by users in many aspects.  Some of the features are:
     ACID transactions, foreign keys, views, sequences, subqueries,
     triggers, user-defined types and functions, outer joins, multiversion
     concurrency control.  Graphical user interfaces and bindings for many
     programming languages are available as well.

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS