haiyun.me - 高可用









Search Preview

高可用 - 海运的博客

haiyun.me
Linux/Windows服务器集群高可用技术。
.me > haiyun.me

SEO audit: Content analysis

Language Error! No language localisation is found.
Title 高可用 - 海运的博客
Text / HTML ratio 63 %
Frame Excellent! The website does not use iFrame solutions.
Flash Excellent! The website does not have any flash contents.
Keywords cloud echo make centos5 Jul eth0 install cd > wget proxy_set_header VRRP_InstanceVI_1 TCP \ zxvf tar server Keepalived_vrrp location MASTER proxy_cache
Keywords consistency
Keyword Content Title Description Headings
echo 11
make 8
centos5 7
Jul 7
eth0 6
install 6
Headings
H1 H2 H3 H4 H5 H6
1 2 0 0 3 0
Images We found 1 images on this web page.

SEO Keywords (Single)

Keyword Occurrence Density
echo 11 0.55 %
make 8 0.40 %
centos5 7 0.35 %
Jul 7 0.35 %
eth0 6 0.30 %
install 6 0.30 %
cd 5 0.25 %
> 5 0.25 %
wget 5 0.25 %
proxy_set_header 4 0.20 %
VRRP_InstanceVI_1 4 0.20 %
TCP 4 0.20 %
\ 4 0.20 %
zxvf 4 0.20 %
tar 4 0.20 %
server 4 0.20 %
Keepalived_vrrp 4 0.20 %
location 3 0.15 %
MASTER 3 0.15 %
proxy_cache 3 0.15 %

SEO Keywords (Two Word)

Keyword Occurrence Density
Jul 14 7 0.35 %
make make 4 0.20 %
make install 4 0.20 %
centos5 Keepalived_vrrp 4 0.20 %
Keepalived_vrrp VRRP_InstanceVI_1 4 0.20 %
tar zxvf 4 0.20 %
213618 centos5 3 0.15 %
203029 centos5 3 0.15 %
14 213618 3 0.15 %
Route 1 3 0.15 %
14 203029 3 0.15 %
centos5 Keepalived_healthcheckers 3 0.15 %
80 weight 2 0.10 %
L IP 2 0.10 %
Host host 2 0.10 %
tail n 2 0.10 %
scope global 2 0.10 %
global eth0 2 0.10 %
ipvsadm L 2 0.10 %
Virtual Server 2 0.10 %

SEO Keywords (Three Word)

Keyword Occurrence Density Possible Spam
make make install 4 0.20 % No
centos5 Keepalived_vrrp VRRP_InstanceVI_1 4 0.20 % No
203029 centos5 Keepalived_vrrp 3 0.15 % No
Jul 14 203029 3 0.15 % No
213618 centos5 Keepalived_healthcheckers 3 0.15 % No
14 213618 centos5 3 0.15 % No
Jul 14 213618 3 0.15 % No
14 203029 centos5 3 0.15 % No
IP Virtual Server 2 0.10 % No
Virtual Server version 2 0.10 % No
Server version 121 2 0.10 % No
version 121 size=4096 2 0.10 % No
L IP Virtual 2 0.10 % No
ipvsadm L IP 2 0.10 % No
121 size=4096 Prot 2 0.10 % No
size=4096 Prot LocalAddressPort 2 0.10 % No
Prot LocalAddressPort Scheduler 2 0.10 % No
3 nb_get_retry 3 2 0.10 % No
nb_get_retry 3 delay_before_retry 2 0.10 % No
3 delay_before_retry 3 2 0.10 % No

SEO Keywords (Four Word)

Keyword Occurrence Density Possible Spam
203029 centos5 Keepalived_vrrp VRRP_InstanceVI_1 3 0.15 % No
Jul 14 213618 centos5 3 0.15 % No
14 203029 centos5 Keepalived_vrrp 3 0.15 % No
Jul 14 203029 centos5 3 0.15 % No
14 213618 centos5 Keepalived_healthcheckers 3 0.15 % No
remote_addr proxy_pass httpproxy_server_pool location 2 0.10 % No
version 121 size=4096 Prot 2 0.10 % No
Server version 121 size=4096 2 0.10 % No
Virtual Server version 121 2 0.10 % No
IP Virtual Server version 2 0.10 % No
L IP Virtual Server 2 0.10 % No
ipvsadm L IP Virtual 2 0.10 % No
80 weight 1 TCP_CHECK 2 0.10 % No
weight 1 TCP_CHECK connect_timeout 2 0.10 % No
1 TCP_CHECK connect_timeout 3 2 0.10 % No
TCP_CHECK connect_timeout 3 nb_get_retry 2 0.10 % No
3 nb_get_retry 3 delay_before_retry 2 0.10 % No
connect_timeout 3 nb_get_retry 3 2 0.10 % No
Prot LocalAddressPort Scheduler Flags 2 0.10 % No
nb_get_retry 3 delay_before_retry 3 2 0.10 % No

