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

网站上的高清图怎么做建设个人网页

网站上的高清图怎么做,建设个人网页,电子商务网站管理系统,网站备案符号案例一 控制主机上的普通用户控制受控主机 控制端1台,受控端两台 1.将两台受控主机添加到/etc/hosts文件中 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhos…

案例一

控制主机上的普通用户控制受控主机

控制端1台,受控端两台

1.将两台受控主机添加到/etc/hosts文件中

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.197.153 node1 node1.example.com
192.168.197.154 node2 node1.example.com

2.控制端和受控端都需要有student用户,并设置密码

[student@control ~]$ id student
uid=1001(student) gid=1001(student) groups=1001(student)

[student@control  ~]# passwd student

[root@node1 ~]# id student
uid=1002(student) gid=1002(student) groups=1002(student),10(wheel)
[root@node1 ~]# passwd student

[root@node2 ~]# id student
uid=1002(student) gid=1002(student) groups=1002(student),10(wheel)
[root@node2 ~]# passwd  student

 3.修改配置文件,控制端  需要root用户权限

 4.测试

[student@control ~]$ ansible all -m command -a 'hostname'
SSH password:
node1 | CHANGED | rc=0 >>
node1.example.com
node2 | CHANGED | rc=0 >>
node2.example.com

 


案例二

关闭主机密钥验证

1.设置host-key-checking=False

 

 相当于发送了密钥段,不用再用ssh-keygen命令

2.发送主机ssh-copy-id

主机少可用   ssh-copy-id -i node1或者node2

但是多台主机,可以使用循环:

创建一个shell脚本  如  a.sh

for host in node{1..2};do
        ssh-copy-id -i $host;
done

 执行a.sh

[student@control ~]$ bash a.sh
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/student/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
student@node1's password:

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'node1'"
and check to make sure that only the key(s) you wanted were added.

/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/student/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
student@node2's password:

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'node2'"
and check to make sure that only the key(s) you wanted were added.

 3.验证:

[student@control ~]$ ssh node1 hostname
node1.example.com


 ansible.cfg配置文件详解

 

[root@ansible ~]# vim /etc/ansible/ansible.cfg 
[defaults] 默认配置 
# some basic default values... 
#inventory = /etc/ansible/hosts #主机列表配置文件 
#library = /usr/share/my_modules/ #库文件存放目录,ansible默认搜寻模块的位置
#module_utils = /usr/share/my_module_utils/ #模块存放目录 
#remote_tmp = ~/.ansible/tmp #临时py命令文件存放在远程主机目录 
#local_tmp = ~/.ansible/tmp #本机的临时命令执行目录 
#forks = 5 #默认并发数 
#poll_interval = 15 #时间间隔 
#sudo_user = root #默认sudo用户 
#ask_sudo_pass = True #每次执行ansible命令是否询问sudo用户密码,默认值为no
#ask_pass = True #每次执行ansible命令是否询问ssh密码,默认值为no
#transport = smart #传输方式 
#remote_port = 22 #远程端口号 
#remote_user = root ----远程用户,受控主机使用什么用户进行执行ansible任务
#roles_path    = /etc/ansible/roles
#host_key_checking = False


[privilege_escalation]  定义对受管主机执行特权升级,默认普通用户是没有权限来执行很多ansible任务的,但是我们可以给普通用户提权,让它有权限去执行ansible任务
become = true
become_method = sudo
become_user = root
become_ask_pass = false

[paramiko_connection]、[ssh_connection]、[accelerate]用于优化与受管主机的连接

[selinux] 定义如何配置selinux交互

http://www.15wanjia.com/news/196002.html

相关文章:

  • 东莞前十的外贸公司企业关键词优化推荐
  • 宣传 网站建设方案linux网站开发
  • 小白怎么做网站赚钱邢台网站建设企业
  • 铭泰东莞网站建设wordpress多媒体占用id
  • 南安网站开发印发网站建设方案
  • 做企业网站收费价格学校网站模板wordpress
  • 网站内容好企业网站功能模块设计
  • 网页设计班级网站怎么做嘉兴网站建设公司就找嘉乐网络
  • 网站建设排版规定做网站的服务器用什么系统
  • 做链接哪个网站好抖音seo排名源码
  • 北京市建设官方网站wordpress移动端导航菜单
  • wordpress 分享后可见网站的优化从几个方面
  • 运营型网站微信建站官网免费注册
  • 合肥网站建设维护公司建设网站的请示
  • 青岛公司建网站公司汽修行业做环评网站
  • 网站页脚个人备案网站可以做产品推广
  • 北京网站建设价格行情什么叫软文推广
  • 安徽建设新工程信息网站以下哪个不是网站开发工具
  • 美业网站wordpress 插件文件夹
  • 网站建设技术论文深圳网站公司哪家好
  • 地税网站如何做税种确认榆林网站建设公司
  • 网络舆情监测专业就业前景扬中seo
  • 做业务在那几个网站上找客户端app官方安装下载
  • 上海模板网建站做商城网站要什么证件
  • 学网站建设培训班一般购物网站有哪些模块
  • 做分析图的地图网站汕头澄海房价
  • 好网站建设因素网站建设设计公司类网站织梦模板(带手机端)
  • 杭州专业网站设计制作邯郸做网站代理
  • 网站建设aichengkeji怎么获取免费的wordpress
  • 买网站多少钱宋家庄网站建设