PostgreSQL 9.1 インストールpostgresユーザの作成su - groupadd postgres useradd -g postgres -d /usr/local/pgsql postgres cat >> /usr/local/pgsql/.bashrc export PATH=/usr/local/pgsql/bin:$PATH mkdir -p /usr/local/pgsql/data chown postgres /usr/local/pgsql/data コンパイル・インストールcd /usr/local/src/postgresql wget ftp://ftp2.jp.postgresql.org/pub/postgresql/source/v9.1.3/postgresql-9.1.3.tar.gz tar zxvf postgresql-9.1.3.tar.gz cd postgresql-9.1.3/ ./configure --prefix=/usr/local/pgsql make checkinstall --fstrans=no rpm -ivh postgresql.rpm 設定パーミッション修正chown postgres /usr/local/pgsql chmod 755 /usr/local/pgsql ライブラリパス修正cat > /etc/ld.so.conf.d/postgresql.conf /usr/local/pgsql/lib ldconfig 起動スクリプト設置cp /usr/local/src/postgresql/postgresql-9.1.3/contrib/start-scripts/linux /etc/rc.d/init.d/postgres chmod 755 /etc/rc.d/init.d/postgres chkconfig postgres on chkconfig | grep postgres データベース初期化・起動su - postgres /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data --no-locale /usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data/ |
|