首页 > 系统相关 >CentOS 8.2 k8s 集群安装 Keepalived-2.2.7

CentOS 8.2 k8s 集群安装 Keepalived-2.2.7

时间:2022-10-16 14:46:34浏览次数:74  
标签:Use 8.2 CentOS No -- Keepalived support keepalived IPVS

一、Keepalived 集群安装

地址

Nginx 和 Keepalived 是配套使用的,如果有其他负载均衡器就不需要再安装这两个服务。

安装依赖

yum install -y ipvsadm popt popt-devel libnl libnl-devel libnl3-devel libnfnetlink libnfnetlink-devel net-snmp-devel openssl openssl-devel

wget 下载安装包

wget https://www.keepalived.org/software/keepalived-2.2.7.tar.gz

解压

tar -zxvf /opt/software/keepalived-2.2.7.tar.gz -C /opt/

编译&安装

cd /opt/software/keepalived-2.2.7

./configure --prefix=/usr/local/keepalived
make && make install

使用keepalived -v查看版本号信息

/usr/local/keepalived/sbin/keepalived -v

安装过程中提示

*** WARNING - this build will not support IPVS with IPv6. Please install libnl/libnl-3 dev libraries to support IPv6 with IPVS.

Keepalived configuration
------------------------
Keepalived version       : 2.2.7
Compiler                 : gcc gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Preprocessor flags       : -D_GNU_SOURCE
Compiler flags           : -g -g -O2 -Wextra -Wunused -Wstrict-prototypes -Wabi -Wbad-function-cast -Wcast-align -Wcast-qual -Wdisabled-optimization -Wdouble-promotion -Wfloat-equal -Wframe-larger-than=5120 -Winit-self -Winline -Winvalid-pch -Wjump-misses-init -Wlogical-op -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Woverlength-strings -Wpointer-arith -Wredundant-decls -Wshadow -Wstack-protector -Wstrict-overflow=4 -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wsync-nand -Wtrampolines -Wundef -Wuninitialized -Wunknown-pragmas -Wunsafe-loop-optimizations -Wunsuffixed-float-constants -Wvariadic-macros -Wwrite-strings -fPIE -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -O2
Linker flags             : -pie -Wl,-z,relro -Wl,-z,now
Extra Lib                : -lm -lcrypto -lssl
Use IPVS Framework       : Yes
IPVS use libnl           : No
IPVS syncd attributes    : No
IPVS 64 bit stats        : No
HTTP_GET regex support   : No
fwmark socket support    : Yes
Use VRRP Framework       : Yes
Use VRRP VMAC            : Yes
Use VRRP authentication  : Yes
With track_process       : Yes
With linkbeat            : Yes
Use BFD Framework        : No
SNMP vrrp support        : No
SNMP checker support     : No
SNMP RFCv2 support       : No
SNMP RFCv3 support       : No
DBUS support             : No
Use JSON output          : No
libnl version            : None
Use IPv4 devconf         : No
Use iptables             : No
Use nftables             : No
init type                : systemd
systemd notify           : No
Strict config checks     : No
Build documentation      : No
Default runtime options  : -D

*** WARNING - this build will not support IPVS with IPv6. Please install libnl/libnl-3 dev libraries to support IPv6 with IPVS.

解决上述警告问题

yum install -y libnl3.x86_64 libnl3-devel.x86_64

系统出现错误信息

configure: error: libnfnetlink headers missing

解决方法

yum install -y libnfnetlink-devel

查看基本命令

