3、部署xinetd服务
3.1 控制节点安装xinetd服务,用于监控Galera服务(controller1、controller2、controller3)
yum install xinetd -y
3.2 控制节点创建xinetd配置文件
[root@controller1:/root]# cat <<END>/etc/xinetd.d/mysqlchk #default:on ##description:mysqlchk service mysqlchk { disable = no flags = REUSE socket_type = stream port = 9200 wait = no user = nobody server = /usr/bin/clustercheck log_on_failure += USERID only_from = 0.0.0.0/0 per_source = UNLIMITED } END [root@controller1:/root]# scp /etc/xinetd.d/mysqlchk controller2:/etc/xinetd.d/ [root@controller1:/root]# scp /etc/xinetd.d/mysqlchk controller3:/etc/xinetd.d/
3.3 控制节点修改/etc/services
echo ‘mysqlchk 9200/tcp #mysqlchk’>>/etc/services [root@controller2:/root]# vim /etc/services 转到第10101行,注释使用端口9200的服务,并为mysqlchk / clustercheck添加一行。 mysqlchk 9200/tcp # mysqlchk #wap-wsp 9200/tcp # WAP connectionless session service #wap-wsp 9200/udp # WAP connectionless session service [root@controller1:/root]# vim /etc/services 转到第10101行,注释使用端口9200的服务,并为mysqlchk / clustercheck添加一行。 mysqlchk 9200/tcp # mysqlchk #wap-wsp 9200/tcp # WAP connectionless session service #wap-wsp 9200/udp # WAP connectionless session service [root@controller3:/root]# vim /etc/services 转到第10101行,注释使用端口9200的服务,并为mysqlchk / clustercheck添加一行。 mysqlchk 9200/tcp # mysqlchk #wap-wsp 9200/tcp # WAP connectionless session service #wap-wsp 9200/udp # WAP connectionless session service
3.4 控制节点启动xinetd服务(controller1、controller2、controller3)
systemctl enable xinetd && systemctl start xinetd
systemctl status xinetd