これまでodbcはほとんど、使用したことがなかったので、試しにDBD::ODBC + postgresで練習してみます。
が、colinux環境にpostgresをインストールしていなかったので...
readlineやzlibがない為にpostgresのconfigure時にerrorとなることがある場合は、readline, readline-devel, zlibをinstallしてください。
$ ./configure <略> configure: error: readline library not found If you have readline already installed, see config.log for details on the failure. It is possible the compiler isn't looking in the proper directory. Use --without-readline to disable readline support.
readlineのinstall例
$ wget ftp://ftp.cwru.edu/pub/bash/readline-5.2.tar.gz $ cd readline-5.2 $ ./configure $ make # make install
readline-develはsrcが見当たらなかったので、yumでinstallしました.
※その後、readlineは次のurlで見つけました。
http://tiswww.case.edu/php/chet/readline/rltop.html
更にその後、postgres 9.0.3 をインストールする際、ncursesが必要と言われました。
http://www.gnu.org/software/ncurses/ncurses.html
# yum install readline-devel
zlibのinstall例
$ wget http://www.zlib.net/zlib-1.2.3.tar.gz $ tar -zxvf zlib-1.2.3.tar.gz $ cd zlib-1.2.3 $ ./configure $ make # make install
install
$ cd postgresql-8.3.0 $ ./configure $ make # make install
adduser
# adduser postgres
※passwdは設定しません
DBクラスタ
# su - postgres $ mkdir /home/postgres/data $ /usr/local/pgsql/bin/initdb -E utf8 -D /home/postgres/data
自動起動
# cd /etc/rc.d/init.d/ # cp /tmp/postgresql-8.3.0/contrib/start-scripts/linux . # vi linux old)PGDATA="/usr/local/pgsql/data" new)PGDATA="/home/postgres/data" # chmod 755 postgres # /sbin/chkconfig --add postgres # /sbin/chkconfig --list postgres postgresql 0:オフ 1:オフ 2:オン 3:オン 4:オン 5:オン 6:オフ