Skip to content

Instantly share code, notes, and snippets.

@ddelizia
Last active August 6, 2018 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ddelizia/cf8644900ceadb519e5595a0b0817def to your computer and use it in GitHub Desktop.
Save ddelizia/cf8644900ceadb519e5595a0b0817def to your computer and use it in GitHub Desktop.
Installing php on mac osx and homebrew
xcode-select --install
echo '****Installing Apache httpd'
brew install httpd
echo '****Installing Php 5.6 and 7.2'
brew install php@5.6
brew install php@7.2
echo '****Installing mariadb'
brew install mariadb
echo '****Personalizing httpd.conf'
curl -L https://gist.githubusercontent.com/ddelizia/b8490cde57b6304b24a4536c8527f180/raw/ > /usr/local/etc/httpd/httpd.conf
echo '****Restart apache'
sudo brew services restart httpd
echo '****Installing sphp for switching php version'
curl -L https://gist.githubusercontent.com/rhukster/f4c04f1bf59e0b74e335ee5d186a98e2/raw > /usr/local/bin/sphp
chmod +x /usr/local/bin/sphp
echo '****Installing xdebug'
sphp 7.2
pecl uninstall -r xdebug
pecl install xdebug
echo '****Installing dnsmasq'
brew install dnsmasq
sudo brew services start dnsmasq
sudo mkdir -v /etc/resolver
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/test'
echo '****Installing composer'
curl -sS https://getcomposer.org/installer | php
@ddelizia
Copy link
Author

ddelizia commented Aug 5, 2018

To run this gist execute the following command on the terminal:

curl -L  https://gist.github.com/ddelizia/cf8644900ceadb519e5595a0b0817def/raw/ | sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment