=
=
=
#centos,源准备:使用阿里云的源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
yum clean all && yum makecache
#安装saltstack
#salt-master安装
wget https://repo.saltstack.com/yum/redhat/salt-repo-latest-2.el6.noarch.rpm --no-check-certificate
rpm -ivh salt-repo-latest-2.el6.noarch.rpm
yum install -y python
yum install -y salt-master
#salt-minion安装
wget https://repo.saltstack.com/yum/redhat/salt-repo-latest-2.el6.noarch.rpm --no-check-certificate
rpm -ivh salt-repo-latest-2.el6.noarch.rpm
yum install -y python
yum install -y salt-minion
注意:如果https下载不了,需要改成http下载;同时需要修改.repo文件,把其中的https也改成http。具体见前面文章。
#修改配置文件
salt-master不用修改配置文件;
salt-ninion需要修改配置文件:
vi /etc/salt/minion
修改1:
#master: salt
#把salt字符串改成salt-master的ip地址
修改2:
#id:
#在冒号后面设置minion的id标识;其实可以不设置,这样就用host等标志了,这需要管理规范,比如机器命名较规范等;
#给master添加minion节点,使用salt-key命令
[root@june-test-10 june]# salt-key -L
Accepted Keys:
Denied Keys:
Unaccepted Keys:
june-test-11
june-test-12
Rejected Keys:
[root@june-test-10 june]# salt-key -A
The following keys are going to be accepted:
Unaccepted Keys:
june-test-11
june-test-12
Proceed? [n/Y] Y
Key for minion june-test-11 accepted.
Key for minion june-test-12 accepted.
[root@june-test-10 june]# salt-key -L
Accepted Keys:
june-test-11
june-test-12
#测试ping命令,确保master和minion联通
[root@june-test-10 june]# salt "*" test.ping
june-test-12:
True
june-test-11:
True
#远程执行命令:
[root@june-test-10 june]# salt '*' cmd.run 'uptime'
june-test-12:
11:31:10 up 2 days, 1:04, 1 user, load average: 0.00, 0.00, 0.00
june-test-11:
11:31:10 up 2 days, 1:03, 1 user, load average: 0.00, 0.00, 0.00
[root@june-test-10 june]# salt '*' cmd.run 'uptime'
june-test-12:
11:31:10 up 2 days, 1:04, 1 user, load average: 0.00, 0.00, 0.00
june-test-11:
11:31:10 up 2 days, 1:03, 1 user, load average: 0.00, 0.00, 0.00
[root@june-test-10 june]# salt '*' grains.item os
june-test-11:
----------
os:
CentOS
june-test-12:
----------
os:
CentOS
[root@june-test-10 june]# salt '*' cmd.exec_code python 'import sys; print sys.version'
june-test-12:
2.6.6 (r266:84292, Aug 18 2016, 15:13:37)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]
june-test-11:
2.6.6 (r266:84292, Aug 18 2016, 15:13:37)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]
=
=
=
相关推荐
SpringMVC ---- HelloWorld ---- 代码 SpringMVC ---- HelloWorld ---- 代码 SpringMVC ---- HelloWorld ---- 代码 SpringMVC ---- HelloWorld ---- 代码 SpringMVC ---- HelloWorld ---- 代码 SpringMVC ---- Hello...
通过 docker pull hello-world && docker save -o hello-world_202005.tar hello-world 命令生成该文件。文件名加上日期仅仅是记录作用,镜像tag是latest,即 hello-world:latest。 加载镜像:docker load -i hello-...
spring-security-helloworld-annotation
kurento的hello-world示例的jar包,如果您已经启动了kms,则可以执行此命令启动hello-world服务:java -Dkms.url=ws://192.168.133.206:8888/kurento -jar helloworld-0.0.1-SNAPSHOT.jar
• 编写 01-hello-world.js • 在命令行打印 hello world! 字符 //mkdir nodejs-demo //cd nodejs-demo // https://sample.wangding.in/nodejs/tern-project //mv tern-project .tern-project //mkdir 01-...
cloudify与各种工具对接文档openstack,kubernets, vc cloudify-hello-world-example-4.5.0.1-build
Helloworld-master.zip
cocos2d-x初探学习笔记(1)--HelloWorld
-HelloWorld.exe -chapter2 三个小工具的编写 -HelloWorld.exe -chapter3 PE文件头 -HelloWorld.exe -chapter4 导入表 -HelloWorld.exe -chapter5 导出表 -HelloWorld.exe -chapter6 堆栈与重定位表 ...
Spring Boot学习笔记-------(二)spring boot入门,配套例子代码,博客地址:https://blog.csdn.net/huaya1127/article/details/104130300
spring4-mvc-gradle-xml-hello-world, Gradle + spring 4 MVC Hello World 示例( XML ) Gradle --spring-4 MVC Hello Worldspring 4 MVC + JSP视图+ XML配置模板,使用Gradle构建工具。使用的###1. 技术Gradle 2.0...
spring-mvc-helloworld 可以通过jetty启动,访问 http://localhost:8010/spring-mvc-helloworld/hello/world
100-ways-to-print-HelloWorld-in-java-master.rar
DSP实验一-CCS入门实验指导-HelloWorld,\在学习ccs开发环境的时候,c语言入门必备
spring和rabbitmq整合的helloworld
用这个hello-world样板启动您的项目。该入门工具随附了主要的Gatsby配置文件,您可能需要使用React的快速应用生成器来快速启动和运行。 还有其他更具体的想法吗?您可能需要查看我们充满活力的集合。 :rocket:快速...
application.properties:Spring Boot应用的配置文件;可以修改一些默认设置; ———————————————— 版权声明:本文为CSDN博主「倦眼问酒书j」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上...
SpringMVC------从HelloWorld开始
JSF-2-Hello-World-Example.zip
Hello world -- OS