今天在linux上安装 keepalived-1.1.20使用 make install这个命令时候出现下面错误
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了今天在linux上安装 keepalived-1.1.20使用 make install这个命令时候出现下面错误相关的知识,希望对你有一定的参考价值。
make -C keepalived install
make[1]: Entering directory `/opt/keepalived-1.1.20/keepalived'
install -d /usr/local/sbin
install -m 700 ../bin/keepalived /usr/local/sbin/
install -d /usr/local/etc/rc.d/init.d
install -m 755 etc/init.d/keepalived.init /usr/local/etc/rc.d/init.d/keepalived
install -d /usr/local/etc/sysconfig
install -m 755 etc/init.d/keepalived.sysconfig /usr/local/etc/sysconfig/keepalived
install -d /usr/local/etc/keepalived/samples
install -m 644 etc/keepalived/keepalived.conf /usr/local/etc/keepalived/
install -m 644 ../doc/samples/* /usr/local/etc/keepalived/samples/
install -d /usr/local/share/man/man5
install -d /usr/local/share/man/man8
install -m 644 ../doc/man/man5/keepalived.conf.5 /usr/local/share/man/man5
install -m 644 ../doc/man/man8/keepalived.8 /usr/local/share/man/man8
make[1]: Leaving directory `/opt/keepalived-1.1.20/keepalived'
make -C genhash install
make[1]: Entering directory `/opt/keepalived-1.1.20/genhash'
install -d /usr/local/bin
install -m 755 ../bin/genhash /usr/local/bin/
install: cannot overwrite directory `/usr/local/bin/genhash' with non-directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/opt/keepalived-1.1.20/genhash'
make: *** [install] Error 2
Keepalived安装
1.在安装nginx的从节点 上传jar 2. 解压 [root@linux05 Downloads]# tar -zxvf keepalived-1.3.6.tar.gz 3. 开始配置 进入到 keepalived目录中 [root@linux05 keepalived-1.3.6]# ./configure --prefix=/usr/local/keepalived 4.安装 输入命令 [root@linux05 keepalived-1.3.6]# make && make install 5.将keepalived添加到系统服务中 5.1 //执行拷贝执行文件 将keepalived 复制到/usr/sbin/ 两种方法 a 、b a、 [root@linux05 keepalived-1.3.6]# cd /usr/local/ [root@linux05 local]# cd keepalived/ [root@linux06 keepalived]# cd sbin/ [root@linux05 sbin]# ls keepalived [root@linux05 sbin]# cp keepalived /usr/sbin/ --------------------------------------------------------------------------- b、 cp /usr/local/sbin/keepalived /usr/sbin/ 5.2 将init.d文件拷贝到etc下,加入开机启动项 cp /usr/local/src/keepalived-1.3.6/keepalived/etc/init.d/keepalived /etc/init.d/keepalived 找到keepalived的路径 init的路径复制 [root@linux05 sbin]# find / -name keepalived [root@linux05 sbin]# cp /root/Downloads/keepalived-1.3.6/keepalived/etc/init.d/keepalived /etc/init.d 5.3 将keepalived文件拷贝到etc下 [root@linux05 sysconfig]# cp /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig/ 5.4 创建keepalived文件夹 [root@linux05 local]# mkdir /etc/keepalived 5.5 将keepalived配置文件拷贝到etc下 [root@linux05 keepalived]# cp /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/ 5.6 添加可执行权限 [root@linux05 keepalived]# chmod +x /etc/init.d/keepalived 5.7 添加keepalived到开机启动 [root@linux05 keepalived]# chkconfig --add keepalived [root@linux05 keepalived]# chkconfig keepalived on 6.配置keepalived虚拟IP //将原来的文件改名 然后在重新编辑一个 [root@linux06 keepalived]# mv keepalived.conf keepalived1.conf vim /etc/keepalived/keepalived.conf //将下面文件放入 注:修改里面的虚拟ip 不管配几台 虚拟ip都一样 global_defs vrrp_instance VI_1 state MASTER interface eth0 virtual_router_id 51 priority 100 advert_int 1 authentication auth_type PASS auth_pass 1111 virtual_ipaddress 169.254.87.250/24 ***************************************************************** 7. 启动两台机器 service keepalived start ip addr //查虚拟ip是否开启 8.将以太网的共享关掉 将etho 改成之前的ip 9. 去页面访问 你的虚拟ip 169.254.87.250 注:如果重启网卡 会找不到 虚拟ip service network restart
以上是关于今天在linux上安装 keepalived-1.1.20使用 make install这个命令时候出现下面错误的主要内容,如果未能解决你的问题,请参考以下文章