I need to setp Keepalived To Provide IP Failover For Web Cluster in nginx webserver.
I Follow this link to install keepalive : http://www.cyberciti.biz/faq/rhel-centos-fedora-keepalived-lvs-cluster-configuration/
While install
$ make && make install
system throw fatal error: asm/linkage.h: No such file or directory
This is All error:
[root@www keepalived-1.1.19]# make && make install
make -C lib || exit 1;
make[1]: Entering directory `/opt/keepalived-1.1.19/lib'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/keepalived-1.1.19/lib'
make -C keepalived
make[1]: Entering directory `/opt/keepalived-1.1.19/keepalived'
make[2]: Entering directory `/opt/keepalived-1.1.19/keepalived/core'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/opt/keepalived-1.1.19/keepalived/core'
make[2]: Entering directory `/opt/keepalived-1.1.19/keepalived/vrrp'
gcc -g -O2 -I/lib/modules/3.10.0-229.el7.x86_64/build/include -I../include -I../../lib -Wall -Wunused -Wstrict-prototypes -D_KRNL_2_2_ -D_WITHOUT_LVS_ -D_WITHOUT_IPVS_SYNCD_ -c vrrp_daemon.c
In file included from /lib/modules/3.10.0-229.el7.x86_64/build/include/linux/kernel.h:6:0,
from /lib/modules/3.10.0-229.el7.x86_64/build/include/linux/skbuff.h:17,
from /lib/modules/3.10.0-229.el7.x86_64/build/include/linux/if_ether.h:23,
from /usr/include/net/ethernet.h:26,
from ../include/vrrp_arp.h:27,
from vrrp_daemon.c:26:
/lib/modules/3.10.0-229.el7.x86_64/build/include/linux/linkage.h:7:25: fatal error: asm/linkage.h: No such file or directory
#include <asm/linkage.h>
^
compilation terminated.
make[2]: *** [vrrp_daemon.o] Error 1
make[2]: Leaving directory `/opt/keepalived-1.1.19/keepalived/vrrp'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/opt/keepalived-1.1.19/keepalived'
make: *** [all] Error 2
[root@www keepalived-1.1.19]#
Update:
After folow module compiling : asm/linkage.h file not found this link
I add
^Iobj-m += vrrp_daemon.o
all: ^I$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules $
clean: ^I$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean $
Now, also throw Same Error
This is My Make File:
# Makefile
#
# Keepalived OpenSource project.
#
# Copyright (C) 2001-2009 Alexandre Cassen, <acassen@linux-vs.org>
TARFILES = AUTHOR bin ChangeLog configure configure.in CONTRIBUTORS COPYING \
doc genhash INSTALL install-sh keepalived keepalived.spec.in lib Makefile.in \
README TODO VERSION
TARBALL = keepalived-1.1.19.tar.gz
^Iobj-m += vrrp_daemon.o
all:
$(MAKE) -C lib || exit 1;
$(MAKE) -C keepalived
$(MAKE) -C genhash $
^I$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules $
@echo ""
@echo "Make complete"
debug:
$(MAKE) -C lib || exit 1;
$(MAKE) -C keepalived debug
@echo ""
@echo "Make complete"
profile:
$(MAKE) -C lib || exit 1;
$(MAKE) -C keepalived profile
@echo ""
@echo "Make complete"
clean:
$(MAKE) -C lib clean
$(MAKE) -C keepalived clean
$(MAKE) -C genhash clean
^I$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean $
distclean:
$(MAKE) -C lib distclean
$(MAKE) -C keepalived distclean
$(MAKE) -C genhash distclean
rm -f Makefile
rm -f keepalived.spec
mrproper: distclean
rm -f config.*
uninstall:
$(MAKE) -C keepalived uninstall
$(MAKE) -C genhash uninstall
install:
$(MAKE) -C keepalived install
$(MAKE) -C genhash install
tarball: mrproper
mkdir keepalived-1.1.19
cp -a $(TARFILES) keepalived-1.1.19
tar --exclude .git -czf $(TARBALL) keepalived-1.1.19
rm -rf keepalived-1.1.19
rpm:
rpmbuild -ba keepalived.spec
Update:1 I find linkage.h file is there...
./modules/3.10.0-229.el7.x86_64/build/arch/x86/include/asm/linkage.h
./modules/3.10.0-229.el7.x86_64/build/include/asm-generic/linkage.h
./modules/3.10.0-229.el7.x86_64/build/include/linux/linkage.h
./modules/3.10.0-229.el7.x86_64/source/arch/x86/include/asm/linkage.h
./modules/3.10.0-229.el7.x86_64/source/include/asm-generic/linkage.h
./modules/3.10.0-229.el7.x86_64/source/include/linux/linkage.h
./modules/3.10.0-327.28.3.el7.x86_64/build/arch/x86/include/asm/linkage.h
./modules/3.10.0-327.28.3.el7.x86_64/build/include/asm-generic/linkage.h
./modules/3.10.0-327.28.3.el7.x86_64/build/include/linux/linkage.h
./modules/3.10.0-327.28.3.el7.x86_64/source/arch/x86/include/asm/linkage.h
./modules/3.10.0-327.28.3.el7.x86_64/source/include/asm-generic/linkage.h
./modules/3.10.0-327.28.3.el7.x86_64/source/include/linux/linkage.h
Suggest me How to solve this problem.