PostgreSQL > PostgreSQLをUbuntuにインストール
更新日
2011-12-17
広告
UbuntuにPostgreSQLをインストールする方法を紹介します。
- OS: Ubuntu 10.10
以下のコマンドでインストールは完了です。
$ sudo apt-get install postgresqlウィンドウシステムを利用できる場合は Synaptic パッケージマネージャを利用してもいいでしょう。
上記方法でインストールが完了すると、もうPostgreSQLが動いてます。
現時点ではバージョン8.4がインストールされたようです。
$ ps -aef | grep postgres postgres 5172 1 0 21:35 ? 00:00:00 /usr/lib/postgresql/8.4/bin/postgres -D /var/lib/postgresql/8.4/main -c config_file=/etc/postgresql/8.4/main/postgresql.conf postgres 5175 5172 0 21:35 ? 00:00:00 postgres: writer process postgres 5176 5172 0 21:35 ? 00:00:00 postgres: wal writer process postgres 5177 5172 0 21:35 ? 00:00:00 postgres: autovacuum launcher process postgres 5178 5172 0 21:35 ? 00:00:00 postgres: stats collector process
ユーザ postgres も作成されてます。
あとは、以下のように、データベースを作成してログインできます。
$ sudo su - postgres # ユーザpostgresになる $ createdb testdb # データベース testdb を作成 $ psql testdb # testdb にログイン
広告
お問い合わせは sweng.tips@gmail.com まで。