使用Easypack中提供的Ansible脚本,可以快速构建集群,这篇文章介绍一下构建单机版本集群和一主多从的集群的方法。
事前准备
- 操作系统准备
[root@host131 ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@host131 ~]# uname -a
Linux host131 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@host131 ~]#
最小化安装即可,无需特定设定。
- Ansible安装准备
安装命令:yum install ansible
[root@host131 ~]# ansible --version
ansible 2.4.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /