[root@salt-master base]
include:
- php.service
libmemcached-
source
-
install
:
file
.managed:
- name:
/opt/tools/libmemcached-1
.0.18.
tar
.gz
-
source
: salt:
//php/files/libmemcached-1
.0.18.
tar
.gz
- user: root
- group: root
- mode: 644
cmd.run:
- name:
cd
/opt/tools
&&
tar
-zxf libmemcached-1.0.18.
tar
.gz &&
cd
libmemcached-1.0.18 && .
/configure
--prefix=
/usr/local/libmemcached
--with-memcached &&
make
&&
make
install
- unless:
test
-d
/usr/local/libmemcached
- require:
-
file
: libmemcached-
source
-
install
memcached-
source
-
install
:
file
.managed:
- name:
/opt/tools/memcached-2
.2.0.tgz
-
source
: salt:
//php/files/memcached-2
.2.0.tgz
- user: root
- group: root
- mode: 644
cmd.run:
- name:
cd
/opt/tools/
&&
tar
-zxf memcached-2.2.0.tgz &&
cd
memcached-2.2.0 &&
/usr/local/php/bin/phpize
&& .
/configure
--
enable
-memcached --with-php-config=
/usr/local/php/bin/php-config
--with-libmemcached-
dir
=
/usr/local/libmemcached
&&
make
&&
make
install
- unless:
test
-x
/usr/bin/memcached
- require:
-
file
: memcached-
source
-
install
phpredis-
source
-
install
:
file
.managed:
- name:
/opt/tools/phpredis-2
.2.4.
tar
.gz
-
source
: salt:
//php/files/phpredis-2
.2.4.
tar
.gz
- user: root
- group: root
- mode: 644
cmd.run:
- name:
cd
/opt/tools
&&
tar
-zxf phpredis-2.2.4.
tar
.gz &&
cd
phpredis-2.2.4 &&
/usr/local/php/bin/phpize
&& .
/configure
--with-php-config=
/usr/local/php/bin/php-config
&&
make
&&
make
install
- unless:
test
-e
/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/redis
.so
- require:
-
file
: phpredis-
source
-
install
protobuf-extension:
file
.managed:
- name:
/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/protobuf
.so
-
source
: salt:
//php/files/protobuf
.so
- user: www
- group: www
- mode: 755
extension-init:
file
.managed:
- name:
/usr/local/php/etc/php
.ini
-
source
: salt:
//php/files/php
.ini
- user: www
- group: www
- replace: True
- mode: 644
cmd.run:
- name:
chown
-R www:www
/usr/local/php
&&
source
/etc/profile
- require:
-
file
: protobuf-extension
-
file
: extension-init
-
watch
:
-
file
:
/usr/local/php/etc/php
.ini