当前位置: 首页 > news >正文

使用ansible playbook编写lnmp架构

使用ansible playbook编写lnmp架构

- name: nginx playgather_facts: falsehosts: lnmpremote_user: roottasks: - name: stop firewalldservice: name=firewalld state=stopped- name: syslinuxcommand: '/usr/sbin/setenforce 0'ignore_errors: true- name: nginx.repocopy: src=/etc/yum.repos.d/nginx.repo dest=/etc/yum.repos.d/- name: haha nginxyum: name=nginx state=latest- name: start nginxcommand: systemctl start nginxtags:- nginx- name: mysql playgather_facts: falsehosts: lnmpremote_user: roottasks: - name: copy install mysql copy: src=/opt/mysql-community.repo dest=/etc/yum.repos.d/- name: copycopy: src=/opt/mysql-community-source.repo dest=/etc/yum.repos.d/- name: install mysqlyum: name=mysql-server- name: start mysqld.serviceservice: name=mysqld.service state=started - name: chushihua script: /etc/ansible/playbook/mysql.sh- name: php playgather_facts: falsehosts: lnmpremote_user: roottasks:- name: install phpshell: rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpmignore_errors: True- name: yumwith_items: - php72w- php72w-cli- php72w-common- php72w-devel- php72w-embedded- php72w-gd- php72w-mbstring- php72w-pdo- php72w-xml- php72w-fpm- php72w-mysqlnd- php72w-opcacheyum: name={{item}}- name: start phpservice: name=php-fpm state=started- name: scp nginxcopy: src=/etc/nginx/conf.d/default.conf dest=/etc/nginx/conf.d/default.conf- name: restart nginxservice: name=nginx state=restarted - name: index.phpcopy: src=/usr/share/nginx/html/index.php dest=/usr/share/nginx/html/

在这里插入图片描述

在这里插入图片描述

http://www.lryc.cn/news/104758.html

相关文章:

  • 使用 TorchText 进行语言翻译
  • SpringBoot整合SSMP小demo
  • 51单片机--红外遥控
  • 【图像分类】CNN+Transformer结合系列.2
  • 用于毫米波天线的新型无卤素超低传输损耗多层电路板R-5410
  • java数据算法-汉诺塔
  • [QT编程系列-35]:数据存储 - JSON格式配置数据的存储与通知
  • 【Spring】Spring 中事务的实现
  • Linux 学习记录60(ARM篇)
  • 尚硅谷大数据项目《在线教育之采集系统》笔记002
  • 校园跑腿小程序功能分享
  • PHP8的变量-PHP8知识详解
  • 图解TCP 三次握手和四次挥手的高频面试题(2023最新版)
  • 【mysql】Win10安装配置MySQL8.0简要
  • SQL SERVER使用发布订阅同步数据库遇到的坑
  • 3个命令定位CPU飙高
  • Java版知识付费 Spring Cloud+Spring Boot+Mybatis+uniapp+前后端分离实现知识付费平台免费搭建
  • 使用多数据源dynamic-datasource-spring-boot-starter遇到的问题记录
  • 构建语言模型:BERT 分步实施指南
  • ⛳ Java多线程 一,线程基础
  • 【iOS】多线程 锁问题总结
  • Pytorch深度学习-----神经网络之池化层用法详解及其最大池化的使用
  • Docker啥是数据持久化?
  • CGAL 线段简化算法(2D)
  • 在CentOS 7上挂载硬盘到系统的步骤及操作
  • 螺旋矩阵(JS)
  • C#常用数学插值法
  • ELK日志管理平台架构和使用说明
  • 抖音短视频seo矩阵系统源码开发部署技术分享
  • docker 部署一个单节点的rocketmq