By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,208 Members | 1,456 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,208 IT Pros & Developers. It's quick & easy.

I can't specify parameters in initdb on CentOS

P: 1
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:

Expand|Select|Wrap|Line Numbers
  1. 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
On CentOS, i tried in this way:

Expand|Select|Wrap|Line Numbers
  1. /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 
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

Aug 3 '19 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.