[root@ecs-65685 ~]# /usr/local/keepalived/sbin/keepalived --help
Usage: ./keepalived [OPTION...]
  -f, --use-file=FILE          Use the specified configuration file
                                default '/usr/local/etc/keepalived/keepalived.conf'
                                     or '/etc/keepalived/keepalived.conf'
  -P, --vrrp                   Only run with VRRP subsystem
  -C, --check                  Only run with Health-checker subsystem
      --all                    Force all child processes to run, even if have no configuration
  -l, --log-console            Log messages to local console
  -D, --log-detail             Detailed log messages
  -S, --log-facility=([0-7]|local[0-7]|user|daemon)
                               Set syslog facility to LOG_LOCAL[0-7], user or daemon (default)
  -G, --no-syslog              Don't log via syslog
  -u, --umask=MASK             umask for file creation (in numeric form)
  -X, --release-vips           Drop VIP on transition from signal.
  -V, --dont-release-vrrp      Don't remove VRRP VIPs and VROUTEs on daemon stop
  -I, --dont-release-ipvs      Don't remove IPVS topology on daemon stop
  -R, --dont-respawn           Don't respawn child processes
  -n, --dont-fork              Don't fork the daemon process
  -d, --dump-conf              Dump the configuration data
  -p, --pid=FILE               Use specified pidfile for parent process
  -r, --vrrp_pid=FILE          Use specified pidfile for VRRP child process
  -T, --genhash                Enter into genhash utility mode (this should be the first option used).
  -c, --checkers_pid=FILE      Use specified pidfile for checkers child process
  -a, --address-monitoring     Report all address additions/deletions notified via netlink
  -s, --namespace=NAME         Run in network namespace NAME (overrides config)
  -m, --core-dump              Produce core dump if terminate abnormally
  -M, --core-dump-pattern=PATN Also set /proc/sys/kernel/core_pattern to PATN (default 'core')
  -e, --all-config             Error if any configuration file missing (same as includet)
  -i, --config-id id           Skip any configuration lines beginning '@' that don't match id
                                or any lines beginning @^ that do match.
                                The config-id defaults to the node name if option not used
      --signum=SIGFUNC         Return signal number for STOP, RELOAD, DATA, STATS, STATS_CLEAR
  -t, --config-test[=LOG_FILE] Check the configuration for obvious errors, output to
                                stderr by default
  -v, --version                Display the version number
  -h, --help                   Display this help message

 

标签:Use,8.2,CentOS,No,--,Keepalived,support,keepalived,IPVS
From: https://www.cnblogs.com/huaxiayuyi/p/16796134.html

相关文章

  • CentOS7.9安装mqtt消息中间件mosquitto
    MQTT(MQTelemetryTransport),消息队列遥测传输协议,轻量级的发布/订阅协议,适用于一些条件比较苛刻的环境,进行低带宽、不可靠或间歇性的通信。目前已经是物联网消息通信事实上......
  • .Net Core后端项目部署在Centos 7
    【安装.Net框架】安装.NET之前,请运行以下命令,将Microsoft包签名密钥添加到受信任密钥列表,并添加Microsoft包存储库。打开终端并运行以下命令:sudorpm-Uvhhttps:......
  • Centos 6.6 升级 glibc 问题
    Centos6.6升级glibchttp://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gzhttp://ftp.gnu.org/gnu/glibc/glibc-2.16.0.tar.gz示例tarxfglibc-2.16.0.tar.gzcdglibc-2.1......
  • CentOS7修改SSH端口
    CentOS7修改SSH端口1.修改ssh配置文件#查看当前ssh服务器端口号netstat-tunlp|grep"ssh"默认的话是222.修改端口vi/etc/ssh/sshd_config去掉前面的#,改为Port2222......
  • Centos 7.6 永久生效 最大进程数、打开文件数 Ulimit -a
    1.通过命令ulimit-a查看当前系统[root@db01~18:50:18]#cat/etc/redhat-releaseCentOSLinuxrelease7.6.1810(Core)[root@db01~18:50:24]#ulimit-acorefile......
  • Docker | dockerfile构建centos镜像,以及CMD和ENTRYPOINT的区别
    构建自己的centos镜像dockerpullcentos下载下来的镜像都是基础版本,缺少很多常用的命令功能,比如:ll、vim等等,下面介绍制作一个功能较全的自己的centos镜像。步骤1、编......
  • CentOS最小化安装后找不到ifconfig命令
    1.ifconfig命令是设置或显示网络接口的程序,可以显示出我们机器的网卡信息,可是有些时候最小化安装CentOS等Linux发行版的时候会默认不安装ifconfig等命令,这时候你进入终端......
  • Centos 8 升级内核通过elrepo源
    一、Centos8升级内核通过elrepo源地址https://www.kernel.orghttp://elrepo.org/tiki/tiki-index.php 查看linux内核版本[root@localhost~]#cat/proc/versio......
  • Centos7安装配置jenkins
    安装前准备注:jenkins依赖jdk环境,需提前安装配置(如已安装请跳过)一、jdk8安装配置jdk8下载地址:https://www.oracle.com/java/technologies/javase/jdk8-arm-downloads.htm......
  • centos7.9 安装postgres15数据库
    1.安装yum仓库yuminstall-yhttps://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm2.安装环境依赖(1).安装lib......