

- Php mysql for mac install#
- Php mysql for mac download#
- Php mysql for mac free#
- Php mysql for mac mac#
brew install -v php55 -homebrew-apxs -with-apacheĪdd PHP configuration to Apache’s nf file. This command will also load the PHP module in the nf file for you. PHP 5.3 needs an additional tap, so skip the second command if you are using 5.4 or higher. Start by adding the PHP tap for Homebrew. They will be posted below after the instructions for newer versions.) (Note: if you use 5.3, the OpCache extension instructions are different. If you’d like to use 5.3, 5.4 or 5.6, simply change the “5.5” and “php55” values below appropriately. The following is for the latest release of PHP, version 5.5. sudo launchctl load -w /Library/LaunchDaemons/co. This file will be loaded on login and set up the 80->8080 port forward, but we can load it manually now so we don’t need to log out and back in. read /Users/`whoami` NFSHomeDirectory | awk -F": " 'ipfw add fwd 127.0.0.1,8080 tcp from any to me dst-port 80 in & sysctl -w .forwarding=1 We’ll be using the file ~/Sites/nf to configure our VirtualHosts, so we create necessary directories and then include the file in nf. brew install -v httpd22 -with-brewed-openssl We’ll install Apache 2.2 with Apr and OpenSSL from Homebrew as well instead of utilizing the built-in versions of those tools. brew install -v mysqlĬp -v $(brew -prefix mysql)/support-files/my-default.cnf $(brew -prefix mysql)/my.cnfĬat > $(brew -prefix mysql)/my.cnf /dev/nullĪpache is not in the default repository of Homebrew formulas, nor are some dependencies, so we use the brew tap command to add other formula repositories.
Php mysql for mac download#
The following commands will download and install the latest version of MySQL and do some basic configuration to allow for large imports and a couple other miscellaneous configuration changes. The following command adds logic to your ~/.bash_profile to ensure the Homebrew directory is in the beginning of $PATH. Since OS X already comes with PHP and Apache, we’ll want to make sure that our brew-installed versions appear in the shell path before the built-in ones.
Php mysql for mac free#
If you’ve not already install Homebrew, you can follow the instructions at brew.sh, or simply run the following command: ruby -e "$(curl -fsSL )"Īlso of note, if you do not have git available on your system, either from Homebrew, Xcode, or another source, you can install it with Homebrew now (if you already have it installed, feel free to skip this step to keep the version of git you already have): brew install -v git use Homebrew exclusively for all components.


Since then, the community around Homebrew has improved dramatically and I now recommend that our developers at Echo & Co. The OS X operating system comes with Apache and PHP pre-installed, and I’ve previously recommended utilizing them to some degree for getting a local PHP development environment on your Mac. We also configure PHP and MySQL to allow for enough flexibility for complex operations generally only reserved for development and not production. You’ll also be able to use xip.io with auto-VirtualHosts for accessing your sites on other devices in your local network. We’ll also use DNSMasq and Apache’s VirtualDocumentRoot to set up “auto-VirtualHosts,” and add a firewall rule to allow the default http port 80 to be used without running Apache as root.Īt the conclusion of this guide, you’ll be able to create a directory like ~/Sites/project and access it at without editing your /etc/hosts file or editing any Apache configuration. This guide will walk you through using Homebrew to install Apache, PHP, and MySQL for a “MAMP” development environment.
Php mysql for mac mac#
There’s nothing quite like setting up everything on your Mac for Drupal (or other PHP) development in a way that things just work and don’t need constant fiddling.
