中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

網(wǎng)站建設(shè)屬于什么行業(yè)分類山東公司網(wǎng)站推廣優(yōu)化

網(wǎng)站建設(shè)屬于什么行業(yè)分類,山東公司網(wǎng)站推廣優(yōu)化,網(wǎng)站建設(shè)應(yīng)該考慮哪些問題,臨沂網(wǎng)站制作頁面目錄 一、playbook 劇本介紹二、示例1、運(yùn)行playbook2、定義、引用變量 三、使用playbook部署lnmp集群 一、playbook 劇本介紹 playbooks 本身由以下各部分組成 (1)Tasks:任務(wù),即通過 task 調(diào)用 ansible 的模板將多個(gè)操作組織在…

目錄

  • 一、playbook 劇本介紹
  • 二、示例
    • 1、運(yùn)行playbook
    • 2、定義、引用變量
  • 三、使用playbook部署lnmp集群


一、playbook 劇本介紹

playbooks 本身由以下各部分組成

(1)Tasks:任務(wù),即通過 task 調(diào)用 ansible 的模板將多個(gè)操作組織在一個(gè) playbook 中運(yùn)行
(2)Variables:變量
(3)Templates:模板
(4)Handlers:處理器,當(dāng)changed狀態(tài)條件滿足時(shí),(notify)觸發(fā)執(zhí)行的操作
(5)Roles:角色

二、示例

vim  /etc/ansible/playbook/deamo1.yml
---
- name: the first play for install apache#gather_facts: falsehosts: dbserversremote_user: roottasks:- name: disable firewwalldservice: name=firewalld state=stopped enabled=no- name: disable selinuxcommand: '/usr/sbin/setenforce 0'ignore_errors: True- name: disable selinux foreverreplace: path=/etc/selinux/config regexp="enforcing" replace="disabled"- name: mount cdrommount: src=/dev/sr0 path=/mnt fstype=iso9660 state=mounted- 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: name=httpd state=latest- name: prepare httpd configuration filecopy: src=/etc/ansible/playbook/httpd.conf dest=/etc/httpd/conf/httpd.confnotify: "reload httpd"- name: start apacheservice: name=httpd state=started enabled=yeshandlers:- name: reload httpdservice: name=httpd state=reloaded

在這里插入圖片描述

1、運(yùn)行playbook

ansible-playbook deamo1.yml
//補(bǔ)充參數(shù):
-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: name=firewalld state=stopped enabled=no- name: disable selinuxcommand: '/usr/sbin/setenforce 0'ignore_errors: True- name: disable selinux foreverreplace: path=/etc/selinux/config regexp="enforcing" replace="disabled"- name: mount cdrommount: src=/dev/sr0 path=/mnt fstype=iso9660 state=mounted- name: copy local yum configuration filecopy: src=/etc/yum.repos.d/nginx.repo  dest=/etc/yum.repos.d/nginx.repo- name: install nginxyum: name=nginx- name: prepare nginx configuration filecopy: src=/etc/ansible/playbook/default.conf dest=/etc/nginx/conf.d/default.conf- name: start nginxservice: name=nginx state=started enabled=yes- 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/gpgcheck=1/gpgcheck=0/' /etc/yum.repos.d/mysql-community.repo- name: install mysql-serveryum: name=mysql-server- name: start mysqlservice: name=mysqld.service state=started enabled=yes- name: mysql congruation filecopy: src=/etc/ansible/playbook/mysql.sh dest=/var/lib/mysql- name: echo passwordshell: grep "password" /var/log/mysqld.log | awk 'NR==1{print $NF}'  #在日志文件中找出root用戶的初始密碼register: mysql_password   #將初始密碼導(dǎo)入到mysql_password的變量中- name: echodebug:msg: "{{ mysql_password }}"  #輸出變量mysql_password的值- name: grant locationshell:  mysql --connect-expired-password -uroot -p"{{ mysql_password['stdout'] }}" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Admin@123';"- name: grantshell: mysql --connect-expired-password -uroot -pAdmin@123 -e "grant all privileges on *.* to 'root'@'%' identified by 'Admin@123456' with grant option;"- name: create databaseshell: mysql --connect-expired-password -uroot -pAdmin@123 -e "create database wordpress;"- name: grantshell: mysql --connect-expired-password -uroot -pAdmin@123 -e "grant all on wordpress.* to 'admin'@'%' identified by 'Admin@123456';"- name: grantshell: mysql --connect-expired-password -uroot -pAdmin@123 -e "grant all on wordpress.* to 'admin'@'localhost' identified by 'Admin@123456';"- name: flushshell: mysql --connect-expired-password -uroot -pAdmin@123 -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: name=yum-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: name=php-fpm state=started enabled=yes

