网站建设资讯

NEWS

网站建设资讯

saltstack-PHP5.4的安装

这里的安装包括了两个插件安装 memcache和zendopcache,但是没有更改php.ini的内容,到时候直接把修改过的文件直接替换就好了。

让客户满意是我们工作的目标,不断超越客户的期望值来自于我们对这个行业的热爱。我们立志把好的技术通过有效、简单的方式提供给客户,将通过不懈努力成为客户在信息化领域值得信任、有价值的长期合作伙伴,公司提供的服务项目有:空间域名、网页空间、营销软件、网站建设、盂县网站维护、网站推广。

测试,可以自定义版本和安装路径,但是版本的话需要softurl里面有才能定义,不能只能用wget

sudo salt '192.168.1.1' state.sls php.install saltenv="ot" pillar='{php:{"installdir":"/usr/local/php--test","phpinidir":"/tmp/phpini-test/","apachedir":"/usr/local/apache-test","version":"5.4.45"}}'

{% set softurl =  "http://1.1.1.1/saltsoftware/" %}
{% set installdir = salt['pillar.get']('php:installdir', '/usr/local/php') %}
{% set phpinidir = salt['pillar.get']('php:phpinidir', '/etc') %}
{% set apachedir = salt['pillar.get']('php:apachedir', '/usr/local/apache2') %}
{% set version = salt['pillar.get']('php:version', '5.4.45') %}

php_inidir:
  cmd.run:
    - names:
      - mkdir ` phpinidir `
    - unless: test -e ` phpinidir `

php_software:
  cmd.run:
    - cwd: /root/soft
    - name: wget ` softurl `/php-` version `.tar.gz
    - unless: test -e /root/soft/php-` version `.tar.gz

php_ln:
  cmd.run:
    - name: ln -s /usr/lib64/libjpeg.so /usr/lib/libjpeg.so && ln -s /usr/lib64/libpng.so /usr/lib/libpng.so && ln -s /usr/lib64/libgd.so /usr/lib/libgd.so
    - unless: test -e /usr/lib/libjpeg.so && test -e /usr/lib/libgd.so && test -e /usr/lib/libpng.so

php_install:
  cmd.run:
    - name: cd /root/soft && tar -zvxf php-` version `.tar.gz &&  cd php-` version ` && ./configure --prefix=` installdir ` --with-MySQL=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-apxs2=` apachedir `/bin/apxs --with-gd --with-png-dir=/usr --with-jpeg-dir=/usr --with-freetype-dir=/usr --with-zlib --with-openssl --enable-sockets --enable-mbstring --with-bz2 --enable-ftp --with-gettext --enable-sysvshm --enable-shmop --enable-gd-native-ttf --enable-gd-jis-conv --with-curl --with-config-file-path=` phpinidir ` && make -j 4 && make install && cp php.ini-development ` phpinidir `
    - unless: test -e ` installdir `

memcache_software:
  cmd.run:
    - cwd: /root/soft
    - name: wget ` softurl `/memcache-2.2.7.tgz
    - unless: test -e /root/soft/memcache-2.2.7.tgz

memcache_install:
  cmd.run:
    - name: cd /root/soft && tar -zvxf memcache-2.2.7.tgz &&  cd memcache-2.2.7 && ` installdir `/bin/phpize && ./configure --with-php-config={{ installdir  }}/bin/php-config && make && make install
    - unless: php_install

zendopcache_software:
  cmd.run:
    - cwd: /root/soft
    - name: wget ` softurl `/zendopcache-7.0.4.tgz
    - unless: test -e /root/soft/zendopcache-7.0.4.tgz

zendopcache_install:
  cmd.run:
    - name: cd /root/soft && tar -zvxf zendopcache-7.0.4.tgz &&  cd zendopcache-7.0.4 && ` installdir `/bin/phpize  && ./configure --with-php-config={{ installdir  }}/bin/php-config && make && make install
    - unless: php_install


网站题目:saltstack-PHP5.4的安装
本文URL:http://njwzjz.com/article/jcgcco.html