ipvsadm源码编译安装
源码安装步骤
安装依赖包
sudo yum install -y gcc-c++
sudo yum install libnl* libpopt*
sudo yum install -y popt-static
下载源码包
wget https://mirrors.edge.kernel.org/pub/linux/utils/kernel/ipvsadm/ipvsadm-1.31.tar.gz
编译安装
tar xzvf ipvsadm-1.31.tar.gz
cd ipvsadm-1.31
make
sudo make install
验证是否可用
[ec2-user@etcd1 ipvsadm-1.31]$ sudo ipvsadm -h
ipvsadm v1.31 2019/12/24 (compiled with popt and IPVS v1.2.1)
Usage:ipvsadm -A|E virtual-service [-s scheduler] [-p [timeout]] [-M netmask] [--pe persistence_engine] [-b sched-flags]ipvsadm -D virtual-serviceipvsadm -Cipvsadm -Ripvsadm -S [-n]ipvsadm -a|e virtual-service -r server-address [options]ipvsadm -d virtual-service -r server-addressipvsadm -L|l [virtual-service] [options]ipvsadm -Z [virtual-service]ipvsadm --set tcp tcpfin udpipvsadm --start-daemon {master|backup} [daemon-options]ipvsadm --stop-daemon {master|backup}ipvsadm -hCommands:
Either long or short options are allowed.--add-service -A add virtual service with options--edit-service -E edit virtual service with options--delete-service -D delete virtual service--clear -C clear the whole table--restore -R restore rules from stdin--save -S save rules to stdout--add-server -a add real server with options--edit-server -e edit real server with options--delete-server -d delete real server--list -L|-l list the table--zero -Z zero counters in a service or all services--set tcp tcpfin udp set connection timeout values--start-daemon start connection sync daemon--stop-daemon stop connection sync daemon--help -h display this help messagevirtual-service:--tcp-service|-t service-address service-address is host[:port]--udp-service|-u service-address service-address is host[:port]--sctp-service service-address service-address is host[:port]--fwmark-service|-f fwmark fwmark is an integer greater than zeroOptions:--ipv6 -6 fwmark entry uses IPv6--scheduler -s scheduler one of rr|wrr|lc|wlc|lblc|lblcr|dh|sh|sed|nq|fo|ovf|mh,the default scheduler is wlc.--pe engine alternate persistence engine may be sip,not set by default.--persistent -p [timeout] persistent service--netmask -M netmask persistent granularity mask--real-server -r server-address server-address is host (and port)--gatewaying -g gatewaying (direct routing) (default)--ipip -i ipip encapsulation (tunneling)--masquerading -m masquerading (NAT)--tun-type type one of ipip|gue|gre,the default tunnel type is ipip.--tun-port port tunnel destination port--tun-nocsum tunnel encapsulation without checksum--tun-csum tunnel encapsulation with checksum--tun-remcsum tunnel encapsulation with remote checksum--weight -w weight capacity of real server--u-threshold -x uthreshold upper threshold of connections--l-threshold -y lthreshold lower threshold of connections--connection -c output of current IPVS connections--timeout output of timeout (tcp tcpfin udp)--daemon output of daemon information--stats output of statistics information--rate output of rate information--exact expand numbers (display exact values)--thresholds output of thresholds information--persistent-conn output of persistent connection info--tun-info output of tunnel information--nosort disable sorting output of service/server entries--sort does nothing, for backwards compatibility--ops -o one-packet scheduling--numeric -n numeric output of addresses and ports--sched-flags -b flags scheduler flags (comma-separated)
Daemon Options:--syncid sid syncid for connection sync (default=255)--sync-maxlen length Max sync message length (default=1472)--mcast-interface interface multicast interface for connection sync--mcast-group address IPv4/IPv6 group (default=224.0.0.81)--mcast-port port UDP port (default=8848)--mcast-ttl ttl Multicast TTL (default=1)
[ec2-user@etcd1 ipvsadm-1.31]$
异常处理
fatal error: netlink/netlink.h: No such file or directory错误,具体错误日志信息
[ec2-user@etcd1 ipvsadm-1.31]$ make
make -C libipvs
make[1]: Entering directory '/home/ec2-user/ipvsadm-1.31/libipvs'
gcc -Wall -Wunused -Wstrict-prototypes -g -fPIC -DLIBIPVS_USE_NL -DHAVE_NET_IP_VS_H -c -o libipvs.o libipvs.c
In file included from libipvs.h:13,from libipvs.c:23:
ip_vs.h:15:10: fatal error: netlink/netlink.h: No such file or directory15 | #include <netlink/netlink.h>| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:39: libipvs.o] Error 1
make[1]: Leaving directory '/home/ec2-user/ipvsadm-1.31/libipvs'
make: *** [Makefile:87: libs] Error 2
[ec2-user@etcd1 ipvsadm-1.31]$
解决方法:需要安装sudo yum install libnl* libpopt*后修复
fatal error: popt.h: No such file or directory错误,具体错误信息
[ec2-user@etcd1 ipvsadm-1.31]$ make
make -C libipvs
make[1]: Entering directory '/home/ec2-user/ipvsadm-1.31/libipvs'
gcc -Wall -Wunused -Wstrict-prototypes -g -fPIC -DLIBIPVS_USE_NL -I/usr/include/libnl3 -DHAVE_NET_IP_VS_H -c -o libipvs.o libipvs.c
gcc -Wall -Wunused -Wstrict-prototypes -g -fPIC -DLIBIPVS_USE_NL -I/usr/include/libnl3 -DHAVE_NET_IP_VS_H -c -o ip_vs_nl_policy.o ip_vs_nl_policy.c
ar rv libipvs.a libipvs.o ip_vs_nl_policy.o
ar: creating libipvs.a
a - libipvs.o
a - ip_vs_nl_policy.o
gcc -shared -Wl,-soname,libipvs.so -o libipvs.so libipvs.o ip_vs_nl_policy.o
make[1]: Leaving directory '/home/ec2-user/ipvsadm-1.31/libipvs'
gcc -Wall -Wunused -Wstrict-prototypes -g -DVERSION=\"1.31\" -DSCHEDULERS=\""rr|wrr|lc|wlc|lblc|lblcr|dh|sh|sed|nq|fo|ovf|mh"\" -DPE_LIST=\""sip"\" -DHAVE_NET_IP_VS_H -c -o ipvsadm.o ipvsadm.c
ipvsadm.c:114:10: fatal error: popt.h: No such file or directory114 | #include "popt.h"| ^~~~~~~~
compilation terminated.
make: *** [Makefile:142: ipvsadm.o] Error 1
[ec2-user@etcd1 ipvsadm-1.31]$
解决方法:执行sudo yum install -y popt-static修复
ipvsadm源码编译安装相关推荐
- mono和monodevelop源码编译安装
之所以用源码编译的方式安装mono和monodevelop,是因为通过yum安装的mono不是最新版本,而且monodevelop不能建 asp.net MVC3的工程. 而且通过源码安装,可以进一步 ...
- mac通过tree源码编译安装tree
通过tree源码编译安装 下载源码:curl -O ftp://mama.indstate.edu/linux/tree/tree-1.6.0.tgz 解压源码:tar xzvf tree-1.6 ...
- 源码编译安装percona-xtrabackup-2.3.2
一.系统包需求 rpm -q libaio-devel libgpg-error-devel libgcrypt-devel autoconf automake libidn-devel libcur ...
- 如何在ARM开发板上从源码编译安装OpenCV和OpenCV contrib
点击上方"3D视觉工坊",选择"星标" 干货第一时间送达 本文主要介绍如何在ARM开发板上从源码编译安装OpenCV和OpenCV contrib. OpenC ...
- 烂泥:mysql5.5数据库cmake源码编译安装
本文首发于烂泥行天下. 以前也写过一篇有关mysql5.0源码编译的文章,该文章为<烂泥:mysql5.0数据库源码编译安装>.但是MySQL自5.5版本以后,就开始使用cmake 编译工 ...
- mysql5.7 cmake源码编译安装
mysql5.7 cmake源码编译安装, -----该文章的知识点是一个大牛总结的,我这里只是加工了一下,非原创文章. 搜狐开源镜像站:http://mirrors.sohu.com/ 网易开源镜像 ...
- Splunk安装和配置及源码编译安装SVN
Splunk安装和配置 http://my.oschina.net/tuyang/blog/189159 http://my.oschina.net/longniao/blog/82766 http: ...
- php 7.0 编译安装mysql_源码编译安装php7.0.5
源码编译安装php7.0.5 源码包下载地址 安装epel扩展yum源 [root@xuegod63 ~]# yum clean all [root@xuegod63 ~]# yum list 注:R ...
- linux7安装haproxy,Centos7 源码编译安装haproxy
Centos7 源码编译安装haproxy 操作环境: 一台haproxy主机地址为:192.168.80.100 两台web服务器地址分别为:192.168.80.102 192.168.80.10 ...
最新文章
- 使用微波炉的十大忌讳
- mysql 不同连接的事务 会嵌套_MySQL——事务
- webstom新增vue模板
- leetcode 105. 从前序与中序遍历序列构造二叉树 c语言递归解法
- boost::geometry::intersects用法的测试程序
- “内部人”的信息安全架构---信任体系
- 通过官方查看springCloud,springBoot版本对应关系
- nginx+thinkphp下解决不支持pathinfo模式以及存在的各种404,500问题
- ssm框架返回html,ssm框架controller层返回json格式数据到页面
- html隔一行的代码,HTML n种方式实现隔行变色的示例代码
- 中国企业考勤软件市场趋势报告、技术动态创新及市场预测
- vb 运行错误429 mysql_”运行时错误429:activex部件不能创建对象。“
- JAV学习笔记—IO相关类
- 基于Halcon的螺栓螺丝部分划痕、腐蚀缺陷检测
- VMware 虚拟机安装 android-x86_64-9.0-r2 后 VirtWifi/无法访问互联网
- 服务器文件安全扫描,服务器安全扫描工具
- mui获取手机设备信息
- 登录实例失败,原因: 连接实例 i-wz972sda3z2cf3u3t9a1 (47.112.162.228:3389) 超时: 10 秒,请检查网络是否可达或者白名单设置
- 计算机实用教学,【实用】计算机教学工作计划3篇
- 怎么可以修改pr基本图形中的文字_AE特效文字转PR图形预设
热门文章
- mat 释放_cv :: Mat内存即使在调用release()后也不会释放?
- 拍七游戏(zzuli)
- 给电脑重装系统的方法与重装过程中问题解决
- 著名C9院校!接连发表5篇Nature/Cell!
- 教你如何将磁盘中黑色的未分配空间变成绿色的可用空间
- Unity Shader Graph 制作Emission发光效果
- Staubli HCB08.7202/IC/JS3
- Python 爬取揭秘,你的考研调剂对手就有谁?这次考研有你吗
- python中tk_可爱的 Python:Python 中的 TK编程
- 照片也能动起来,Python这个开源项目厉害了!