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

教育局网站建设动漫制作专业报告

教育局网站建设,动漫制作专业报告,西宁城东区建设局公租房网站,邮箱企业邮箱登录入口目录 一、playbook 剧本介绍二、示例1、运行playbook2、定义、引用变量 三、使用playbook部署lnmp集群 一、playbook 剧本介绍 playbooks 本身由以下各部分组成 #xff08;1#xff09;Tasks#xff1a;任务#xff0c;即通过 task 调用 ansible 的模板将多个操作组织在… 目录 一、playbook 剧本介绍二、示例1、运行playbook2、定义、引用变量 三、使用playbook部署lnmp集群 一、playbook 剧本介绍 playbooks 本身由以下各部分组成 1Tasks任务即通过 task 调用 ansible 的模板将多个操作组织在一个 playbook 中运行 2Variables变量 3Templates模板 4Handlers处理器当changed状态条件满足时notify触发执行的操作 5Roles角色二、示例 vim /etc/ansible/playbook/deamo1.yml--- - name: the first play for install apache#gather_facts: falsehosts: dbserversremote_user: roottasks:- name: disable firewwalldservice: namefirewalld statestopped enabledno- name: disable selinuxcommand: /usr/sbin/setenforce 0ignore_errors: True- name: disable selinux foreverreplace: path/etc/selinux/config regexpenforcing replacedisabled- name: mount cdrommount: src/dev/sr0 path/mnt fstypeiso9660 statemounted- name: copy local yum configuration filecopy: src/etc/yum.repos.d/repo.bak/local.repo dest/etc/yum.repos.d/local.repo- name: install apacheyum: namehttpd statelatest- name: prepare httpd configuration filecopy: src/etc/ansible/playbook/httpd.conf dest/etc/httpd/conf/httpd.confnotify: reload httpd- name: start apacheservice: namehttpd statestarted enabledyeshandlers:- name: reload httpdservice: namehttpd statereloaded1、运行playbook ansible-playbook deamo1.yml //补充参数 -k–ask-pass用来交互输入ssh密码 -K-ask-become-pass用来交互输入sudo密码 -u指定用户2、定义、引用变量 三、使用playbook部署lnmp集群 - name: the first play for install nginxhosts: dbserversremote_user: roottasks:- name: disable firewwalldservice: namefirewalld statestopped enabledno- name: disable selinuxcommand: /usr/sbin/setenforce 0ignore_errors: True- name: disable selinux foreverreplace: path/etc/selinux/config regexpenforcing replacedisabled- name: mount cdrommount: src/dev/sr0 path/mnt fstypeiso9660 statemounted- name: copy local yum configuration filecopy: src/etc/yum.repos.d/nginx.repo dest/etc/yum.repos.d/nginx.repo- name: install nginxyum: namenginx- name: prepare nginx configuration filecopy: src/etc/ansible/playbook/default.conf dest/etc/nginx/conf.d/default.conf- name: start nginxservice: namenginx statestarted enabledyes- name: wordpresscopy: src/usr/share/nginx/html/wordpress dest/usr/share/nginx/html/- name: mysqlhosts: dbserversremote_user: roottasks:- name: remove mariadbshell: yum remove mariadb* -yignore_errors: True- name: yumcommand: wget https://repo.mysql.com/mysql57-community-release-el7-11.noarch.rpm- name: install mysql57command: rpm -ivh mysql57-community-release-el7-11.noarch.rpm- name: change mysql-community-servershell: sed -i s/gpgcheck1/gpgcheck0/ /etc/yum.repos.d/mysql-community.repo- name: install mysql-serveryum: namemysql-server- name: start mysqlservice: namemysqld.service statestarted enabledyes- name: mysql congruation filecopy: src/etc/ansible/playbook/mysql.sh dest/var/lib/mysql- name: echo passwordshell: grep password /var/log/mysqld.log | awk NR1{print $NF} #在日志文件中找出root用户的初始密码register: mysql_password #将初始密码导入到mysql_password的变量中- name: echodebug:msg: {{ mysql_password }} #输出变量mysql_password的值- name: grant locationshell: mysql --connect-expired-password -uroot -p{{ mysql_password[stdout] }} -e ALTER USER rootlocalhost IDENTIFIED BY Admin123;- name: grantshell: mysql --connect-expired-password -uroot -pAdmin123 -e grant all privileges on *.* to root% identified by Admin123456 with grant option;- name: create databaseshell: mysql --connect-expired-password -uroot -pAdmin123 -e create database wordpress;- name: grantshell: mysql --connect-expired-password -uroot -pAdmin123 -e grant all on wordpress.* to admin% identified by Admin123456;- name: grantshell: mysql --connect-expired-password -uroot -pAdmin123 -e grant all on wordpress.* to adminlocalhost identified by Admin123456;- name: flushshell: mysql --connect-expired-password -uroot -pAdmin123 -e flush privileges;- name: yum removecommand: yum -y remove mysql57-community-release-el7-10.noarch- name: phphosts: dbserversremote_user: roottasks:- name: yum rpmcommand: yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpmignore_errors: true- name: yum-utilsyum: nameyum-utils- name: yum-configcommand: yum-config-manager --enable remi-php74- name: list phpcommand: yum list php- name: yilaibaocommand: yum -y install php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json php-redis- name: start phpservice: namephp-fpm statestarted enabledyes将yum安装的nginx里面的配置文件进行修改后传输到对应的远程主机 解压wordpress压缩文件放入到对应的html网页目录底下 进行传输到远程主机里的网页页面目录上 使用浏览器进行访问测试
http://www.pierceye.com/news/492144/

相关文章:

  • wordpress 当前文章id益阳网站seo
  • 湖南对外建设集团网站成都著名网站
  • 手机网站制作的公司wordpress分类目录添加图片
  • 做彩票网站需要多少钱网络营销和传统营销的关系
  • 教育咨询网站模板谷歌外贸网站seo怎么做
  • 怎么制作网站主题郑州推出vip服务
  • 在国外做盗版电影网站吗安卓网站建站系统
  • 网站备案是在哪个部门织梦cms 获得网站流量次数
  • 公司网站放哪些内容ui培训班教程
  • 电子商务网站设计目的及要求百通互联网站建设
  • 网站做端口是什么问题微信最新版本官方版下载安装
  • 活字格能开发企业网站吗本地做网站
  • 建立一个小型网站多少钱微信公众号移动网站开发
  • 网站建设设计师招募建设方案模板范文
  • 做网站需要多少钱一年wordpress网站语言
  • 专门做家具的网站做网站建设的怎么赢利
  • 网站建设教程皆赞湖南岚鸿完成站长网站大全
  • 广州市网站建设 合优系统学做网站
  • 网站建设客户相关问题wordpress主题怎么选
  • 网站数据迁移教程网络营销项目策划书范文
  • 网站 只收录首页网站建设手机端页面模板
  • 光明区建设局网站云南省工程建设造价协会网站
  • 网站建设视频教程 百度云网站制作背景图片
  • 网站域名起名网站建设企业排行榜
  • 高端品牌网站定制设计wordpress多张页面左右滑动
  • git网站开发网名logo设计制作
  • seo在线网站诊断推推蛙seo兼职怎么收费
  • 网站数据分析视频深圳市昊客网络科技有限公司
  • 外贸网站做开关行业的哪个好网站互动优化
  • 西班牙语网站设计哪家好开发一个跑腿app需要多少钱