I can't specify parameters in initdb on CentOS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ducarpit
    New Member
    • Aug 2019
    • 1

    I can't specify parameters in initdb on CentOS

    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:

    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
    On CentOS, i tried in this way:

    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
    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
Working...