I have installed postgresql 9.6 on my CentOS 7 VM, but i can't specify parameters in the initdb command. In Ubuntu i do this in this way:
On CentOS, i tried in this way:
But i got an error with the PGDATA variable. I need to create a database cluster in a directory selected to me, not the default. How can I do this? Thanks a lot
Christian
Code:
su -p -c "PATH=/usr/lib/postgresql/9.6/bin:$PATH initdb --locale=it_IT.utf8 --lc-collate=it_IT.utf8 --lc-ctype=it_IT.utf8 --lc-messages=C --lc-monetary=C --lc-numeric=C --lc-time=C -- encoding=UTF8 -D /some/dir" postgres
Code:
/usr/pgsql-9.6/bin/postgresql96-setup "initdb --locale=it_IT.utf8 --lc-collate=it_IT.utf8 --lc-ctype=it_IT.utf8 --lc-messages=C --lc-monetary=C --lc-numeric=C --lc-time=C -- encoding=UTF8 -D /some/dir" postgres
Christian