Saltstack Official PHP Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 9 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 6 година
пре 10 година
пре 8 година
пре 8 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 5 година
пре 10 година
пре 5 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 8 година
пре 10 година
пре 9 година
пре 10 година
пре 7 година
пре 9 година
пре 9 година
пре 9 година
пре 10 година
пре 10 година
пре 6 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
  1. .. _readme:
  2. php-formula
  3. ===========
  4. |img_travis| |img_sr|
  5. .. |img_travis| image:: https://travis-ci.com/saltstack-formulas/php-formula.svg?branch=master
  6. :alt: Travis CI Build Status
  7. :scale: 100%
  8. :target: https://travis-ci.com/saltstack-formulas/php-formula
  9. .. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
  10. :alt: Semantic Release
  11. :scale: 100%
  12. :target: https://github.com/semantic-release/semantic-release
  13. Formula to set up and configure php
  14. .. list-table::
  15. :name: banner-breaking-changes-v1.0.0
  16. :header-rows: 1
  17. :widths: 1
  18. * - WARNING: BREAKING CHANGES SINCE ``v1.0.0``
  19. * - Prior to
  20. `v1.0.0 <https://github.com/saltstack-formulas/php-formula/releases/tag/v1.0.0>`_,
  21. this formula provided two methods for managing PHP;
  22. the old method under ``php`` and the new method under ``php.ng``.
  23. The old method has now been removed and ``php.ng`` has been promoted to
  24. be ``php`` in its place.
  25. If you are not in a position to migrate, please pin your repo to the final
  26. release tag before
  27. `v1.0.0 <https://github.com/saltstack-formulas/php-formula/releases/tag/v1.0.0>`_,
  28. i.e.
  29. `v0.40.1 <https://github.com/saltstack-formulas/php-formula/releases/tag/v0.40.1>`_.
  30. To migrate from ``php.ng``, simply modify your pillar to promote the
  31. entire section under ``php:ng`` so that it is under ``php`` instead.
  32. So with the editor of your choice, highlight the entire section and then
  33. unindent one level. Finish by removing the ``ng:`` line.
  34. To migrate from the old ``php``, first convert to ``php.ng`` under
  35. `v0.40.1 <https://github.com/saltstack-formulas/php-formula/releases/tag/v0.40.1>`_.
  36. and then follow the steps laid out in the paragraph directly above.
  37. .. contents:: **Table of Contents**
  38. General notes
  39. -------------
  40. See the full `SaltStack Formulas installation and usage instructions
  41. <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
  42. If you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section
  43. <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#writing-formulas>`_.
  44. If you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``,
  45. which contains the currently released version. This formula is versioned according to `Semantic Versioning <http://semver.org/>`_.
  46. See `Formula Versioning Section <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning>`_ for more details.
  47. Contributing to this repo
  48. -------------------------
  49. **Commit message formatting is significant!!**
  50. Please see :ref:`How to contribute <CONTRIBUTING>` for more details.
  51. Available states
  52. ----------------
  53. Please provide feedback by filing issues,
  54. discussing in ``#salt`` in Freenode and the mailing list as normal.
  55. **Note:** php states require the merge parameter of salt.modules.pillar.get(),
  56. first available in the Helium release.
  57. .. contents::
  58. :local:
  59. ``php``
  60. ^^^^^^^^^^
  61. Installs the php package.
  62. ``php.adodb``
  63. ^^^^^^^^^^^^^^^^
  64. Installs the php-adodb package.
  65. ``php.apache2``
  66. ^^^^^^^^^^^^^^^^^^
  67. Meta-state that combines `php.apache2.install`_ and `php.apache2.ini`_.
  68. ``php.apache2.ini``
  69. ^^^^^^^^^^^^^^^^^^^^^^
  70. Manages the apache2 php.ini file
  71. ``php.apache2.install``
  72. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  73. Installs the apache2 and libapache2-mod-php5 package. Debian Only.
  74. ``php.apc``
  75. ^^^^^^^^^^^^^^
  76. Installs the php-apc package.
  77. Disabled on opensuse need server:php repo
  78. ``php.apcu``
  79. ^^^^^^^^^^^^^^^
  80. Installs the php-apcu package.
  81. Disabled on opensuse need server:php repo
  82. ``php.auth-sasl``
  83. ^^^^^^^^^^^^^^^^^^^^
  84. Installs the php-auth-sasl package.
  85. ``php.bcmath``
  86. ^^^^^^^^^^^^^^^^^
  87. Installs the php-bcmath package.
  88. ``php.bz2``
  89. ^^^^^^^^^^^^^^
  90. Installs the php-bz2 package.
  91. ``php.cache-lite``
  92. ^^^^^^^^^^^^^^^^^^^^^
  93. Installs the php-cache-lite package.
  94. ``php.cgi``
  95. ^^^^^^^^^^^^^^
  96. Installs the php-cgi package.
  97. Disabled on opensuse only php5-fastcgi available.
  98. ``php.cli``
  99. ^^^^^^^^^^^^^^
  100. Meta-state that combines `php.cli.install`_ and `php.cli.ini`_.
  101. ``php.cli.ini``
  102. ^^^^^^^^^^^^^^^^^^
  103. Manages the php-cli ini file.
  104. ``php.cli.install``
  105. ^^^^^^^^^^^^^^^^^^^^^^
  106. Installs the php-cli package.
  107. ``php.composer``
  108. ^^^^^^^^^^^^^^^^^^^
  109. Installs [composer](https://getcomposer.org) and keeps it updated.
  110. ``php.console-table``
  111. ^^^^^^^^^^^^^^^^^^^^^^^^
  112. Installs the php-console-table package.
  113. ``php.ctype``
  114. ^^^^^^^^^^^^^^^^
  115. Installs the php-ctype package.
  116. ``php.curl``
  117. ^^^^^^^^^^^^^^^
  118. Installs the php5-curl package on Debian, and ensures that curl itself is
  119. installed for RedHat systems, this is due to the curl libs being provided by
  120. php-common, which will get installed with the main php package.
  121. ``php.dba``
  122. ^^^^^^^^^^^^^^
  123. Installs the php-dba package.
  124. ``php.dev``
  125. ^^^^^^^^^^^^^^
  126. Installs the php5-dev and build-essential package.
  127. ``php.filter``
  128. ^^^^^^^^^^^^^^^^^
  129. Installs the php-filter package.
  130. ``php.fpm``
  131. ^^^^^^^^^^^^^^
  132. Meta-state that combines all php.fpm states.
  133. ``php.fpm.config``
  134. ^^^^^^^^^^^^^^^^^^^^^
  135. Manages the (non-pool) php-fpm config files.
  136. ``php.fpm.install``
  137. ^^^^^^^^^^^^^^^^^^^^^^
  138. Installs the php-fpm package.
  139. ``php.fpm.pools``
  140. ^^^^^^^^^^^^^^^^^^^^
  141. Meta-state that combines `php.fpm.service`_ and `php.fpm.pools_config`_
  142. ``php.fpm.pools_config``
  143. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  144. Manages php-fpm pool config files.
  145. ``php.fpm.service``
  146. ^^^^^^^^^^^^^^^^^^^^^^
  147. Manages the php-fpm service.
  148. ``php.gd``
  149. ^^^^^^^^^^^^^
  150. Installs the php-gd package.
  151. ``php.gearman``
  152. ^^^^^^^^^^^^^^^^^^
  153. Installs the php-gearman package.
  154. ``php.geoip``
  155. ^^^^^^^^^^^^^^^^
  156. Installs the php-geoip package.
  157. ``php.geshi``
  158. ^^^^^^^^^^^^^^^^
  159. Installs the php-geshi package.
  160. ``php.gettext``
  161. ^^^^^^^^^^^^^^^^^^
  162. Installs the php-gettext package.
  163. ``php.gmp``
  164. ^^^^^^^^^^^^^^
  165. Installs the php-gmp package. Debian Only.
  166. ``php.hash``
  167. ^^^^^^^^^^^^^^^
  168. Installs the php-hash package.
  169. ``php.http``
  170. ^^^^^^^^^^^^^^^
  171. Installs the php-http package.
  172. ``php.hhvm``
  173. ^^^^^^^^^^^^^^^
  174. Meta-state that combines php.hhvm states
  175. ``php.hhvm.config``
  176. ^^^^^^^^^^^^^^^^^^^^^^
  177. Manages the php-hhvm config files
  178. ``php.hhvm.install``
  179. ^^^^^^^^^^^^^^^^^^^^^^^
  180. Installs the php-hhvm package
  181. ``php.hhvm.repo``
  182. ^^^^^^^^^.REPO^^^^^^
  183. Configures the hhvm repo for debian/ubuntu
  184. ``php.hhvm.service``
  185. ^^^^^^^^^^^^^^^^^^^^^^^
  186. Manages the php-hhvm service.
  187. ``php.igbinary``
  188. ^^^^^^^^^^^^^^^^^^^
  189. Installs the php-igbinary package.
  190. ``php.imagick``
  191. ^^^^^^^^^^^^^^^^^^
  192. Installs the php-imagick package.
  193. Disabled on opensuse no package.
  194. ``php.imap``
  195. ^^^^^^^^^^^^^^^
  196. Installs the php-imap package.
  197. ``php.intl``
  198. ^^^^^^^^^^^^^^^
  199. Installs the php-intl package.
  200. ``php.json``
  201. ^^^^^^^^^^^^^^^
  202. Installs the php-json package.
  203. ``php.ldap``
  204. ^^^^^^^^^^^^^^^
  205. Installs the php-ldap package.
  206. ``php.mail``
  207. ^^^^^^^^^^^^^^^
  208. Installs the php-mail package.
  209. ``php.mbstring``
  210. ^^^^^^^^^^^^^^^^^^^
  211. Installs the php-mbstring package.
  212. ``php.mcrypt``
  213. ^^^^^^^^^^^^^^^^^
  214. Installs the php-mcrypt package.
  215. ``php.mdb2``
  216. ^^^^^^^^^^^^^^^
  217. Installs the php-mdb2 package.
  218. ``php.mdb2-driver-mysql``
  219. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  220. Installs the php-mdb2-driver-mysql package.
  221. ``php.mdb2-driver-pgsql``
  222. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  223. Installs the php-mdb2-driver-pgsql package.
  224. ``php.memcache``
  225. ^^^^^^^^^^^^^^^^^^^
  226. Installs the php-memcache package.
  227. Disabled on opensuse need server:php:extensions repo
  228. ``php.memcached``
  229. ^^^^^^^^^^^^^^^^^^^^
  230. Installs the php-memcached package.
  231. Disabled on opensuse need server:php:extensions repo
  232. ``php.modules``
  233. ^^^^^^^^^^^^^^^^^^
  234. Calls ``php.<name>`` for each entry in ``php:modules`` if available, or
  235. try to install the matching packages that can be set via from
  236. ``php:lookup:pkgs``
  237. ``php.mongo``
  238. ^^^^^^^^^^^^^^^^
  239. Installs the php-mongo package.
  240. ``php.mongodb``
  241. ^^^^^^^^^^^^^^^^^^
  242. Installs the php-mongodb package.
  243. ``php.msgpack``
  244. ^^^^^^^^^^^^^^^^^^
  245. Installs the php-msgpack package.
  246. ``php.mysql``
  247. ^^^^^^^^^^^^^^^^
  248. Installs the php-mysql package.
  249. ``php.mysqlnd``
  250. ^^^^^^^^^^^^^^^^^^
  251. Installs the php-mysqlnd package.
  252. Disabled on opensuse no package.
  253. ``php.net-smtp``
  254. ^^^^^^^^^^^^^^^^^^^
  255. Installs the php-net-smtp package.
  256. ``php.net4``
  257. ^^^^^^^^^^^^^^^
  258. Installs the php-net4 package.
  259. ``php.net6``
  260. ^^^^^^^^^^^NET6
  261. Installs the php-net6 package.
  262. ``php.oauth``
  263. ^^^^^^^^^^^^^^^^
  264. Installs the php-oauth package.
  265. ``php.opcache``
  266. ^^^^^^^^^^^^^^^^^^
  267. Installs the php-opcache package.
  268. ``php.openssl``
  269. ^^^^^^^^^^^^^^^^^^
  270. Installs the php-openssl package.
  271. ``php.pear``
  272. ^^^^^^^^^^^^^^^
  273. Installs the php-pear package.
  274. ``php.pgsql``
  275. ^^^^^^^^^^^^^^^^
  276. Installs the php-pgsql package.
  277. ``php.phar``
  278. ^^^^^^^^^^^^^^^
  279. Installs the php-phar package.
  280. ``php.posix``
  281. ^^^^^^^^^^^^^^^^
  282. Installs the php-posix package.
  283. ``php.pspell``
  284. ^^^^^^^^^^^^^^^^^
  285. Installs the php-pspell package.
  286. ``php.readline``
  287. ^^^^^^^^^^^^^^^^^^^
  288. Installs the php-readline package.
  289. ``php.redis``
  290. ^^^^^^^^^^^^^^^^
  291. Installs the php-redis package.
  292. Disabled on opensuse need server:php:extensions repo
  293. ``php.seclib``
  294. ^^^^^^^^^^^^^^^^^
  295. Installs the php-seclib package.
  296. ``php.session``
  297. ^^^^^^^^^^^^^^^^^^
  298. Installs the php-session package.
  299. ``php.snmp``
  300. ^^^^^^^^^^^^^^^
  301. Installs the php-snmp package.
  302. ``php.soap``
  303. ^^^^^^^^^^^^^^^
  304. Installs the php-soap package.
  305. ``php.sqlite``
  306. ^^^^^^^^^^^^^^^^^
  307. Installs the php-sqlite package,
  308. ``php.ssh2``
  309. ^^^^^^^^^^^^^^^
  310. Installs the php-ssh2 package,
  311. ``php.suhosin``
  312. ^^^^^^^^^^^^^^^^^^
  313. Installs the php-suhosin package.
  314. ``php.svn``
  315. ^^^^^^^^^^^^^^
  316. Installs the php-svn package.
  317. ``php.sybase``
  318. ^^^^^^^^^^^^^^^^^
  319. Installs the php-sybase package.
  320. ``php.tcpdf``
  321. ^^^^^^^^^^^^^^^^
  322. Installs the php-tcpdf package.
  323. ``php.tidy``
  324. ^^^^^^^^^^^^^^^
  325. Installs the php-tidy package.
  326. ``php.uuid``
  327. ^^^^^^^^^^^^^^^
  328. Installs the php-uuid package.
  329. ``php.xcache``
  330. ^^^^^^^^^^^^^^^^^
  331. Meta-state that combines `php.xcache.install`_ and `php.xcache.ini`_.
  332. ``php.xcache.ini``
  333. ^^^^^^^^^^^^^^^^^^^^^
  334. Manages the php-xcache ini file
  335. ``php.xcache.install``
  336. ^^^^^^^^^^^^^^^^^^^^^^^^^
  337. Installs the php-xcache package.
  338. Disabled on opensuse need server:php:extensions repo
  339. ``php.xdebug``
  340. ^^^^^^^^^^^^^^^^^
  341. Installs the php-xdebug package.
  342. ``php.xml``
  343. ^^^^^^^^^^^^^^
  344. Installs the php-xml package.
  345. ``php.xsl``
  346. ^^^^^^^^^^^^^^
  347. Installs the php-xsl package.
  348. ``php.zip``
  349. ^^^^^^^^^^^^^^
  350. Installs the php-zip package.
  351. Testing
  352. -------
  353. Linux testing is done with ``kitchen-salt``.
  354. Requirements
  355. ^^^^^^^^^^^^
  356. * Ruby
  357. * Docker
  358. .. code-block:: bash
  359. $ gem install bundler
  360. $ bundle install
  361. $ bin/kitchen test [platform]
  362. Where ``[platform]`` is the platform name defined in ``kitchen.yml``,
  363. e.g. ``debian-9-2019-2-py3``.
  364. ``bin/kitchen converge``
  365. ^^^^^^^^^^^^^^^^^^^^^^^^
  366. Creates the docker instance and runs the ``template`` main state, ready for testing.
  367. ``bin/kitchen verify``
  368. ^^^^^^^^^^^^^^^^^^^^^^
  369. Runs the ``inspec`` tests on the actual instance.
  370. ``bin/kitchen destroy``
  371. ^^^^^^^^^^^^^^^^^^^^^^^
  372. Removes the docker instance.
  373. ``bin/kitchen test``
  374. ^^^^^^^^^^^^^^^^^^^^
  375. Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.
  376. ``bin/kitchen login``
  377. ^^^^^^^^^^^^^^^^^^^^^
  378. Gives you SSH access to the instance for manual testing.