Last active
August 6, 2018 16:19
-
-
Save ddelizia/cf8644900ceadb519e5595a0b0817def to your computer and use it in GitHub Desktop.
Installing php on mac osx and homebrew
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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To run this gist execute the following command on the terminal: