Install Resource Agent on RHEL
Resource Agent:
获取安装介质并解压:
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 |
[root@heartbeat1 software]# wget -c https://github.com/ClusterLabs/resource-agents/archive/v3.9.6.tar.gz --2015-12-16 07:21:56-- https://github.com/ClusterLabs/resource-agents/archive/v3.9.6.tar.gz Resolving github.com... 192.30.252.130 Connecting to github.com|192.30.252.130|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://codeload.github.com/ClusterLabs/resource-agents/tar.gz/v3.9.6 [following] --2015-12-16 07:21:57-- https://codeload.github.com/ClusterLabs/resource-agents/tar.gz/v3.9.6 Resolving codeload.github.com... 192.30.252.146 Connecting to codeload.github.com|192.30.252.146|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 617790 (603K) [application/x-gzip] Saving to: “v3.9.6” 100%[======================================>] 617,790 178K/s in 3.4s 2015-12-16 07:22:07 (178 KB/s) - “v3.9.6” saved [617790/617790] [root@heartbeat1 software]# ls 0a7add1d9996.tar asciidoc-8.6.9.zip v3.9.6 asciidoc-8.6.9 Reusable-Cluster-Components-glue--0a7add1d9996 [root@heartbeat1 software]# file v3.9.6 v3.9.6: gzip compressed data, from Unix [root@heartbeat1 software]# [root@heartbeat1 software]# ls 0a7add1d9996.tar asciidoc-8.6.9.zip v3.9.6 asciidoc-8.6.9 Reusable-Cluster-Components-glue--0a7add1d9996 [root@heartbeat1 software]# [root@heartbeat1 software]# mv v3.9.6 v3.9.6.tar.gz [root@heartbeat1 software]# gunzip v3.9.6.tar.gz [root@heartbeat1 software]# ls 0a7add1d9996.tar asciidoc-8.6.9.zip v3.9.6.tar asciidoc-8.6.9 Reusable-Cluster-Components-glue--0a7add1d9996 [root@heartbeat1 software]# tar -xf v3.9.6.tar [root@heartbeat1 software]# ls 0a7add1d9996.tar resource-agents-3.9.6 asciidoc-8.6.9 Reusable-Cluster-Components-glue--0a7add1d9996 asciidoc-8.6.9.zip v3.9.6.tar [root@heartbeat1 software]# cd resource-agents-3.9.6/ [root@heartbeat1 resource-agents-3.9.6]# ls AUTHORS COPYING heartbeat Makefile.am rgmanager autogen.sh COPYING.GPLv3 include NEWS tools ChangeLog COPYING.LGPL ldirectord README configure.ac doc make resource-agents.spec.in [root@heartbeat1 resource-agents-3.9.6]# |
autogen.sh
1 2 3 4 5 |
[root@heartbeat1 resource-agents-3.9.6]# ls | grep --color configure configure.ac [root@heartbeat1 resource-agents-3.9.6]# ls | grep --color auto autogen.sh [root@heartbeat1 resource-agents-3.9.6]# |
可以看到这个安装介质中没有“configure”,所以需要通过autogen.sh生成:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
[root@heartbeat1 resource-agents-3.9.6]# ./autogen.sh autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal autoreconf: configure.ac: tracing autoreconf: configure.ac: not using Libtool autoreconf: running: /usr/bin/autoconf autoreconf: running: /usr/bin/autoheader autoreconf: running: automake --add-missing --copy --no-force configure.ac:102: installing `./compile' configure.ac:33: installing `./config.guess' configure.ac:33: installing `./config.sub' configure.ac:83: installing `./install-sh' configure.ac:83: installing `./missing' heartbeat/Makefile.am: installing `./depcomp' autoreconf: Leaving directory `.' Now run ./configure and make [root@heartbeat1 resource-agents-3.9.6]# [root@heartbeat1 resource-agents-3.9.6]# ls | grep --color configure configure configure.ac [root@heartbeat1 resource-agents-3.9.6]# |
./configure:
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 |
[root@heartbeat1 resource-agents-3.9.6]# ./configure --prefix=/usr/local/heartbeat/ GFLAGS=-I/usr/local/heartbeat/include LDFLAGS=-L/usr/local/heartbeat/lib LIBS="/lib64/libuuid.so.1" (... ... etc。) config.status: creating rgmanager/src/resources/utils/Makefile config.status: creating include/config.h config.status: creating include/agent_config.h config.status: executing depfiles commands resource-agents configuration: Version = UNKNOWN Build Version = 02beac55c1da0ad99a5a19bd3b2333bcff7e916c Features = Prefix = /usr/local/heartbeat Executables = /usr/local/heartbeat/sbin Man pages = /usr/local/heartbeat/share/man Libraries = /usr/local/heartbeat/lib Header files = /usr/local/heartbeat/include Arch-independent files = /usr/local/heartbeat/share Documentation = /usr/local/heartbeat/share/doc/resource-agents State information = /usr/local/heartbeat/var System configuration = /usr/local/heartbeat/etc HA_BIN directory prefix = /usr/local/heartbeat/libexec RA state files = /usr/local/heartbeat/var/run/resource-agents AIS Plugins = CFLAGS = -g -O2 -ggdb3 -fgnu89-inline -fstack-protector-all -Wall -Wbad-function-cast -Wcast-qual -Wcast-align -Wdeclaration-after-statement -Wendif-labels -Wfloat-equal -Wformat=2 -Wformat-security -Wformat-nonliteral -Winline -Wmissing-prototypes -Wmissing-declarations -Wmissing-format-attribute -Wnested-externs -Wno-long-long -Wno-strict-aliasing -Wpointer-arith -Wstrict-prototypes -Wwrite-strings -ansi -D_GNU_SOURCE -DANSI_ONLY -Werror Libraries = /lib64/libuuid.so.1 -lglib-2.0 Stack Libraries = [root@heartbeat1 resource-agents-3.9.6]# |
make:
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 |
[root@heartbeat1 resource-agents-3.9.6]# ls | grep --color Makefile Makefile Makefile.am Makefile.in [root@heartbeat1 resource-agents-3.9.6]# [root@heartbeat1 resource-agents-3.9.6]# make (... ...etc) OCF_ROOT=. OCF_FUNCTIONS_DIR=../../heartbeat ../../heartbeat/Squid meta-data > metadata-Squid.xml /usr/bin/xsltproc --novalid \ --stringparam package resource-agents \ --stringparam version UNKNOWN \ --output ocf_heartbeat_Squid.xml \ ./ra2refentry.xsl metadata-Squid.xml /usr/bin/xsltproc \ --xinclude \ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl ocf_heartbeat_Squid.xml http://docbook.sourceforge.net/release/xsl/current/html/keywords.xsl:1: parser error : Document is empty ^ http://docbook.sourceforge.net/release/xsl/current/html/keywords.xsl:1: parser error : Start tag expected, '<' not found ^ compilation error: file http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl line 54 element include xsl:include : unable to load http://docbook.sourceforge.net/release/xsl/current/html/keywords.xsl gmake[3]: *** [ocf_heartbeat_Squid.7] Error 5 rm metadata-LVM.xml metadata-Pure-FTPd.xml metadata-SAPDatabase.xml metadata-ManageRAID.xml metadata-SAPInstance.xml metadata-Route.xml metadata-MailTo.xml metadata-Squid.xml metadata-IPaddr.xml metadata-SendArp.xml metadata-ServeRAID.xml metadata-IPsrcaddr.xml metadata-SphinxSearchDaemon.xml metadata-LinuxSCSI.xml metadata-IPaddr2.xml metadata-Raid1.xml metadata-ManageVE.xml gmake[3]: Leaving directory `/software/resource-agents-3.9.6/doc/man' gmake[2]: *** [all-recursive] Error 1 gmake[2]: Leaving directory `/software/resource-agents-3.9.6/doc' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/software/resource-agents-3.9.6' make: *** [all] Error 2 [root@heartbeat1 resource-agents-3.9.6]# |
make install:
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 |
[root@heartbeat1 resource-agents-3.9.6]# make install (... ...etc。) /usr/bin/xsltproc --novalid \ --stringparam package resource-agents \ --stringparam version UNKNOWN \ --output ocf_heartbeat_WAS.xml \ ./ra2refentry.xsl metadata-WAS.xml /usr/bin/xsltproc \ --xinclude \ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl ocf_heartbeat_WAS.xml http://docbook.sourceforge.net/release/xsl/current/manpages/lists.xsl:1: parser error : Document is empty ^ http://docbook.sourceforge.net/release/xsl/current/manpages/lists.xsl:1: parser error : Start tag expected, '<' not found ^ compilation error: file http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl line 38 element include xsl:include : unable to load http://docbook.sourceforge.net/release/xsl/current/manpages/lists.xsl gmake[3]: *** [ocf_heartbeat_WAS.7] Error 5 rm metadata-SysInfo.xml metadata-VirtualDomain.xml metadata-WAS.xml metadata-VIPArip.xml metadata-Stateful.xml gmake[3]: Leaving directory `/software/resource-agents-3.9.6/doc/man' gmake[2]: *** [install-recursive] Error 1 gmake[2]: Leaving directory `/software/resource-agents-3.9.6/doc' gmake[1]: *** [install-recursive] Error 1 gmake[1]: Leaving directory `/software/resource-agents-3.9.6' make: *** [install] Error 2 [root@heartbeat1 resource-agents-3.9.6]# |
虽然上面make和make install的时候除了一点错,但是却是没有关系的。
看看安装后的状态:
1 2 3 |
[root@heartbeat1 resource-agents-3.9.6]# ls /usr/local/heartbeat/ etc include lib libexec sbin share var [root@heartbeat1 resource-agents-3.9.6]# |
————————————————
Done。