目次
# wget -P /usr/local/src http://www.ring.gr.jp/pub/misc/db/postgresql/source/v8.3.1/postgresql-8.3.1.tar.gz
# cd /usr/local/src # tar zxvf postgresql-8.3.1.tar.gz
# groupadd postgres # useradd -g postgres postgres # passwd postgres
# chown -R postgres:postgres /usr/local/src/postgresql-8.3.1
# mkdir /usr/local/postgresql-8.3.1 # chown -R postgres:postgres /usr/local/postgresql-8.3.1
# su - postgres
$ cd /usr/local/src/postgresql-8.3.1 $ ./configure \ > --prefix=/usr/local/postgresql-8.3.1 \ > --enable-nls=ja \ > --with-openssl \ > --without-docdir
(省略) checking for -lreadline... no checking for -ledit... no 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.
$ make $ make install
# ln -s /usr/local/postgresql-8.3.1 /usr/local/pgsql # chown -R postgres:postgres /usr/local/pgsql
$ vi ~/.bash_profile PGHOME=/usr/local/pgsql PGDATA=$PGHOME/data PGLIB=$PGHOME/lib PATH=$PATH:$HOME/bin:$PGHOME/bin export PGHOME PGDATA PGLIB PATH
$ source ~/.bash_profile
$ initdb --encoding=EUC_JP --no-locale --pgdata=/usr/local/pgsql/data
# cp /usr/local/src/postgresql-8.3.1/contrib/start-scripts/linux /etc/rc.d/init.d/pgsql
# vi /etc/rc.d/init.d/pgsql
# chmod 755 /etc/rc.d/init.d/pgsql # chkconfig --add pgsql # chkconfig pgsql on # chkconfig --list pgsql pgsql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
# vi /etc/ld.so.conf /usr/local/pgsql/lib ← 追加して保存 # /etc/ldconfig -v ← 変更の適用