In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This lab implements a memcached+magent+keepalived high availability cluster:
Magent: proxy memcached to achieve load balancing keepalived:magent Master / Slave HA High availability memcached: cache object
Experimental requirements:
Master Server: 192.168.177.140 (magent+memcached+libevent+keepalived) Slave Server: 192.168.177.135 (memcached+libevent+keepalived) client: 192.168.177.132 (telnet package) Mount (Master Slave) # tar zxvf libevent-2.1.8-stable.tar.gz-C / opt# tar zxvf memcached-1.5.6.tar.gz-C / opt# mkdir / opt/magent = = Note = Slave Server do not do # tar zxvf magent-0.5.tar.gz-C / opt/magent/# yum install gcc gcc-c++ make-Ymurmuri # cd / opt/libevent-2.1.8-stable/. / configure-- prefix=/usr # make & & make install# cd memcached-1.5.6/. / configure-- with-libevent=/usr # make & & make instal--- only main: # cd / opt/magent/# vim ketama.h ifndef SSIZE_MAX define SSIZE_MAX 3276 copyright vim Makefile LIBS =-levent-lm make install openssh-clients master server: # yum install openssh-clients-y # cp magent / usr/bin/ / easy to use # scp magent root@192.168.177.135:/usr/bin / / copy magent to slave server # systemctl stop firewalld.service / / turn off firewall # setenforce 0 / / enhanced security features from server: # yum install openssh-clients# systemctl stop firewalld.service# setenforce slave Cd / usr/bin# ls will find that magent becomes an executable file installation keepalive master server: # yum install keepalived-y # vi / etc/keepalived/keepalived.conf router_id MAGENT_HA interface ens33 virtual_router_id 51 priority 100 virtual_ipaddress {192.168.177.188 / set virtual IP} vrrp_script magent {script "/ opt/shell/magent.sh" interval 2} track_script {magent} # scp / etc/keepalived/keepalived.conf root@192.168.177.135:/etc/keepalived/keepalived.conf / / copy keepalived.conf to slave server: # vim / etc/keepalived/keepalived.conf modify: state: BACKUP interface ens33 virtual_router_id 52 priority 90 edit script file master / slave: # mkdir / opt/shell# cd / opt/shell# vi magent.sh# ! / bin/bashK= `ps-ef | grep keepalived | grep-v grep | wc-l`if [$K-gt 0] Then magent-u root-n 51200-l 192.168.177.188-p 12000-s 192.168.177.140Viso 11211-b 192.168.177.135:11211elsepkill-9 magentfi# chmod + x magent.sh / / add execution permissions for the script # systemctl start keepalived.service / / enable service startup memcached service # memcached-m 512k-u root-d-l 192.168.177.140-p 11211 / / # memcached-m 512k-u root on the main server -d-l 192.168.177.135-p 11211 / / ip addr / / View the virtual address from the server
Install telnet# yum install telnet-y on the client
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.