17/12/2015 - LINUX, MAC, MEMCACHED
If you ever get such permission errors as shown below, grant correct permission by running command as show below again.
Could not symlink lib/pkgconfig/libevent.pc
/usr/local/lib/pkgconfig is not writable.
Mac:football inanzzz$ sudo chown inanzzz /usr/local/lib/pkgconfig
# Then try to link failed library with:
Mac:football inanzzz$ brew link libevent
Linking /usr/local/Cellar/libevent/2.0.22... 25 symlinks created
# Install main memcached api
Mac:football inanzzz$ brew install memcached
# List all memcached related packages: "php56-memcached" and "libmemcached"
Mac:football inanzzz$ brew search memcached
# Install one from the list which will automatically install "libmemcached" as well
Mac:football inanzzz$ brew install php56-memcached
# Run "brew search memcached" again, if "libmemcached" is not installed then install manually
# Enable memcached extension in php.ini (path below depends on your OS)
Mac:football inanzzz$ sudo nano /usr/local/php5/lib/php.ini
extension = memcached.so
# Run memcached as a deamon and restart apache
Mac:football inanzzz$ memcached -d
Mac:football inanzzz$ sudo apachectl restart
See other posts in this blog that are related to memcached where you'll find more testing options.
# Connect to memcached
Mac:football inanzzz$ telnet 127.0.0.1 11211
Connected to localhost.
Escape character is '^]'.
# Terminate connection
Connection closed by foreign host.
# Check version