Internal links in - haiyun.me

关于
关于 - 海运的博客
分析网站
分析网站 - 海运的博客
文章归档
文章归档 - 海运的博客
参考手册
参考手册 - 海运的博客
在线工具
在线工具 - 海运的博客
常用命令
常用命令 - 海运的博客
centos repo管理使用
centos repo管理使用 - 海运的博客
centos/debian自动通过网络远程安装系统配置脚本
centos/debian自动通过网络远程安装系统配置脚本 - 海运的博客
https://www.haiyun.me/archives/1246.html
IPXE网络引导通过kickstart和preseed自动安装centos/ubuntu/debian系统 - 海运的博客
https://www.haiyun.me/archives/1249.html
使用kickstart安装ubuntu - 海运的博客
Centos/linux ipv4优先
Centos/linux ipv4优先 - 海运的博客
1
海运的博客
2
海运的博客
3
海运的博客
4
海运的博客
153
海运的博客
PHP
PHP - 海运的博客
IIS
IIS - 海运的博客
Mail
Mail - 海运的博客
DNS
DNS - 海运的博客
Cacti
Cacti - 海运的博客
Squid
Squid - 海运的博客
Nagios
Nagios - 海运的博客
Puppet
Puppet - 海运的博客
CentOS
CentOS - 海运的博客
Iptables
Iptables - 海运的博客
RADIUS
RADIUS - 海运的博客
OpenWrt
OpenWrt - 海运的博客
DD-WRT
DD-WRT - 海运的博客
VMware
VMware - 海运的博客
网站程序
网站程序 - 海运的博客
备份存储
备份存储 - 海运的博客
常用软件
常用软件 - 海运的博客
日记分析
日记分析 - 海运的博客
Linux基础
Linux基础 - 海运的博客
欧诺代理
欧诺代理 - 海运的博客
Linux服务
Linux服务 - 海运的博客
系统监控
系统监控 - 海运的博客
流量监控
流量监控 - 海运的博客
虚拟化
虚拟化 - 海运的博客
伪静态
伪静态 - 海运的博客
LVM
LVM - 海运的博客
Shell
Shell - 海运的博客
高可用
高可用 - 海运的博客
数据库
数据库 - 海运的博客
FreeBSD
FreeBSD - 海运的博客
网络安全
网络安全 - 海运的博客
Windows
Windows - 海运的博客
网络工具
网络工具 - 海运的博客
控制面板
控制面板 - 海运的博客
系统调优
系统调优 - 海运的博客
Cisco
Cisco - 海运的博客
VPN
VPN - 海运的博客
ROS
ROS - 海运的博客
Vim
Vim - 海运的博客
KMS
KMS - 海运的博客
PXE
PXE - 海运的博客
Mac
Mac - 海运的博客
Git
Git - 海运的博客
PE
PE - 海运的博客
LNS
LNS - 海运的博客
Xshell
Xshell - 海运的博客
Firefox
Firefox - 海运的博客
Cygwin
Cygwin - 海运的博客
OpenSSL
OpenSSL - 海运的博客
Sandboxie
Sandboxie - 海运的博客
StrokesPlus
StrokesPlus - 海运的博客
AutoHotKey
AutoHotKey - 海运的博客
Total Commander
Total Commander - 海运的博客
WordPress
WordPress - 海运的博客
iMacros
iMacros - 海运的博客
Typecho
Typecho - 海运的博客
Ollydbg
Ollydbg - 海运的博客
Photoshop
Photoshop - 海运的博客
正则
正则 - 海运的博客
Debian
Debian - 海运的博客
Python
Python - 海运的博客
NoSQL
NoSQL - 海运的博客
消息队列
消息队列 - 海运的博客
JS
JS - 海运的博客
Tmux
Tmux - 海运的博客
GO
GO - 海运的博客
HHVM
HHVM - 海运的博客
算法
算法 - 海运的博客
Docker
Docker - 海运的博客
initrd.img解压与打包
initrd.img解压与打包 - 海运的博客
qq smtp 465/587端口区别
qq smtp 465/587端口区别 - 海运的博客

