$ brew install autoconf automake gmp homebrew/versions/bison27 gd freetype t1lib gettext zlib mcrypt
$ git clone --depth=1 https://github.com/php/php-src.git
$ cd php-src
| tree ansible-deploy/ | |
| config/ | |
| dev-aws.ansible.cfg | |
| live-aws.ansible.cfg | |
| group_vars/ | |
| dev | |
| staging | |
| live | |
| host_vars/ |
| #!/bin/sh -e | |
| # | |
| # You can run this script directly from github as root like this: | |
| # curl -sS https://gist.githubusercontent.com/fabiorphp/a94e0ea2558b3d10185d6d69d053c2b2/raw/configure_docker0.sh | sudo bash -s - 172.31.0.21/16 | |
| # | |
| # * Make sure you replace "192.168.254.0/24" with the network that you want to use | |
| # | |
| # NOTE: This script is intended for Debian / Ubuntu only! | |
| if [ $# -lt 1 ]; then |
I recently got a new Macbook Pro and wanted to document how I setup my PHP environment. I like full control of how PHP is built and I usually build it from source. I do this because I often add custom extensions and modules not found in the common PHP OSX installers. If your looking for a easier method than building from source try https://php-osx.liip.ch/.
NOTE: This post assumes you are running a fresh install of MacOS Sierra 10.12.2 with System Integrity Protection disabled. If you don't know how to disable it just boot into recovery mode and open a terminal and type
csrutil disable, or google search it :) This post also assumes you are using Zsh instead of Bash shell. If you are using Bash you can replace anytime you see~/.zshrcwith~/.bashrc.
First lets get some of the prerequisites. Start by grabbing the command line tools neccessary:
xcode-select --install| #!/bin/bash | |
| if [ ! -x /usr/bin/curl ]; then | |
| echo "Please install curl" | |
| exit 1 | |
| fi | |
| if [ ! -x /usr/bin/jq ]; then | |
| echo "Please install jq" | |
| exit 1 |
| import logging | |
| import os | |
| import time | |
| import traceback | |
| # pip install slackclient | |
| from slackclient import SlackClient | |
| --- | |
| # This has been tested with ansible 1.3 with these commands: | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false" | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true" | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts" | |
| # NB: The type of the variable is crucial! | |
| - name: Ansible Conditionals Examples | |
| hosts: $hosts | |
| vars_files: |
| <?php | |
| namespace Rua; | |
| class Mae | |
| { | |
| public function darBronca() | |
| { | |
| return 'mae dando bronca na rua' . PHP_EOL; | |
| } |
| Edgar R. Sandi | |
| @edgarsandi | |
| edgar.r.sandi@gmail.com | |
| lk/edgar.r.sandi | |
| fb/edgar.r.sandi | |
| Oracle Essencial | |
| 24h | |
| 6 aulas |