It was simple, but there were a lot of errors during the installation, so here's a memo.
The redhat of my environment 5,keepalived just started to download is 1.2.5
1.2.5 Version Installation
Extract
./configure (plus no kernel path)
Make && make install
Found the error, the information is as follows
In file included from libipvs.c:25:
Libipvs.h:99:error:expected ') ' before ' union '
Libipvs.c:882:error:expected ') ' Before ' Fwmark '
It's a grammatical mistake, but it's really not good.
Finally found is the compilation problem, my Linux kernel is 2.6.18, and compile that syntax requires 2.6. More than 3, tortured an afternoon, no way, can only re-download version 1.2.2 This version of the Web with a lot of like, continue to install
./configure-with-kernel-dir this step to find the kernel path must be added, or it will be an error
Make && make install to continue installation, found another error
usr/include/time.h:105:error:conflicting types for ' timer_t '
/usr/src/kernels/2.6.18-128.el5-i686/include/linux/types.h:31:error:previous declaration of ' timer_t ' is here
This error, many solutions on the web, but also the Linux compiler legacy issues, the solution is as follows
# vim./keepalived/libipvs-2.6/ip_vs.h
Move # include <linux/types.h> to # include <sys/types.h> back.
Finally the installation succeeded.
Then the CP keepalived.conf/etc/keepalived/moves the configuration file to/etc/keepalived, because the default pair to/etc reads the file
You can also move the startup item to the CP Keepalived/usr/sbin with an environment variable
Install keepalived under Linux