keepalived和nginx的安装和使用

1、安装keepalived

   解压后  ./configure --prefix=/usr/local/keepalived

     make&&make install

2、拷贝设置

      mkdir /etc/keepalived

  cp /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/

        拷贝服务脚本到默认地址

  cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d

  cp /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig

  ln -s /usr/local/sbin/keepalive /usr/sbin

  ln -s /usr/local/keepalived/sbin/keepalived  /sbin

    设置开机启动

  chkconfig keepalived on

 

  

上一篇:第三方站点统计


下一篇:Linux常用命令整理