Haiyun.me Spined HTML


高可用 - 海运的博客 海运的博客 首页 关于 分析网站 文章归档 参考手册 在线工具 常用命令 Centos配置LVS Keepalived高可用负载均衡服务器 发布时间:July 18, 2012 // 分类:高可用 // No Comments LVS IP信息:主LVS:192.168.1.2 备LVS:192.168.1.3 虚拟IP:192.168.1.6 应用服务器1:192.168.1.12 应用服务器2:192.168.1.13查看内核是否支持LVS模块:modprobe -l |grep ipvs /lib/modules/2.6.18-274.17.1.el5/kernel/net/ipv4/ipvs/ip_vs.ko /lib/modules/2.6.18-274.17.1.el5/kernel/net/ipv4/ipvs/ip_vs_dh.ko /lib/modules/2.6.18-274.17.1.el5/kernel/net/ipv4/ipvs/ip_vs_ftp.ko /lib/modules/2.6.18-274.17.1.el5/kernel/net/ipv4/ipvs/ip_vs_lblc.ko /lib/modules/2.6.18-274.17.1.el5/kernel/net/ipv4/ipvs/ip_vs_lblcr.ko /lib/modules/2.6.18-274.17.1.el5/kernel/net/ipv4/ipvs/ip_vs_lc.ko /lib/modules/2.6.18-274.17.1.el5/kernel/net/ipv4/ipvs/ip_vs_nq.ko /lib/modules/2.6.18-274.17.1.el5/kernel/net/ipv4/ipvs/ip_vs_rr.ko /lib/modules/2.6.18-274.17.1.el5/kernel/net/ipv4/ipvs/ip_vs_sed.ko /lib/modules/2.6.18-274.17.1.el5/kernel/net/ipv4/ipvs/ip_vs_sh.ko /lib/modules/2.6.18-274.17.1.el5/kernel/net/ipv4/ipvs/ip_vs_wlc.ko /lib/modules/2.6.18-274.17.1.el5/kernel/net/ipv4/ipvs/ip_vs_wrr.ko根据内核版本下载安装相应的ipvsadm:ln -s /usr/src/kernels/2.6.18-274.17.1.el5-x86_64/ /usr/src/linux wget http://www.linuxvirtualserver.org/software/kernel-2.6/ipvsadm-1.24.tar.gz tar zxvf ipvsadm-1.24.tar.gz cd ipvsadm-1.24 make make install也可使用yum直接安装:yum install ipvsadm安装Keepalived:wget http://www.keepalived.org/software/keepalived-1.1.19.tar.gz tar zxvf keepalived-1.1.19.tar.gz cd keepalived-1.1.19 ./configure --sysconf=/etc/ --with-kernel-dir=/usr/src/kernels/2.6.18-274.17.1.el5-x86_64/ make make install ln -s /usr/local/sbin/keepalived /sbin/keepalived主LVS配置keepalived:! Configuration File for keepalived global_defs { notification_email { admin@www.haiyun.me } notification_email_from Alexandre.Cassen@firewall.loc smtp_server 127.0.0.1 smtp_connect_timeout 30 router_id LVS_DEVEL } vrrp_instance VI_1 { state MASTER interface eth0 virtual_router_id 51 priority 100 advert_int 1 hallmark { auth_type PASS auth_pass 1111 } virtual_ipaddress { 192.168.1.6 } } virtual_server 192.168.1.6 80 { delay_loop 6 lb_algo rr lb_kind NAT nat_mask 255.255.255.0 persistence_timeout 50 protocol TCP real_server 192.168.1.12 80 { weight 1 TCP_CHECK { connect_timeout 3 nb_get_retry 3 delay_before_retry 3 } } real_server 192.168.1.13 80 { weight 1 TCP_CHECK { connect_timeout 3 nb_get_retry 3 delay_before_retry 3 } } }启动keepalived,同时会在主LVS绑定VIP:/etc/init.d/keepalived start ip add show eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:0c:29:e7:cc:3b brd ff:ff:ff:ff:ff:ff inet 192.168.1.3/24 brd 192.168.1.255 telescopic global eth0 inet 192.168.1.6/32 telescopic global eth0查看当前LVS参数:ipvsadm -L IP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags -> RemoteAddress:Port Forward Weight ActiveConn InActConn TCP 192.168.1.6:http rr -> 192.168.1.12:http Route 1 0 0 -> 192.168.1.13:http Route 1 0 0 复制主keepalived到备LVS,修改以下参数:state BACKUP priority 90应用服务器增加虚拟VIP:#!/bin/bash VIP=192.168.1.6 . /etc/rc.d/init.d/functions specimen "$1" in start) ifconfig lo:0 $VIP netmask 255.255.255.255 unconcentrated $SNS reverberate "1" >/proc/sys/net/ipv4/conf/lo/arp_ignore reverberate "2" >/proc/sys/net/ipv4/conf/lo/arp_announce reverberate "1" >/proc/sys/net/ipv4/conf/all/arp_ignore reverberate "2" >/proc/sys/net/ipv4/conf/all/arp_announce sysctl -p >/dev/null 2>&1 reverberate "RealServer Start OK" ;; stop) ifconfig lo:0 lanugo reverberate "0" >/proc/sys/net/ipv4/conf/lo/arp_ignore reverberate "0" >/proc/sys/net/ipv4/conf/lo/arp_announce reverberate "0" >/proc/sys/net/ipv4/conf/all/arp_ignore reverberate "0" >/proc/sys/net/ipv4/conf/all/arp_announce reverberate "RealServer Stoped" ;; *) reverberate "Usage: $0 {start|stop}" exit 1 esac测试LVS故障切换,停止主LVS上keepalived服务:/etc/init.d/keepalived stop查看备LVS已经接管为主LVS:tail -n 10 /var/log/message Jul 14 20:30:28 centos5 Keepalived_vrrp: VRRP_Instance(VI_1) Transition to MASTER STATE Jul 14 20:30:29 centos5 Keepalived_vrrp: VRRP_Instance(VI_1) Entering MASTER STATE Jul 14 20:30:29 centos5 Keepalived_vrrp: VRRP_Instance(VI_1) setting protocol VIPs. Jul 14 20:30:29 centos5 Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 192.168.1.6应用服务器故障测试,停止其中之一httpd服务:/etc/init.d/httpd stop查看keepalved日志已将出错服务器移除并邮件报警:tail -n 10 /var/log/message Jul 14 21:36:18 centos5 Keepalived_healthcheckers: TCP connection to [192.168.1.12:80] failed !!! Jul 14 21:36:18 centos5 Keepalived_healthcheckers: Removing service [192.168.1.12:80] from VS [192.168.1.6:80] Jul 14 21:36:18 centos5 Keepalived_healthcheckers: Remote SMTP server [127.0.0.1:25] connected.ipvsadm -L IP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags -> RemoteAddress:Port Forward Weight ActiveConn InActConn TCP 192.168.1.6:http rr -> 192.168.1.13:http Route 1 0 0 Nginx反向代理做负载均衡及缓存服务器 发布时间:May 2, 2012 // 分类:高可用 // No Comments 安装编译环境及相关组件:yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 \ libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel flourish \ curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap \ openldap-devel nss_ldap openldap-clients openldap-servers unzip编译安装PCRE、Nginx及缓存清除模块ngx_cache_purge:/usr/local/src/ wget http://sourceforge.net/projects/pcre/files/pcre/8.30/pcre-8.30.zip unzip pcre-8.30.zip cd pcre-8.30 ./configure make && make install cd .. wget http://labs.frickle.com/files/ngx_cache_purge-1.2.tar.gz tar zxvf ngx_cache_purge-1.2.tar.gz wget http://nginx.org/download/nginx-1.0.15.tar.gz tar zxvf nginx-1.0.15.tar.gz cd nginx-1.0.15 ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module \ --with-http_gzip_static_module --add-module=../ngx_cache_purge-1.2 make && make install Nginx配置文件:user www www; worker_processes 4; error_log /usr/local/nginx/logs/nginx_error.log crit; pid /usr/local/nginx/logs/nginx.pid; worker_rlimit_nofile 65535; events { use epoll; worker_connections 65535; } http { include mime.types; default_type application/octet-stream; charset utf-8; server_names_hash_bucket_size 128; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 50m; sendfile on; tcp_nopush on; keepalive_timeout 60; tcp_nodelay on; proxy_temp_path /cache_tmp; proxy_cache_path /cache levels=1:2 keys_zone=proxy_cache:256m inactive=10d max_size=10g; client_body_buffer_size 512k; proxy_connect_timeout 5; proxy_read_timeout 60; proxy_send_timeout 15; proxy_buffer_size 16k; proxy_buffers 4 64k; proxy_busy_buffers_size 128k; proxy_temp_file_write_size 128k; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.0; gzip_comp_level 2; gzip_types text/plain application/x-javascript text/css application/xml; gzip_vary on; upstream proxy_server_pool { server node1.www.haiyun.me; server node2.www.haiyun.me; } log_format proxy $remote_addr-$remote_user-$time_local-$request-$body_bytes_sent-$http_referer- $http_user_agent-$upstream_addr-$upstream_cache_status-$upstream_status ; server { listen 80; server_name cdn.www.haiyun.me; location / { proxy_next_upstream http_502 http_504 error timeout invalid_header; proxy_cache proxy_cache; proxy_cache_valid 200 304 1d; proxy_cache_key $host$uri$is_args$args; #$http_cookie add_header Nginx-Cache "$upstream_cache_status from $upstream_addr"; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; proxy_pass http://proxy_server_pool; } location ~ .*\.(php|jsp|cgi)?$ { proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; proxy_pass http://proxy_server_pool; } location ~ /purge(/.*) { indulge 127.0.0.1; deny all; proxy_cache_purge proxy_cache $host$uri$is_args$args; } access_log /usr/local/nginx/logs/cdn.www.haiyun.me.log proxy; } } 分类 Apache (13)Nginx (42)PHP (83)IIS (8)Mail (17)DNS (14)Cacti (14)Squid (5)Nagios (4)Puppet (7)CentOS (13)Iptables (23)RADIUS (3)OpenWrt (40)DD-WRT (1)VMware (9)网站程序 (3)备份存储 (11)常用软件 (20)日记分析 (10)Linux基础 (18)欧诺代理 (2)Linux服务 (18)系统监控 (4)流量监控 (7)虚拟化 (28)伪静态 (2)LVM (3)Shell (18)高可用 (2)数据库 (16)FreeBSD (3)网络安全 (25)Windows (35)网络工具 (22)控制面板 (3)系统调优 (10)Cisco (3)VPN (5)ROS (20)Vim (14)KMS (4)PXE (2)Mac (1)Git (1)PE (1)LNS (2)Xshell (7)Firefox (13)Cygwin (4)OpenSSL (9)Sandboxie (3)StrokesPlus (1)AutoHotKey (4)Total Commander (2)WordPress (3)iMacros (6)Typecho (2)Ollydbg (1)Photoshop (1)正则 (3)Debian (3)Python (8)NoSQL (6)消息队列 (4)JS (7)Tmux (3)GO (7)HHVM (2)算法 (1)Docker (2) 最新文章 centos repo管理使用centos/debian自动通过网络远程安装系统配置脚本使用kickstart安装ubuntuCentos/linux ipv4优先BT/utorrent连接加密及标志IPXE网络引导通过kickstart和preseed自动安装centos/ubuntu/debian系统ubuntu 通过ppa源安装最新版qbittorrentinitrd.img解压与打包libtorrent提高上传速度qq smtp 465/587端口区别 最近回复 404NTF: 交叉编译的作用是? 404NTF: 请教一下 CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go ... 小智: 安利个PHP开发以太坊区块链的教程: http://xc.hubwiz.com/course/... 陈浩南: 您好,您教程中的 dev.openwrt.org.cn 现在似乎不可用了。请问现在应该在哪里下... 斑马斑马: 怎么查看虚拟机CPU 内存使用情况 zzg: http://downloads.openwrt.org.cn/PandoraBox/rali... xiongrui: 看图 傻狍子: filebrowser好像和这功能一样? https://github.com/filebro... 陶国文: 想看看能不能安装 傻狍子: 服务端设置了用户名密码认证的话,在openwrt的openvpn客户端的配置文件当中该如何更改... Copyright © 2011 海运的博客 / 文章归档 / Archives Rss / Comments Rss / Powered By Typecho 页面执行耗时:0.0386秒。-->