In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Global_defs {notification_email {acassen@firewall.loc failover@firewall.loc sysadmin@firewall.loc} notification_email_from Alexandre.Cassen@firewall.loc smtp_server 192.168.200.1 smtp_connect_timeout 30 router_id f6 vrrp_mcast_group4 224.0.0.20 nopreempt} vrrp_script chk_nginx {# script "killall-0 nginx" script "/ etc/keepalived/check_nginx.sh" interval 2 Weight-5 fall 3 rise 2} vrrp_instance VI_1 {state BACKUP interface eth0 virtual_router_id 58 priority 150 advert_int 1 nopreempt authentication {auth_type PASS auth_pass 1111} virtual_ipaddress {172.21.10.199 Action24 dev eth0 label eth0:1} track_script {chk_nginx}}
[root@e7 ~] # cat / etc/keepalived/keepalived.conf! Configuration File for keepalivedglobal_defs {notification_email {acassen@firewall.loc failover@firewall.loc sysadmin@firewall.loc} notification_email_from Alexandre.Cassen@firewall.loc smtp_server 192.168.200.1 smtp_connect_timeout 30 router_id e7 vrrp_mcast_group4 224.0.0.20} vrrp_script chk_nginx {# script "killall-0 nginx" script "/ etc/keepalived/check_nginx.sh" interval 2 weight-5 fall 3 rise 2} vrrp_instance VI_1 {state BACKUP interface eth0 virtual_router_id 58 priority 100 advert_int 1 authentication {auth_type PASS auth_pass 1111} virtual_ipaddress {172.21.10.199 and 24 dev eth0 label eth0:1} track_script {chk_nginx}} [root@e7 ~] # [root@e7 ~] # cat / etc/keepalived/check_nginx.sh #! / bin/bashcounter=$ (ps-C nginx-- no-heading | wc-l) if ["${counter}" = "0"] Then / usr/sbin/nginx echo "nginx 1 start" sleep 2 counter=$ (ps-C nginx-- no-heading | wc-l) if ["${counter}" = "0"]; then echo "keepalived stop" # / etc/init.d/keepalived stopsystemctl stop keepalived fifi [root@e7 ~] #
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.