-
-
Save lnked/2ee3421f98cf135a4665751f2d43e6bb to your computer and use it in GitHub Desktop.
Ansible Playbook to install PHP7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Install Packages Needed To Compile PHP 7 | |
apt: pkg={{ item }} state=latest | |
with_items: | |
- git | |
- autoconf | |
- bison | |
- libxml2-dev | |
- libbz2-dev | |
- libmcrypt-dev | |
- libcurl4-openssl-dev | |
- libltdl-dev | |
- libpng-dev | |
- libpspell-dev | |
- libreadline6 | |
- libreadline6-dev | |
- name: Clone PHP7 | |
sudo: false | |
git: repo=https://git.php.net/repository/php-src.git dest=/home/vagrant/php-src | |
- name: Create a few directories | |
file: path=/etc/php7/{{ item }} recurse=true state=directory | |
with_items: | |
- conf.d | |
- cli/conf.d | |
- fpm/conf.d | |
- /usr/local/php7 | |
- name: Run buildconf | |
sudo: false | |
shell: ./buildconf | |
args: | |
chdir: /home/vagrant/php-src | |
- name: Configure the build. | |
sudo: false | |
shell: ./configure {{ php7_configure_string }} | |
args: | |
chdir: /home/vagrant/php-src | |
- name: Configure the cli build. | |
sudo: false | |
shell: ./configure {{ php7_cli_configure_string }} | |
args: | |
chdir: /home/vagrant/php-src | |
- name: Build PHP7 | |
sudo: false | |
shell: make | |
args: | |
chdir: /home/vagrant/php-src | |
- name: Install PHP7 | |
shell: make install | |
args: | |
chdir: /home/vagrant/php-src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php7_configure_string: --prefix=/usr/local/php7 --enable-bcmath --with-bz2 --enable-calendar --enable-exif --enable-dba --enable-ftp --with-gettext --with-gd --enable-mbstring --with-mcrypt --with-mhash --enable-mysqlnd --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-openssl --enable-pcntl --with-pspell --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-zlib --enable-zip --with-readline --with-curl | |
php7_cli_configure_string: --with-config-file-path=/etc/php7/cli --with-config-file-scan-dir=/etc/php7/cli/conf.d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment