keepalived(nginx的高可用)安装文档
1. 安装环境
su - root
yum -y install kernel-devel*
yum -y install openssl-*
yum -y install popt-devel
yum -y install lrzsz
yum -y install openssh-clients
yum -y install libnl libnl-devel popt
2. 安装keepalived
2.1. 安装keepalived
将keepalived-1.2.15.tar.gz上传到服务器/usr/local/下。
cd /usr/local
tar -zxvf keepalived-1.2.15.tar.gz
cd keepalived-1.2.15
执行配置命令
./configure --prefix=/usr/local/keepalived
3、编译
make
4、安装
make install
至此安装成功
5、拷贝执行文件
cp /usr/local/keepalived/sbin/keepalived /usr/sbin/
6、将init.d文件拷贝到etc下,加入开机启动项
cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d/keepalived
7、将keepalived文件拷贝到etc下,加入网卡配置
cp /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig/
8、创建keepalived文件夹
mkdir -p /etc/keepalived
9、将keepalived配置文件拷贝到etc下
cp /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/keepalived.conf
10、添加可执行权限
chmod +x /etc/init.d/keepalived
2.2. 加入开机启动:
chkconfig --add keepalived #添加时必须保证/etc/init.d/keepalived存在
chkconfig keepalived on
添加完可查询系统服务是否存在:chkconfig --list
2.3. 启动keepalived
启动:service keepalived start
停止:service keepalived stop
重启:service keepalived restart
3. 配置日志文件
1.将keepalived日志输出到local0:
vi /etc/sysconfig/keepalived
KEEPALIVED_OPTIONS="-D -d -S 0"
2.在/etc/rsyslog.conf里添加:
local0.* /var/log/keepalived.log
3.重新启动keepalived和rsyslog服务:
service rsyslog restart
service keepalived restart
4. 打开防火墙的通讯地址
iptables -A INPUT -d 224.0.0.18 -j ACCEPT
/etc/rc.d/init.d/iptables save
keepalived(nginx的高可用)安装文档的更多相关文章
- Keepalived+Nginx实现高可用Web负载均衡
1.安装编译 Nginx 所需的依赖包# yum install gcc gcc-c++ make automake autoconf libtool pcre pcre-devel zlib zli ...
- Dubbo入门到精通学习笔记(十六):Keepalived+Nginx实现高可用Web负载均衡
文章目录 Keepalived+Nginx实现高可用Web负载均衡 Keepalived+Nginx实现高可用Web负载均衡 高可用架构篇 Keepalived + Nginx 实现高可用 Web 负 ...
- Keepalived + Nginx 实现高可用 Web 负载均衡
一.Keepalived 简要介绍 Keepalived 是一种高性能的服务器高可用或热备解决方案, Keepalived 可以用来防止服务器单点故障的发生,通过配合 Nginx 可以实现 web 前 ...
- Keepalived+Nginx实现高可用(HA)
Keepalived+Nginx实现高可用(HA) service iptables stopchkconfig iptables offsetenforce 0/etc/selinux/config ...
- [转]搭建Keepalived+Nginx+Tomcat高可用负载均衡架构
[原文]https://www.toutiao.com/i6591714650205716996/ 一.概述 初期的互联网企业由于业务量较小,所以一般单机部署,实现单点访问即可满足业务的需求,这也是最 ...
- Nginx+Keepalived 主备高可用 安装与配置
环境说明:操作系统:CentOS6.7 x86_64Nginx版本:nginx-1.9.7Keepalived版本:keepalived-1.2.24 主nginx + Keepalived :10. ...
- KeepAlived+Nginx实现高可用负载
一.环境及安装版本: centos6.5.Nginx1.4.7.keepalived1.3.2 虚拟IP 真是IP Nginx端口 主从分配 10.0.90.215 10.0.90.217 80 MA ...
- Linux巩固记录(9) keepalived+nginx搭建高可用负载分发环境
环境准备(继续服用hadoop节点) slave1 192.168.2.201(CentOs 7) slave2 192.168.2.202(CentOs 7) slave1 和 slave2 上 ...
- Keepalived+Nginx实现高可用和双主节点负载均衡
简介 Nginx可以实现高并发反向代理,lvs集群可以实现负载均衡,但是他们都有一个共同的弊端,就是Nginx,lvs架构中Director是单点故障,有没有一个好的方案解决这个问题呢?答案是有.通过 ...
随机推荐
- NOIP 2011 Mayan游戏 大暴搜
题目链接:https://www.luogu.org/problemnew/show/P1312 我的第一篇题解!! 当然感谢ZAGER 的提示,他的链接https://www.cnblogs.com ...
- uva10655
Given the value of a+b and ab you will have to find the value of a n + b n Input The input file cont ...
- LOGO免费在线设计
http://www.logomaker.com.cn/ 藏经阁技术资料分享群二维码
- Java多线程(十)线程间通信 join
若果主线程想等待子线程执行完成之后再结束,可以用join方法 join 和sleep区别 join内部有wait实现,所以当执行join方法后,当前线程的锁被释放,那么其他线程就可以调用此线程的同步方 ...
- EditText(1)EditText的类型和回车键的行为
1,常见类型 <EditText android:id="@+id/email_address" android:layout_width="fill_parent ...
- Paxos,Raft,Zab一致性协议-Raft篇
Raft是一个一致性算法,旨在易于理解.它提供了Paxos的容错和性能.不同之处在于它被分解为相对独立的子问题,它清楚地解决了实际系统所需的所有主要部分.我们希望Raft能够为更广泛的受众提供共识,并 ...
- 提取header头进行模块化处理
在进行爬取网上东西的时候一般网站都做了UA的过滤,解决办法就是在代码中加入. 所以才有了本篇提取header头信息单独写成一个模块或者说是函数/类的想法,直接上示例 1.把UA头信息在浏览器中复制出来 ...
- HDU_2079_(01背包)(dfs)
选课时间(题目已修改,注意读题) Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) ...
- Java学习1_一些基础1——16.5.4
每个java程序中都必须有一个main方法,格式为: public class ClassName { public static void main(String[] args) { program ...
- vue城市三级联动组件 vue-area-linkage
Install the pkg with npm: // v5之前的版本 npm i --save vue-area-linkage // v5及之后的版本 npm i --save vue-area ...