在CentOS 7.6上编译安装Pacemaker-2.1.3
pacemaker 官网地址:https://clusterlabs.org/pacemaker/
pacemaker github:https://github.com/ClusterLabs/pacemaker
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | yum install -y corosync* pcs yum install -y intltool pkgconfig libtool libtool-ltdl-devel uuid uuid-devel libuuid libuuid-devel \ libxml2 libxml2-devel libxslt libxslt-devel \ glib2-devel libqb-devel python3 bzip2-devel wget https://codeload.github.com/ClusterLabs/pacemaker/tar.gz/refs/tags/Pacemaker-2.1.3-rc2 -O pacemaker-Pacemaker-2.1.3-rc2.tar.gz tar -zxvf pacemaker-Pacemaker-2.1.3-rc2.tar.gz cd ./pacemaker-Pacemaker-2.1.3-rc2 ./autogen.sh make -j 24 export LD_LIBRARY_PATH=/usr/lib/:$LD_LIBRARY_PATH rpm -e pacemaker-1.1.23-1.el7_9.1.x86_64 --nodeps make install -j 24 echo "/usr/lib/" >> /etc/ld.so.conf ldconfig cat > /usr/lib/systemd/system/pacemaker.service <<"EOF" [Unit] Description=Pacemaker High Availability Cluster Manager Documentation=man:pacemakerd Documentation=https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/1.1/html-single/Pacemaker_Explained/index.html # DefaultDependencies takes care of sysinit.target, # basic.target, and shutdown.target # We need networking to bind to a network address. It is recommended not to # use Wants or Requires with network.target, and not to use # network-online.target for server daemons. After=network.target # Time syncs can make the clock jump backward, which messes with logging # and failure timestamps, so wait until it's done. After=time-sync.target # Managing systemd resources requires DBus. After=dbus.service Wants=dbus.service # Some OCF resources may have dependencies that aren't managed by the cluster; # these must be started before Pacemaker and stopped after it. The # resource-agents package provides this target, which lets system adminstrators # add drop-ins for those dependencies. After=resource-agents-deps.target Wants=resource-agents-deps.target After=syslog.service After=rsyslog.service After=corosync.service Requires=corosync.service [Install] WantedBy=multi-user.target [Service] Type=simple KillMode=process NotifyAccess=main EnvironmentFile=-/etc/sysconfig/pacemaker EnvironmentFile=-/etc/sysconfig/sbd SuccessExitStatus=100 ExecStart=/usr/sbin/pacemakerd -f # Uncomment TasksMax if your systemd version supports it. # Only systemd v227 and above support this option. #TasksMax=infinity # If pacemakerd doesn't stop, it's probably waiting on a cluster # resource. Sending -KILL will just get the node fenced SendSIGKILL=no # If we ever hit the StartLimitInterval/StartLimitBurst limit and the # admin wants to stop the cluster while pacemakerd is not running, it # might be a good idea to enable the ExecStopPost directive below. # # Although the node will likely end up being fenced as a result so it's # not on by default # # ExecStopPost=/usr/bin/killall -TERM crmd attrd stonithd cib pengine lrmd # If you want Corosync to stop whenever Pacemaker is stopped, # uncomment the next line too: # # ExecStopPost=/bin/sh -c 'pidof crmd || killall -TERM corosync' # Uncomment this for older versions of systemd that didn't support # TimeoutStopSec # TimeoutSec=30min # Pacemaker can only exit after all managed services have shut down # A HA database could conceivably take even longer than this TimeoutStopSec=30min TimeoutStartSec=60s # Restart options include: no, on-success, on-failure, on-abort or always Restart=on-failure # crm_perror() writes directly to stderr, so ignore it here # to avoid double-logging with the wrong format StandardError=null EOF systemctl daemon-reload systemctl enable pacemaker systemctl start pacemaker systemctl status pacemaker |