ansible+lnmp+WeCenter

1、安装ansible配置2台远程主机
ansible+lnmp+WeCenter
2、设置ssh加速
ansible+lnmp+WeCenter
ansible+lnmp+WeCenter
ansible+lnmp+WeCenter
3、修改ssh端口号为222并连接验证
先关闭所有防火墙
ansible+lnmp+WeCenter
ansible+lnmp+WeCenter
修改ssh的配置文件,端口改为222
ansible+lnmp+WeCenter
改完后重启sshd
ansible+lnmp+WeCenter
另外一个机器做相同操作
ansible+lnmp+WeCenter
ansible+lnmp+WeCenter
4、设置免密登录并验证
ansible+lnmp+WeCenter
拷贝公钥时需要加上端口
ansible+lnmp+WeCenter
ansible+lnmp+WeCenter
ansible添加主机组并测试
更改ssh默认连接端口为222
ansible+lnmp+WeCenter
ansible+lnmp+WeCenter
定义主机组
ansible+lnmp+WeCenter
ansible+lnmp+WeCenter
ansible+lnmp+WeCenter
5、编写playbook在两台远程主机上源码安装lnmp+Wecenter
题目要求:
ansible+lnmp+WeCenter
ansible+lnmp+WeCenter
获取配置文件模板
ansible+lnmp+WeCenter
修改配置文件模板
vim nginx.conf
ansible+lnmp+WeCenter
ansible+lnmp+WeCenter
上传wecenter安装包
ansible+lnmp+WeCenter
编写playbook
ansible+lnmp+WeCenter
ansible+lnmp+WeCenter
ansible+lnmp+WeCenter
ansible+lnmp+WeCenter
ansible+lnmp+WeCenter
执行
ansible+lnmp+WeCenter
ansible+lnmp+WeCenter
7、成功通过浏览器访Wecenter创建账号
浏览器访问nginx: 192.168.189.162/UPLOAD
ansible+lnmp+WeCenter
ansible+lnmp+WeCenter
ansible+lnmp+WeCenter