Skip to content
Snippets Groups Projects
Commit f05400aa authored by jurgenhaas's avatar jurgenhaas
Browse files

Get JailKit and PHP53 work together

parent 5f10f42f
No related branches found
No related tags found
No related merge requests found
...@@ -9,11 +9,68 @@ ...@@ -9,11 +9,68 @@
- '/etc/php5/cli53/conf.d/' - '/etc/php5/cli53/conf.d/'
- '/etc/php5/cgi53/conf.d/' - '/etc/php5/cgi53/conf.d/'
# http://askubuntu.com/questions/462673/installing-php-5-3-in-ubuntu-14-04 - name: "Check PHP 5.3 Requirement"
# apt-get purge php5 && sudo apt-get install libxml2-dev shell: php --version
# wget http://in1.php.net/distributions/php-5.3.29.tar.bz2 register: php_version_available
# tar -xvf php-5.3.29.tar.bz2 changed_when: false
# cd php-5.3.29
# ./configure - block:
# make - name: "Make sure an empty directory /tmp/php53 exists"
# make install file:
path='/tmp/php53'
state='{{ item }}'
with_items:
- absent
- directory
- name: "Download PHP 5.3"
get_url:
url='http://in1.php.net/distributions/php-5.3.29.tar.bz2'
dest='/tmp/php-5.3.29.tar.bz2'
- name: "Unpack PHP 5.3"
unarchive:
src='/tmp/php-5.3.29.tar.bz2'
dest='/tmp/php53'
copy=no
- name: "Compile PHP 5.3"
shell: "{{ item }} chdir=/tmp/php53/php-5.3.29"
with_items:
- ./configure
- make
- make install
when: '"PHP 5.3.29" not in php_version_available.stdout'
- name: "Copy PHP53 Modules"
copy:
src='php53/{{ item }}.so'
dest='{{ php53.extdir }}/{{ item }}.so'
owner='root'
group='root'
mode=644
with_items: '{{ php53.modules }}'
- name: "Enable PHP53 Modules"
file:
src='/etc/php5/{{ php_conf_dir }}/{{ item.0 }}.ini'
dest='/etc/php5/{{ item.1 }}/conf.d/{{ item.0 }}.ini'
state='link'
owner='root'
group='root'
mode='644'
with_nested:
- '{{ php53.modules }}'
- ['cli53', 'cgi53']
- name: "Create PHP53 INI Files"
template:
src='etc-php5-apache2-php.ini'
dest='/etc/php5/{{ item }}/php.ini'
owner='root'
group='root'
mode='644'
with_items:
- 'cgi53'
- 'cli53'
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment