目次
# yum install readline-devel
# wget -P /usr/local/src http://wwwmaster.postgresql.org/redir/311/h/source/v9.1.1/postgresql-9.1.1.tar.gz
# cd /usr/local/src # tar zxvf postgresql-9.1.1.tar.gz
# groupadd postgres # useradd -g postgres postgres # passwd postgres
# chown -R postgres:postgres /usr/local/src/postgresql-9.1.1
# mkdir /usr/local/postgresql-9.1.1 # chown -R postgres:postgres /usr/local/postgresql-9.1.1
# su - postgres
$ cd /usr/local/src/postgresql-9.1.1 $ ./configure \ > --prefix=/usr/local/postgresql-9.1.1 \ > --enable-nls=ja \ > --with-opensslreadlineが無い場合下記が表示される
(省略) 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 $ exit
# ln -s /usr/local/postgresql-9.1.1 /usr/local/pgsql # chown -R postgres:postgres /usr/local/pgsql
# su - postgres $ vi ~/.bash_profile PGHOME=/usr/local/pgsql PGDATA=$PGHOME/data PGLIB=$PGHOME/lib PATH=$PATH:$PGHOME/bin export PGHOME PGDATA PGLIB
$ source ~/.bash_profile
$ initdb --encoding=EUC_JP --no-locale --pgdata=/usr/local/pgsql/data
# cp /usr/local/src/postgresql-9.1.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 ← 変更の適用
# su - postgres $ createuser -S -D -R tracuser
$ createdb -O tracuser trac_hoge-project --encoding=utf8