Skip to content

Instantly share code, notes, and snippets.

@maorpolak
Created June 10, 2018 11:18
Show Gist options
  • Save maorpolak/a606e4538068097f4f63eb947d8d2456 to your computer and use it in GitHub Desktop.
Save maorpolak/a606e4538068097f4f63eb947d8d2456 to your computer and use it in GitHub Desktop.
Install Memcached for MAMP on macOS
1. Install libmemcached with brew:
> brew install libmemcached
2. Install memcached with brew or pecl:
- > brew install memcached / pecl install memcached*
- When prompted for the libmemcached directory, press 'Enter' and the installer will automatically find it.
3. Add the following extensions to your php.ini file:
- > sudo vim /Applications/MAMP/bin/php/php7.2.1/conf/php.ini (replace your PHP version as necessary)
- Add 'extension=igbinary.so' to the file
- Add 'extension=memcached.so' to the file
4. Restart your Apache server (use the MAMP GUI to stop & start the server)
5. Start memcached with brew:
> brew services start memcached
* If the pecl installation gives you an error related to zlib, run `xcode-select --install`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment