PostgreSQL/PostgreSQL9.1をUbuntuにインストール
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#navi(../)
* PostgreSQL9.1をUbuntuにインストール [#g0e157df]
Ubuntu12.04にPostgreSQLをインストールした時の備忘録です。~
尚、PostgreSQLはapt-getコマンドを使用してパッケージをイン...
#contents
#htmlinsertpcsp(db-top.html,db-sp.html)
* PostgreSQLパッケージを検索 [#ycfaef3e]
apt-cacheコマンドでPostgreSQLのパッケージを検索しました。~
検索した時の出力は以下の通りです。~
PostgreSQL8.4, PostgreSQL9.1のパッケージが検索されたので...
sakura@ubuntu:~$ apt-cache search postgresql | grep ^pos...
postgresql - object-relational SQL database (supported v...
postgresql-9.1 - object-relational SQL database, version...
postgresql-9.1-dbg - debug symbols for postgresql-9.1
postgresql-client - front-end programs for PostgreSQL (s...
postgresql-client-9.1 - front-end programs for PostgreSQ...
<snip>
postgresql-8.4 - object-relational SQL database, version...
postgresql-client-8.4 - front-end programs for PostgreSQ...
postgresql-client-common - manager for multiple PostgreS...
postgresql-common - PostgreSQL データベースクラスタマネ...
postgresql-contrib-8.4 - additional facilities for Postg...
postgresql-doc-8.4 - documentation for the PostgreSQL da...
postgresql-server-dev-8.4 - development files for Postgr...
<snip>
* PostgreSQL9.1のインストール [#afb2e898]
以下のコマンドでPostgresQL9.1のインストールを行います。
sudo apt-get install -y postgresql-9.1
上記コマンドを実行した結果です。
sakura@ubuntu:~$ sudo apt-get install -y postgresql-9.1
[sudo] password for sakura:
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
以下の特別パッケージがインストールされます:
libpq5 postgresql-client-9.1 postgresql-client-common ...
提案パッケージ:
oidentd ident-server locales-all postgresql-doc-9.1 op...
以下のパッケージが新たにインストールされます:
libpq5 postgresql-9.1 postgresql-client-9.1 postgresql...
アップグレード: 0 個、新規インストール: 6 個、削除: 0 個...
5,512 kB のアーカイブを取得する必要があります。
この操作後に追加で 15.7 MB のディスク容量が消費されます。
<snip>
* Starting PostgreSQL 9.1 database server ...
libc-bin のトリガを処理しています ...
ldconfig deferred processing now taking place
* PostgreSQLを使ってみる [#j57e6a80]
インストール後、/etc/passwdを確認するとpostgresユーザが追...
以下のコマンドでpostgresユーザにスイッチし、操作してみま...
sudo -i -u postgres
上記コマンドでpostgresユーザにスイッチし、psqlコマンドを...
postgres@ubuntu:~$ psql
psql (9.1.10)
Type "help" for help.
postgres=#
バージョンを表示するSELECT文を実行したときの出力結果です。
postgres=# select version();
version
--------------------------------------------------------...
PostgreSQL 9.1.10 on i686-pc-linux-gnu, compiled by gcc...
(1 row)
PostgreSQLのシェルを終了します。
postgres=# \q
postgres@ubuntu:~$
以上、PostgreSQLのインストール後、PostgreSQLに接続し簡単...
** postgresユーザにパスワードを設定する [#cecc39c2]
上記では、sudo -i -u postgresコマンドでpostgresユーザにス...
suコマンドでpostgresユーザにスイッチするには、postgresユ...
以下のコマンドでpostgresユーザにパスワードを設定すること...
sudo passwd postgres
以上、UbuntuにPostgreSQL9.1のパッケージをインストールした...
#htmlinsertpcsp(db-btm.html,db-sp.html)
終了行:
#navi(../)
* PostgreSQL9.1をUbuntuにインストール [#g0e157df]
Ubuntu12.04にPostgreSQLをインストールした時の備忘録です。~
尚、PostgreSQLはapt-getコマンドを使用してパッケージをイン...
#contents
#htmlinsertpcsp(db-top.html,db-sp.html)
* PostgreSQLパッケージを検索 [#ycfaef3e]
apt-cacheコマンドでPostgreSQLのパッケージを検索しました。~
検索した時の出力は以下の通りです。~
PostgreSQL8.4, PostgreSQL9.1のパッケージが検索されたので...
sakura@ubuntu:~$ apt-cache search postgresql | grep ^pos...
postgresql - object-relational SQL database (supported v...
postgresql-9.1 - object-relational SQL database, version...
postgresql-9.1-dbg - debug symbols for postgresql-9.1
postgresql-client - front-end programs for PostgreSQL (s...
postgresql-client-9.1 - front-end programs for PostgreSQ...
<snip>
postgresql-8.4 - object-relational SQL database, version...
postgresql-client-8.4 - front-end programs for PostgreSQ...
postgresql-client-common - manager for multiple PostgreS...
postgresql-common - PostgreSQL データベースクラスタマネ...
postgresql-contrib-8.4 - additional facilities for Postg...
postgresql-doc-8.4 - documentation for the PostgreSQL da...
postgresql-server-dev-8.4 - development files for Postgr...
<snip>
* PostgreSQL9.1のインストール [#afb2e898]
以下のコマンドでPostgresQL9.1のインストールを行います。
sudo apt-get install -y postgresql-9.1
上記コマンドを実行した結果です。
sakura@ubuntu:~$ sudo apt-get install -y postgresql-9.1
[sudo] password for sakura:
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
以下の特別パッケージがインストールされます:
libpq5 postgresql-client-9.1 postgresql-client-common ...
提案パッケージ:
oidentd ident-server locales-all postgresql-doc-9.1 op...
以下のパッケージが新たにインストールされます:
libpq5 postgresql-9.1 postgresql-client-9.1 postgresql...
アップグレード: 0 個、新規インストール: 6 個、削除: 0 個...
5,512 kB のアーカイブを取得する必要があります。
この操作後に追加で 15.7 MB のディスク容量が消費されます。
<snip>
* Starting PostgreSQL 9.1 database server ...
libc-bin のトリガを処理しています ...
ldconfig deferred processing now taking place
* PostgreSQLを使ってみる [#j57e6a80]
インストール後、/etc/passwdを確認するとpostgresユーザが追...
以下のコマンドでpostgresユーザにスイッチし、操作してみま...
sudo -i -u postgres
上記コマンドでpostgresユーザにスイッチし、psqlコマンドを...
postgres@ubuntu:~$ psql
psql (9.1.10)
Type "help" for help.
postgres=#
バージョンを表示するSELECT文を実行したときの出力結果です。
postgres=# select version();
version
--------------------------------------------------------...
PostgreSQL 9.1.10 on i686-pc-linux-gnu, compiled by gcc...
(1 row)
PostgreSQLのシェルを終了します。
postgres=# \q
postgres@ubuntu:~$
以上、PostgreSQLのインストール後、PostgreSQLに接続し簡単...
** postgresユーザにパスワードを設定する [#cecc39c2]
上記では、sudo -i -u postgresコマンドでpostgresユーザにス...
suコマンドでpostgresユーザにスイッチするには、postgresユ...
以下のコマンドでpostgresユーザにパスワードを設定すること...
sudo passwd postgres
以上、UbuntuにPostgreSQL9.1のパッケージをインストールした...
#htmlinsertpcsp(db-btm.html,db-sp.html)
ページ名: