How to rebuild a hot standby postgresql database in linux?
I have primary in redhead linux on-premise and need to have a warm-standby database to get the replication from the primary postgresql 9.6
This is a fairly well-documented procedure. You'll need to take a backup of the primary and restore it to your new standby host (which should have the same volumes/paths etc as the primary). You'll then need to configure $PGDATA/recovery.conf to configure how replication will work (streaming and/or WAL archive recovery).
Here's a quick-and-dirty HOWTO: https://hunleyd.github.io/posts/PostgreSQL-Streaming-Replication-In-10-Minutes/