動作確認ディストリビューション †PostgreSQL 8.3.6のインストール †あらかじめ、必要なパッケージをインストールしておく
# yum -y install flex bison readline-devel autoconf automake PostgreSQLのソースファイルを取得 # wget http://wwwmaster.postgresql.org/redir/323/f/source/v8.3.6/postgresql-8.3.6.tar.gz PosgreSQL用Linuxアカウント作成 # useradd postgres 展開 # tar zxvf postgresql-8.3.6.tar.gz # chown -R postgres:postgres /usr/local/src/postgresql-8.3.6 # mkdir /usr/local/pgsql # chown postgres:postgres /usr/local/pgsql コンパイル準備 # su - postgres $ cd /usr/local/src/postgresql-8.3.6 $ ./configure コンパイル $ make インストール $ make install # cp /usr/local/src/postgresql-8.3.6/contrib/start-scripts/linux /etc/init.d/postgresql # chmod 755 /etc/init.d/postgresql # chkconfig --add postgresql # chkconfig postgresql on # chkconfig --list postgresql postgresql 0:off 1:off 2:on 3:on 4:on 5:on 6:off 必要に応じてシンボリックリンクを作成 # ln -s /usr/local/pgsql/bin/pg_dump /usr/bin/ # ln -s /usr/local/pgsql/bin/pg_restore /usr/bin/ # ln -s /usr/local/pgsql/bin/psql /usr/bin/ # ln -s /usr/local/pgsql/bin/vacuumdb /usr/bin/ # ln -s /usr/local/pgsql/bin/initdb /usr/bin/ # ln -s /usr/local/pgsql/bin/createdb /usr/bin/ # ln -s /usr/local/pgsql/bin/dropdb /usr/bin/ # ln -s /usr/local/pgsql/bin/createuser /usr/bin/ # ln -s /usr/local/pgsql/bin/dropuser /usr/bin/ DB初期化 # su - postgres $ initdb -D /usr/local/pgsql/data --no-locale -E UTF8 PostgreSQLサービス起動 # service postgresql start PostgreSQLサービス確認 # service postgresql status # netstat -at |grep postgres
|