PostgreSQL 8.2 インストール必要なツール・ライブラリのインストール (CentOS6.4)yum groupinstall "Development tools" yum install readline-devel yum install zlib-devel postgresユーザの作成su - # groupadd postgres useradd -g postgres -d /usr/local/pgsql postgres cat >> /usr/local/pgsql/.bashrc export PATH=/usr/local/pgsql/bin:$PATH インストール./configure --prefix=/usr/local/pgsql make make install ソースコードhttp://www.postgresql.org/ftp/source/ 設定chmod 755 /usr/local/pgsql chown postgres /usr/local/pgsql mkdir /usr/local/pgsql/data chown postgres /usr/local/pgsql/data su - postgres /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data -E EUC-JP --no-locale 起動su - postgres /usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data/ 起動スクリプトcd /usr/local/src/postgres/postgresql-8.2.x/contrib/start-scripts cp linux /etc/rc.d/init.d/postgresql chmod 755 /etc/rc.d/init.d/postgresql chkconfig --add postgresql ソースツリーのpostgresql-8.2.x/contrib/start-scriptsディレクトリ以下にあるファイルを使う。pg_ctlを起動に使うのは推奨されないらしい。 参考 |
|