Pacemake Cluster

Install your service (Zabbix Server in our example)
..
Configure Pacemaker
#zabbixserver1
sudo yum install pacemaker pcs
sudo passwd hacluster
sudo systemctl start pcsd.service
sudo systemctl enable pcsd.service

#zabbixserver2
sudo yum install pacemaker pcs
sudo passwd hacluster
sudo systemctl start pcsd.service
sudo systemctl enable pcsd.service
Authenticate servers
#zabbixserver1
sudo pcs cluster auth zabbixserver1 zabbixserver2
Username: hacluster
Setup a Cluster
#zabbixserver1
sudo pcs cluster setup --name zabbixserver zabbixserver1 zabbixserver2
Start Cluster
sudo pcs cluster start --all

# or on every node
sudo pcs cluster start
Make sure that Pacemaker and Corosync are started at boot on both hosts.
#zabbixserver1
sudo systemctl enable corosync.service
sudo systemctl enable pacemaker.service

#zabbixserver2
sudo systemctl enable corosync.service
sudo systemctl enable pacemaker.service
Check status
sudo pcs status cluster

sudo pcs status nodes

Disable Stonith and quorum-policy for 2-node installation
sudo pcs property set stonith-enabled=false
sudo pcs property set no-quorum-policy=ignore
Create Cluster resources
# main virtual ip
pcs resource create cluster_vip ocf:heartbeat:IPaddr2 ip= cidr_netmask= op monitor interval=20s

# additional vips for other interfaces
pcs resource create cluster_vip_2 ocf:heartbeat:IPaddr2 ip=10.0.0.11 cidr_netmask=24 nic=eno33559296 op monitor interval=20s
pcs resource create cluster_vip_3 ocf:heartbeat:IPaddr2 ip=192.168.111.11 cidr_netmask=24 nic=eno50338560 op monitor interval=20s
pcs constraint colocation add cluster_vip_2 cluster_vip
pcs constraint colocation add cluster_vip_3 cluster_vip
pcs constraint order cluster_vip then cluster_vip_2
pcs constraint order cluster_vip then cluster_vip_3

# disable your service on all nodes
sudo systemctl disable zabbix-server

# create resource for service
sudo pcs resource create zabbix_server systemd:zabbix-server op monitor interval=10s
sudo pcs constraint colocation add zabbix_server cluster_vip
sudo pcs constraint order cluster_vip then zabbix_server

# check
sudo pcs status