¥¤¥ó¥¹¥È¡¼¥ë»þ¤Ë --with-java ¤òÉÕ¤±¤ë¤È¤¤¤¤¤é¤·¤¤¤¬¡¢ANT1.5°Ê¾å¤¬Æþ¤Ã¤Æ¤¤¤Ê¤«¤Ã¤¿¤ê¤·¤Ê¤¤¤È¤¤¤±¤Ê¤¤¤é¤·¤¤
apache-ant-1.5.3-1-bin.tar.gz¤ò¥²¥Ã¥È
http://ant.apache.org/

¥Ó¥ë¥ÉºÑ¤ß¤Î postgresql.jar ¤ò¼è¤Ã¤Æ¤¯¤ëÊýË¡¤â¤¢¤ë¤é¤·¤¤
http://jdbc.postgresql.org/download.html

ANT¤Î¥¤¥ó¥¹¥È¡¼¥ë

# tar xvzf apache-ant-1.5.3-1-bin.tar.gz
# mv apache-ant-1.5.3 /usr/local/ant

PostgreSQL¤ÎºÆ¹½ÃÛ

¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥Ð¥Ã¥¯¥¢¥Ã¥×¤Ï¼è¤Ã¤Æ¤ª¤­¤Þ¤·¤ç¤¦

# su - postgres
$ vi .bashrc
export ANT_HOME=/usr/local/ant
export JAVA_HOME=/usr/java/j2sdk1.4.2
export PATH=$PATH:$ANT_HOME/bin:$JAVA_HOME/bin
$ cd /usr/local/src/postgresql-7.3.2
$ make distclean
$ ./configure --with-perl --with-java --enable-syslog
$ make all
$ pg_ctl stop
$ make check
$ make install
$ rm -fr /usr/local/pgsql/data/*
$ initdb --encoding=EUC_JP --no-locale
$ pg_ctl -w start
$ createuser nobody
  n
  n

JDBC·Ðͳ¤ÎÀܳ¤ÏTCP/IPÀܳ¤Ë¤Ê¤ë¤Î¤ÇPostgreSQL¤òTCP/IPÀܳ²Äǽ¤Ë¤¹¤ë

$ vi /usr/local/pgsql/data/postgresql.conf
#tcpip_socket = false # ¥³¥á¥ó¥È¤ò¤Ï¤º¤·¤Ætrue¤ËÊѹ¹
$ pg_ctl stop
$ pg_ctl -w start
$ exit
# vi ~/.bashrc
export CLASSPATH=/usr/local/pgsql/share/java/postgresql.jar:/usr/local/pgsql/share/java/postgresql-examples.jar
# source ~/.bashrc

test ¤È¤¤¤¦¥Ç¡¼¥¿¥Ù¡¼¥¹¤òºîÀ®¤·¡¢°Ê²¼¤Ç¥¨¥é¡¼¤¬½Ð¤Ê¤±¤ì¤ÐOK

# java example.basic jdbc:postgresql:test nobody ""

¥È¥Ã¥×   ÊÔ½¸ Åà·ë º¹Ê¬ ¥Ð¥Ã¥¯¥¢¥Ã¥× źÉÕ Ê£À½ ̾Á°Êѹ¹ ¥ê¥í¡¼¥É   ¿·µ¬ °ìÍ÷ ¸¡º÷ ºÇ½ª¹¹¿·   ¥Ø¥ë¥×   ºÇ½ª¹¹¿·¤ÎRSS
Last-modified: 2021-09-19 (Æü) 19:09:28