650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/80/C8/wKioL1dECmjCuM3cAAA2clWW3Sc844.png "title=" 6 ']ux~ uj_0% $JA 6_v ' wikxw.png "alt=" Wkiol1decmjcum3caaa2clww3sc844.png "/>
the contents of the Install.sls are :
Redis-install:
File.managed:
-Name:/usr/local/src/redis-3.2.0.tar.gz
-Source:salt://redis/files/redis-3.2.0.tar.gz
-User:root
-Group:root
-mode:755
Cmd.run:
-Name:cd/usr/local/src && Tar XF redis-3.2.0.tar.gz && cd redis-3.2.0 && make Prefix=/usr/local /redis Install
-Unless:test-d/usr/local/redis
-Require:
-File:redis-install
Redis-config:
Cmd.run:
-Name:mkdir/etc/redis
File.managed:
-Name:/etc/redis/6379.conf
-Source:salt://redis/files/6379.conf
-User:root
-Group:root
-mode:644
Redis-service:
File.managed:
-Name:/etc/init.d/redis
-Source:salt://redis/files/redis.init
-User:root
-Group:root
-mode:644
Cmd.run:
-Name:chkconfig--add Redis && chkconfig Redis on
-Unless:chkconfig--list | grep Redis
Service.running:
-Name:redis
-Enable:true
-Watch:// in a production environment this step must be made clear, because redis is a memory cache
-File:redis-config The role of//watch is to automatically restart when monitoring file changes
-Require:
-Cmd:redis-install
-Cmd:redis-service
This article is from the "burning Years of Passion" blog, please be sure to keep this source http://liuzhengwei521.blog.51cto.com/4855442/1782544
Salt-stack Installing Redis