Commit 107c4b9b authored by iSergio's avatar iSergio
Browse files

Add configure cluster with UTF8 encoding and locale

parent dec9b132
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -20,8 +20,15 @@ fi
sed -i "s/PGPORT=5432/PGPORT=5433/g" /etc/sysconfig/pgsql/postgresql
sed -i '/^DEFAULT_DB_ENCODING/s/^/#/' /etc/sysconfig/pgsql/postgresql
sed -i '/^DEFAULT_DB_LOCALE/s/^/#/' /etc/sysconfig/pgsql/postgresql

if ! grep -Fq "DEFAULT_DB_ENCODING=UTF8" /etc/sysconfig/pgsql/postgresql; then
    echo "DEFAULT_DB_ENCODING=UTF8" >> /etc/sysconfig/pgsql/postgresql
fi
if ! grep -Fq "DEFAULT_DB_LOCALE=ru_RU.UTF8" /etc/sysconfig/pgsql/postgresql; then
    echo "DEFAULT_DB_LOCALE=ru_RU.UTF8" >> /etc/sysconfig/pgsql/postgresql
fi

service postgresql initdb

cp bin/pg_* /usr/local/bin/