將yum安裝的nginx里面的配置文件進(jìn)行修改,后傳輸?shù)綄?duì)應(yīng)的遠(yuǎn)程主機(jī)

在這里插入圖片描述

在這里插入圖片描述

解壓wordpress壓縮文件,放入到對(duì)應(yīng)的html網(wǎng)頁目錄底下
在這里插入圖片描述

進(jìn)行傳輸?shù)竭h(yuǎn)程主機(jī)里的網(wǎng)頁頁面目錄上
在這里插入圖片描述

在這里插入圖片描述

使用瀏覽器進(jìn)行訪問測(cè)試
在這里插入圖片描述

在這里插入圖片描述

http://m.risenshineclean.com/news/63630.html

相關(guān)文章:

  • 免費(fèi)建企業(yè)網(wǎng)站哪個(gè)好seo網(wǎng)站優(yōu)化培訓(xùn)公司
  • 叫別人做網(wǎng)站權(quán)重被轉(zhuǎn)移了seo優(yōu)化軟件
  • 專業(yè)建站公司提供詳細(xì)的功能描述及報(bào)價(jià)如何在百度做推廣
  • 乳山網(wǎng)站定制北京seo排名廠家
  • 百度新網(wǎng)站收錄百度推廣網(wǎng)址是多少
  • 網(wǎng)站開發(fā)工程師應(yīng)聘書范文1000廣州seo技術(shù)外包公司
  • 長(zhǎng)春是幾線城市2020排名東莞優(yōu)化網(wǎng)站關(guān)鍵詞優(yōu)化
  • 圖片無法顯示wordpress網(wǎng)站seo優(yōu)化8888
  • 重慶市建設(shè)醫(yī)院網(wǎng)站首頁西點(diǎn)培訓(xùn)前十名學(xué)校
  • 深圳網(wǎng)站開發(fā)公司 有哪些seo入門培訓(xùn)課程
  • 做汽車網(wǎng)站開題報(bào)告的意義微信crm系統(tǒng)
  • wordpress tab切換怎么做好seo推廣
  • 宜春網(wǎng)站建設(shè)公司哪家好公司網(wǎng)站建設(shè)服務(wù)機(jī)構(gòu)
  • 做網(wǎng)站還 淘寶百度引擎的搜索方式是什么
  • 瀏陽做網(wǎng)站的公司價(jià)格我贏seo
  • 做自媒體有哪些素材網(wǎng)站廣州品牌營(yíng)銷服務(wù)
  • 怎樣在網(wǎng)站上做營(yíng)業(yè)執(zhí)照公示滕州今日頭條新聞
  • 網(wǎng)站設(shè)計(jì)標(biāo)準(zhǔn)尺寸電商平臺(tái)開發(fā)需要多少錢
  • 濰坊網(wǎng)站建設(shè)價(jià)格深圳百度推廣客服
  • wordpress后臺(tái)管理面板的主題搜索引擎優(yōu)化論文
  • java 做直播網(wǎng)站有哪些軟件有哪些最新app推廣項(xiàng)目平臺(tái)
  • 廈門市網(wǎng)站建設(shè)寧波專業(yè)seo服務(wù)
  • wordpress頁面添加圖片優(yōu)化排名案例
  • 石家莊做網(wǎng)站多少錢百度注冊(cè)頁面
  • 深圳做棋牌網(wǎng)站建設(shè)哪家公司收費(fèi)合理網(wǎng)絡(luò)營(yíng)銷外包
  • 廣州網(wǎng)絡(luò)推廣有限公司滎陽seo推廣
  • 自己怎么做網(wǎng)站賣車bt種子bt天堂
  • 電子政務(wù)網(wǎng)站建設(shè)公司排行榜引擎搜索網(wǎng)站
  • 物理結(jié)構(gòu)網(wǎng)站怎么看app的下載網(wǎng)址
  • 網(wǎng)站建設(shè)新聞資訊無錫seo網(wǎng)站排名