2010-05-18

Установка PostgreSQL 8.2.17 из исходников

fagot2:/u02/install/postgres # tar -xvzf postgresql-8.2.17.tar.gz
fagot2:/u02/install/postgres # cd postgresql-8.2.17/
fagot2:/u02/install/postgres/postgresql-8.2.17 # mkdir /opt/pgsql-8.2
fagot2:/u02/install/postgres/postgresql-8.2.17 # chown postgres:postgres /opt/pgsql-8.2/
fagot2:/u02/install/postgres/postgresql-8.2.17 # ./configure --prefix=/opt/pgsql-8.2 --with-perl --without-readline --without-zlib

fagot2:/u02/install/postgres/postgresql-8.2.17 # gmake
fagot2:/u02/install/postgres/postgresql-8.2.17 # chown postgres:postgres ../postgresql-8.2.17 -R
fagot2:/u02/install/postgres/postgresql-8.2.17 # su - postgres
postgres@fagot2:~> cd /u02/install/postgres/postgresql-8.2.17
postgres@fagot2:/u02/install/postgres/postgresql-8.2.17> gmake check
postgres@fagot2:/u02/install/postgres/postgresql-8.2.17> exit
fagot2:/u02/install/postgres/postgresql-8.2.17 # gmake install
fagot2:/u02/install/postgres/postgresql-8.2.17 # sysctl kernel.shmmax=1000000000

Добавляем строку kernel.shmmax = 1000000000 в файл /etc/sysctl.conf

fagot2:/u02/install/postgres/postgresql-8.2.17 # su - postgres
postgres@fagot2:~> /opt/pgsql-8.2/bin/initdb -D /opt/pgsql-8.2/data
postgres@fagot2:~> exit
fagot2:/u02/install/postgres/postgresql-8.2.17 # cp contrib/start-scripts/linux /etc/init.d/pgsql-8.2
fagot2:/u02/install/postgres/postgresql-8.2.17 # chmod oug+x /etc/init.d/pgsql-8.2

Меняем в /etc/init.d/pgsql-8.2:

prefix=/usr/local/pgsql на prefix=/opt/pgsql-8.2
PGDATA="/usr/local/pgsql/data" на PGDATA="/opt/pgsql-8.2/data"

Комментариев нет: