centos编译安装keepalived

5-13 1,416 views

1.下载keepalived包

下载地址:https://www.keepalived.org/download.html

$ cd /opt
$ wget https://www.keepalived.org/software/keepalived-2.0.16.tar.gz
$ tar -zxvf keepalived-2.0.16.tar.gz
$ cd keepalived-2.0.16

2.安装依赖

$ yum -y install kernel-headers kernel-devel

3.安装

#编辑安装
$ ./configure --with-kernel-dir=/lib/modules/$(uname -r)/build
$ make && make install
#创建软连接
$ cd /etc/sysconfig
$ ln -s /usr/local/etc/sysconfig/keepalived .
$ cd /etc/rc3.d/
$ ln -s /usr/local/etc/rc.d/init.d/keepalived S100keepalived
$ cd /etc/init.d/
$ ln -s /usr/local/etc/rc.d/init.d/keepalived .
#配置文件
$ cd /usr/local/etc/keepalived
$ cp keepalived.conf keepalived.conf.bak

Linux使用lsyncd实现2个文件夹实时同步

官方文档: https://axkibe.github.io/lsyncd/download/ 1.安装 $ yum install lsyncd $ yum install rsync $ yum install libtermcap-devel ncurses-devel l...

阅读全文

firewall 防火墙常用命令

查看版本 $ firewall-cmd --version 0.4.3.3 help $ firewall-cmd --help 状态 $ firewall-cmd --state running 重载配置 $ firewall-cmd --reload 重新加载...

阅读全文

修改linux centos系统默认时区

方法一 先安装ntpdate: yum install -y ntpdate 再选择一个时间服务器来更新时间: ntpdate time.windows.com 恢复系统时间为utc时间 ln -sf /usr/share/zo...

阅读全文

欢迎留言