首页 > 代码库 > Saltstack生产案例之php和memcached安装

Saltstack生产案例之php和memcached安装

直接git配置文件

yum -y install git

cd /root/tools

git clone https://github.com/unixhot/saltbook-code

cd /root/tools/saltbook-code/salt/prod/keepalived

p -r * /srv/salt/prod/modules/keepalived/

修改一下install.sls

技术分享

可以执行了

salt ‘10-8-86-172‘ state.sls modules.keepalived.install saltenv=prod

 

cd /root/tools/saltbook-code/salt/prod/cluster

cp haproxy-outside-keepalived.sls /srv/salt/prod/cluster/

cp haproxy-outside-keepalived.conf /srv/salt/prod/cluster/files/

cd /srv/salt/prod/cluster/

vim haproxy-outside-keepalived.sls

技术分享

salt ‘10-8-86-172‘ state.sls cluster.haproxy-outside-keepalived saltenv=prod

 

下面是nginx+php

 

Saltstack生产案例之php和memcached安装