Install keepalived under Linux

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.