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

河北企业自助建站目前安卓手机哪个最好用

河北企业自助建站,目前安卓手机哪个最好用,集团公司网页设计案例,创建一个自己的公司的英文Ansible是Python开发的自动化运维工具#xff0c;集合了众多运维工具#xff08;Puppet、cfengine、chef、func、fabric#xff09;的优点#xff0c;实现了批量系统配置#xff0c;批量程序部署、批量运行命令等功能。 特点#xff1a; 1#xff09;部署简单#xff… Ansible是Python开发的自动化运维工具集合了众多运维工具Puppet、cfengine、chef、func、fabric的优点实现了批量系统配置批量程序部署、批量运行命令等功能。 特点 1部署简单 2默认使用ssh进行管理基于Python里的paramiko模块开发 3管理端和被管理端不需要启动服务 4配置简单、功能强大、拓展性强 5能playbook剧本进行多任务的编排 实验准备 三台机器一台管理、两台被管理。 主机IP地址备注信息管理机Master192.168.17.104被管理机1192.168.17.105被管理机2192.168.17.106 实验过程 1在管理机上安装ansible被管理机上必须打开ssh服务。 yum install -y epel-release yum install ansible[rootlocalhost ~]# ansible --version ansible 2.9.27config file /etc/ansible/ansible.cfgconfigured module search path [u/root/.ansible/plugins/modules, u/usr/share/ansible/plugins/modules]ansible python module location /usr/lib/python2.7/site-packages/ansibleexecutable location /usr/bin/ansiblepython version 2.7.5 (default, Jun 20 2023, 11:36:40) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]2实现master对agent的免密登录只有master上做。如果这步不做的话则在后面操作agent时候要加上-k参数传密码或者在主机清单里传密码。 ssh-keygenssh-copy-id -i 192.168.17.105 ssh-copy-id -i 192.168.17.106 3在master上定义主机组并测试连接性。 说明inventory财产清单库存等。 在hosts清单中添加两个机器IP地址。 [rootlocalhost ansible]# tail -3 hosts [group1] 192.168.17.105 192.168.17.106[rootlocalhost ansible]# ansible all -m ping 192.168.17.105 | SUCCESS {ansible_facts: {discovered_interpreter_python: /usr/bin/python},changed: false,ping: pong } 192.168.17.106 | SUCCESS {ansible_facts: {discovered_interpreter_python: /usr/bin/python},changed: false,ping: pong }说明all是所有机器。-m是module的意思ping是模块。 [rootlocalhost ansible]# ansible group1 -m ping 192.168.17.106 | SUCCESS {ansible_facts: {discovered_interpreter_python: /usr/bin/python},changed: false,ping: pong } 192.168.17.105 | SUCCESS {ansible_facts: {discovered_interpreter_python: /usr/bin/python},changed: false,ping: pong }服务器分组 ansible通过一个主机清单功能来实现服务器分组。 Ansible的默认主机清单配置文件为/etc/ansible/hosts 另外如果服务器比较多的情况下也可以写 [nginx] apache[1:10].aaa.com nginx[a:z].aaa.com 10.1.1.[11:15] [rootlocalhost ansible]# tail -2 hosts [group1] 192.168.17.[105:106]然后再用ping模块测试 [rootlocalhost ansible]# ansible group1 -m ping 192.168.17.106 | SUCCESS {ansible_facts: {discovered_interpreter_python: /usr/bin/python},changed: false,ping: pong } 192.168.17.105 | SUCCESS {ansible_facts: {discovered_interpreter_python: /usr/bin/python},changed: false,ping: pong }再看一个例子 [nginx] 10.1.1.13:2222 表示的是10.1.1.13这台机器但是端口是2222端口。 [rootlocalhost ansible]# tail -3 hosts [group1] 192.168.17.105 192.168.17.106:2222[rootlocalhost ansible]# ansible group1 -m ping 192.168.17.105 | SUCCESS {ansible_facts: {discovered_interpreter_python: /usr/bin/python},changed: false,ping: pong } 192.168.17.106 | SUCCESS {ansible_facts: {discovered_interpreter_python: /usr/bin/python},changed: false,ping: pong }别名的写法 定义10.1.1.12:2222 这台服务器的别名nginx1。 nginx1 ansible_ssh_hosts10.1.1.13 ansible_ssh_port2222没有做免密登录的服务器可以指定用户名和密码 nginx1 ansible_ssh_host10.1.1.13 ansible_ssh_port2222 ansible_ssh_userroot ansible_ssh_pass123456 nginx2 ansible_ssh_host10.1.1.12# /etc/ansible/hosts [nginx] nginx1 nginx2 说明密码最好是一个加密字符串。 [rootlocalhost ansible]# tail -6 hosts nginx1 ansible_ssh_host192.168.17.106 ansible_ssh_port2222 ansible_ssh_userroot ansible_ssh_pass1q2w3e4r## db-[99:101]-node.example.com [group1] 192.168.17.105 nginx1别名的测试。 [rootlocalhost ansible]# ansible group1 -m ping 192.168.17.105 | SUCCESS {ansible_facts: {discovered_interpreter_python: /usr/bin/python},changed: false,ping: pong } nginx1 | SUCCESS {ansible_facts: {discovered_interpreter_python: /usr/bin/python},changed: false,ping: pong }小结 主机清单的作用服务器分组。主机清单就是服务器分组。 主机清单的常见功能 1可以通过IP范围来分主机名的名称来分 2如果ssh端口不是22可以传入新端口 3没有做免密登录可以传密码。 不论是哪种环境免密或不免密端口是否22请最终将两台被管理机器加入到group1组即可。
http://www.hkea.cn/news/14445649/

相关文章:

  • 长沙百度网站推广优化中山建设网站的公司
  • 学习制作网页的网站深圳市住房建设部官方网站
  • 网站制作没有原创图片怎么办如何做网站同步
  • 上海英文网站建设公司怎么改变wordpress首页
  • 能查个人信息的网站创一家网站
  • 南庄网站开发怎么找专业的营销团队
  • 知识付费网站搭建南通城乡住房建设厅网站首页
  • 合作建站协议青岛建设网站的公司
  • 网站导航栏特效海城网站制作
  • 网上销售网站建设策划做网站来联盟怎么样
  • 免费word文档模板下载网站柳州网站制作工作室
  • wordpress建影视网站做网站卖什么发财
  • 网站内页模板四年级下册数学优化设计答案
  • 企业网站建设组织人员可行性分析网页制作公司背景介绍
  • 佛山那里有做苗木销售网站哪个网站可以做前端项目
  • 萧山城区建设有限公司网站如何做强一个网站的品牌
  • 网站设计规划信息技术教案云南网站制作需求
  • 电商网站设计思想中国建设协会网站首页
  • 庆安建设局网站公司网站开发部署
  • 可以做推广东西的网站青建设厅官方网站
  • 网站建设监理制作网页最简单的软件
  • 求职上海关键词优化方法
  • 网页设计免费网站推荐郑州微网站建设
  • 黄石公司网站建设广州网站开发技术
  • 吉林省网站建设公司wordpress边栏显示头像
  • 创建网站的目的是什么意思wordpress底部导航代码
  • 建设部网站规范下载网页设计图片旋转
  • 驻马店做网站优化沈阳php网站
  • 专业外包网站建设公司排名建设茶网站发布与推广方案
  • 企业网站优化服务主要围绕什么如何开发小程序微信