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

网站代理制作最省钱的购物软件

网站代理制作,最省钱的购物软件,江苏住建厅特种作业证,中信建设有限责任公司工会Ansible-roles 一、roles作用 把playbook剧本里的各个play看作为角色#xff0c;将各个角色的tasks任务、vars变量、templates模板、files文件等内容放置到角色的目录中统一管理#xff0c;需要的时候可在playbook中直接使用roles调用#xff0c;所以roles可以实现playboo…Ansible-roles 一、roles作用 把playbook剧本里的各个play看作为角色将各个角色的tasks任务、vars变量、templates模板、files文件等内容放置到角色的目录中统一管理需要的时候可在playbook中直接使用roles调用所以roles可以实现playbook代码的复用。二、利用roles安装lnmp ansible主机地址192.168.111.10vim /etc/ansible/hosts [nginx] 192.168.111.20 [mysql] 192.168.111.30 [php] 192.168.111.401.在roles创建角色目录 mkdir /etc/ansible/roles/nginx/{files,templates,tasks,handlers,vars,defaults,meta} -pmkdir /etc/ansible/roles/mysql/{files,templates,tasks,handlers,vars,defaults,meta} -pmkdir /etc/ansible/roles/php/{files,templates,tasks,handlers,vars,defaults,meta} -p2.创建角色的的配置文件 touch /etc/ansible/roles/nginx/{defaults,vars,tasks,meta,handlers}/main.ymltouch /etc/ansible/roles/mysql/{defaults,vars,tasks,meta,handlers}/main.ymltouch /etc/ansible/roles/php/{defaults,vars,tasks,meta,handlers}/main.yml 3.配置nginx角色 在file目录中添加配置文件 default.conf nginx.repo index.php在tasks目录中创建main.yamlini.yaml文件 vim main.yaml - include: init.yml- name: copy nginx.repocopy: srcnginx.repo dest/etc/yum.repos.d/- name: install nginxyum: namenginx - name: copycopy: srcdefault.conf dest/etc/nginx/conf.d/default.conf - name: index.phpcopy: srcindex.php dest/usr/share/nginx/html - name: start nginxservice: namenginx statestartedvim init.yaml - name: stop firewalldservice: namefirewalld statestopped - name: stop setenforcecommand: /usr/sbin/setenforce 0ignore_errors: True4.配置mysql角色 在file目录中添加配置文件 vim mysql.sh passd$(grep password /var/log/mysqld.log | awk {print $NF}| head -1) mysql -uroot -p$passd --connect-expired-password -e ALTER USER rootlocalhost IDENTIFIED BY Admin123; mysql -uroot -pAdmin123 -e grant all privileges on *.* to root% identified by Admin123 with grant option;mysql-community.repo mysql-community-source.repo在tasks目录中配置main.yaml文件 vim main.yaml- include: init.yml- name: copy mysql.repocopy: srcmysql-community.repo dest/etc/yum.repos.d/ - name: copycopy: srcmysql-community-source.repo dest/etc/yum.repos.d/ - name: install mysql-serveryum: namemysql-server - name: start mysqlservice: namemysqld.service statestarted - name: chushihua script: mysql.shignore_errors: True5.配置php角色 在file目录中添加配置文件 vim index.php ?php phpinfo(); ?在tasks目录中配置main.yaml文件 vim init.yaml- name: stop firewalldservice: namefirewalld statestopped - name: stop setenforcecommand: /usr/sbin/setenforce 0ignore_errors: True- include: init.yml- name: install php.reposhell: 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: install phpshell: yum -y install php72w php72w-cli php72w-common php72w-devel php72w-embedded php72w-gd php72w-mbstring php72w-pdo php72w-xml php72w-fpm php72w-mysqlnd php72w-opcacheignore_errors: True- name: useruser: namephp - name: web file: name/usr/share/nginx/html statedirectory#- name: index.php# copy: srcindex.php dest/usr/share/nginx/html/- name: modify php configuration filereplace: path/etc/php.ini regexp;date.timezone replacedate.timezone Asia/Shanghai - name: modify username and groupname in www.confreplace: path/etc/php-fpm.d/www.conf regexpapache replacephp - name: modify listen addr in www.confreplace: path/etc/php-fpm.d/www.conf regexp127.0.0.1:9000 replace192.168.111.40:9000 - name: modify allowed client in www.confreplace: path/etc/php-fpm.d/www.conf regexp127.0.0.1 replace192.168.111.20- name: start php-fpm service: namephp-fpm statestarted6.配置主文件lnmp.yaml vim lnmp.yaml - name: nginx playhosts: nginxremote_user: rootroles:- nginx- name: mysql playhosts: mysqlremote_user: rootroles:- mysql- name: php playhosts: phpremote_user: rootroles:- php
http://www.dnsts.com.cn/news/219937.html

相关文章:

  • 学院网站的系统建设方式山东工艺美术学院网站建设公司
  • 郑州高新区做网站开发的公司wordpress菜单加图标
  • 微信网站流程酒店网站建设设计
  • 网站建设运营公司大全wordpress怎么编写用户中心
  • 南宁做网站建设注册网站免费注册ins
  • 哈尔滨优化建站哪家专业wordpress建设网站
  • 网络建站网网络推广可信网站的作用
  • 做网站怎么去工信部缴费中学网站管理系统下载
  • 南京医院网站建设方案电子商务网站建设实训感想
  • 企业网站怎么制作猪八戒网仿照哪个网站做的
  • 网站备案的规划方案已经有域名 如何建设网站
  • 潍坊 区网站建设泉州市网站建设
  • 网站建设报告北京网站建设公司哪家实惠
  • 西安网站建设的费用深圳网页设计公司有哪些
  • 一家做公司评估的网站旅行做攻略的网站
  • 网站建设与文字的工作动漫设计师资格证
  • 哈尔滨网站优化流程做任务的阅币漫画网站
  • 怎么样从头开始做网站asp.net网站思路
  • 高密建设局网站推荐晚上用的网站
  • 亚星网站代理找外包开发一个小程序需要多少钱
  • 网站备案系统源码金环建设集团有限公司官方网站
  • 织梦网站模板后台密码找回win7下asp网站搭建
  • 买空间去哪个网站wordpress标题高亮插件
  • 企业网站搭建的优点石家庄网站seo顾问
  • 滕州网站建设招聘网站制作工作室专业公司
  • 在那个网站做付汇的延期说明设计培训学校
  • 网站建设的费用计什么科目衣服定制
  • 网站截流做cpa怎么样评价网站做的好坏
  • 网站建设中图标手机网站头部代码
  • 阿里巴巴国际站怎么做网站模版wordpress 后台添加文章 没编辑功能