Lead node:192.168.100.190
Second node: 192.168.100.191

Install Postgresql on lead node.

# pkg ins postgresql96-server

Enable autostart.

# sysrc postgresql_enable="YES"

Create log file.

# touch /var/log/postgresql.log
# chmod a-r,u+r /var/log/postgresql.log
# chown postgres:postgres /var/log/postgresql.log

Initialize database.

# service postgresql initdb

Configure PostgreSQL and enable replication.
Add or change next parameters.

# vi /var/db/postgres/data96/postgresql.conf

listen_address = '*'
#log_destination = 'syslog'
logging_collector = on
log_directory = '/var/log'
log_filename = 'postgresql.log'
log_rotation_size = 100MB
client_min_messages = notice
log_min_messages = warning
log_min_error_statement = error
log_checkpoints = on
log_connections = on
log_disconnections = on
log_hostname = on
log_line_prefix = '%t'

# Replication
wal_level = replica
wal_log_hints = on # Need for pg_rewind utility
max_wal_senders = 3 # 1 sender = 1 replica + pg_basebackup
wal_keep_segments = 64
hot_standby = on # This option will be activated on second node

Configure authorization.

# vi /var/db/postgres/data96/pg_hba.conf

host replication postgres 192.168.100.0/24 trust
host all all 192.168.100.0/24 trust

Start server.

# service postgresql start

Go to second node and install PostgreSQL server.

# pkg ins postgresql96-server

Enable autostart.

# sysrc postgresql_enable="YES"

Connect under postgres user and get basebackup from lead node with pg_basebackup utility.

# su - postgres
# pg_basebackup -P -R -X stream -c fast -h 192.168.190 -U postgres -D /var/db/postgres/data96
# exit

Create log file.

# touch /var/log/postgresql.log
# chmod a-r,u+r /var/log/postgresql.log
# chown postgres:postgres /var/log/postgresql.log

Start Postgresql server.

# service postgresql start

Check replication on lead server.

# ps aux | grep sender

or with sql query

postgres# select * from pg_stat_replication;

On second server.

# ps aux | grep receiver