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

相关文章:

  • 2022-12-23
  • 2021-06-20
  • 2022-02-18
  • 2022-12-23
  • 2021-09-07
  • 2021-06-15
  • 2022-01-19
  • 2021-08-10
猜你喜欢
  • 2021-06-22
  • 2021-09-17
  • 2022-12-23
  • 2022-12-23
  • 2021-04-28
  • 2021-08-25
  • 2022-12-23
相关资源
相似解决方案