ナビゲーション
FrontPage
FreeBSD
Linux
Citrix XenServer
VMware ESXi
Unixコマンド
MySQL
PostgreSQL
Windows
CMS/CRM
クラウド
用語
PHPスクリプト
Bashシェルスクリプト
Rubyスクリプト
開発日記
検索
ツールボックス
新しいページの作成
バックアップの表示
外部のリンク元
最近更新したページ
全ページ
ヘルプ
凍結
アップロード
ページ名の変更
最新の40件
2016-08-17
Linux/NagiosQL
Linux/CentOSチューニング
2016-02-23
Linux/ソフトウェアRAID復旧手順
2016-02-18
FreeBSD/DHCP
FreeBSD/squid
2016-02-15
Unixコマンド/file
2016-02-05
FreeBSD/DynaBook
FreeBSD/Linux compatibility
2016-01-21
PHPスクリプト/PEAR DBインストールできない
PHPスクリプト/PEAR DB
2016-01-20
PHP/フレームワーク/Zend Framework
PHP/フレームワーク
FreeBSD/Postfix+amavisd+clamav
2016-01-15
FreeBSD/sl
2015-12-04
Unixコマンド/dig
Unixコマンド/nslookup
Unixコマンド/traceroute
Linux/rsync
FreeBSD/rsync
Unixコマンド/vipw
2015-11-25
Linux/Postfix+MySQL+Postfix AdminによるバーチャルSMTPサーバの構築
Linux/Postfix + postgrey
2015-11-24
Linux/Postfix + amavisd + clamav
2015-05-25
Unixコマンド/ifconfig
2015-05-23
Unixコマンド/netstat
Unixコマンド/route
Unixコマンド/lsof
Unixコマンド/disown
Unixコマンド/time
Unixコマンド/crontab
2015-05-22
Unixコマンド/nohup
Unixコマンド/fgとbg
Unixコマンド/nice
Unixコマンド/kill
Unixコマンド/jobs
Unixコマンド/restor
Unixコマンド/dump
Unixコマンド/uncompress
Unixコマンド/compress
Unixコマンド/zcat
total:
3132
today:
1
yesterday:
0
now:
1
本文
ノート
?
編集
差分
一覧
FreeBSD/PostgreSQL の編集
*PostgreSQL [#v0140e5a] [[dokuwiki.fl8.jp転載済>http://dokuwiki.fl8.jp/doku.php/02_freebsd/04_database/02_posgresql/postgresql%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB]] 無料で利用でき、機能も信頼性も一般の製品に劣らない、フリーのデータベース「PosgtreSQL」 オブジェクトリレーショナルデータベース管理システム(ORDBMS)の一つ。 #contents **インストール [#de52d5ff] server からインストールしようとしても、client からインストール # cd /usr/ports/databases/postgresql81-client # make -DWITH_OPENSSL_BASE -DWITH_OPENSSL_PORT # cd /usr/ports/databases/postgresql81-server # make install ***OpenSSL をインストールしていない場合 [#s2304fd6] Dependency warning: used OpenSSL version contains known vulnerabilities Please update or define either WITH_OPENSSL_BASE or WITH_OPENSSL_PORT *** Error code 1 *ソースからインストール [#y0f618f9] # wget ftp://ftp.sra.co.jp/pub/cmd/postgres/8.3.3/postgresql-8.3.3.tar.gz # tar zxvf postgresql-8.3.3.tar.gz # cd postgresql-8.3.3 # ./configure # make # make install **postgresユーザ作成 [#d0b59b61] # pw groupadd postgres # pw useradd postgres -g postgres -d /usr/local/pgsql -s /usr/local/bin/bash ***CentOSの場合、configureするとこんなエラーが [#n14a3851] postgresql configure: error: readline library not found これでインストールできる # yum install readline-devel **/etc/rc.confの編集 [#y2844db8] 下記を追加 # PostgreSQL postgresql_enable="YES" postgresql_data="/usr/local/pgsql/data" postgresql_flags="-w -s -m fast" **DB初期化 [#je44aedf] $ su pgsql $ cd /usr/local/pgsql/ $ mkdir data $ initdb -D ./data --encoding=utf-8 --lc-collate=C か $ initdb -D ./data --encoding=EUC_JP --lc-collate=C **設定ファイル [#if7e8a43] # ll /usr/local/pgsql/data/postgresql.conf -rw------- 1 pgsql pgsql 13765 2 6 09:38 /usr/local/pgsql/data/postgresql.conf 43 行目辺り # # CONNECTIONS AND AUTHENTICATION # # - Connection Settings - listen_addresses = ’*’TCP 接続(外部マシンからの接続)を許可 **外部からの説接続設定 [#g6905e37] # vi /usr/local/pgsql/data/pg_hba.conf host all all 192.168.1.0/24 #md5ローカルネットワークからの md5 認証接続を許可 **ソースからの場合、起動スクリプトのコピー [#u983ccfa] # cp contrib/start-scripts/freebsd /usr/local/etc/rc.d/postgresql.sh # chmod 755 /usr/local/etc/rc.d/postgresql.sh **起動 [#v2d1bc63] # /usr/local/etc/rc.d/010.pgsql.sh start
タイムスタンプを変更しない
*PostgreSQL [#v0140e5a] [[dokuwiki.fl8.jp転載済>http://dokuwiki.fl8.jp/doku.php/02_freebsd/04_database/02_posgresql/postgresql%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB]] 無料で利用でき、機能も信頼性も一般の製品に劣らない、フリーのデータベース「PosgtreSQL」 オブジェクトリレーショナルデータベース管理システム(ORDBMS)の一つ。 #contents **インストール [#de52d5ff] server からインストールしようとしても、client からインストール # cd /usr/ports/databases/postgresql81-client # make -DWITH_OPENSSL_BASE -DWITH_OPENSSL_PORT # cd /usr/ports/databases/postgresql81-server # make install ***OpenSSL をインストールしていない場合 [#s2304fd6] Dependency warning: used OpenSSL version contains known vulnerabilities Please update or define either WITH_OPENSSL_BASE or WITH_OPENSSL_PORT *** Error code 1 *ソースからインストール [#y0f618f9] # wget ftp://ftp.sra.co.jp/pub/cmd/postgres/8.3.3/postgresql-8.3.3.tar.gz # tar zxvf postgresql-8.3.3.tar.gz # cd postgresql-8.3.3 # ./configure # make # make install **postgresユーザ作成 [#d0b59b61] # pw groupadd postgres # pw useradd postgres -g postgres -d /usr/local/pgsql -s /usr/local/bin/bash ***CentOSの場合、configureするとこんなエラーが [#n14a3851] postgresql configure: error: readline library not found これでインストールできる # yum install readline-devel **/etc/rc.confの編集 [#y2844db8] 下記を追加 # PostgreSQL postgresql_enable="YES" postgresql_data="/usr/local/pgsql/data" postgresql_flags="-w -s -m fast" **DB初期化 [#je44aedf] $ su pgsql $ cd /usr/local/pgsql/ $ mkdir data $ initdb -D ./data --encoding=utf-8 --lc-collate=C か $ initdb -D ./data --encoding=EUC_JP --lc-collate=C **設定ファイル [#if7e8a43] # ll /usr/local/pgsql/data/postgresql.conf -rw------- 1 pgsql pgsql 13765 2 6 09:38 /usr/local/pgsql/data/postgresql.conf 43 行目辺り # # CONNECTIONS AND AUTHENTICATION # # - Connection Settings - listen_addresses = ’*’TCP 接続(外部マシンからの接続)を許可 **外部からの説接続設定 [#g6905e37] # vi /usr/local/pgsql/data/pg_hba.conf host all all 192.168.1.0/24 #md5ローカルネットワークからの md5 認証接続を許可 **ソースからの場合、起動スクリプトのコピー [#u983ccfa] # cp contrib/start-scripts/freebsd /usr/local/etc/rc.d/postgresql.sh # chmod 755 /usr/local/etc/rc.d/postgresql.sh **起動 [#v2d1bc63] # /usr/local/etc/rc.d/010.pgsql.sh start
テキスト整形のルールを表示する
ログインまたはアカウント作成