Skip to content

Instantly share code, notes, and snippets.

@ckng
Last active December 22, 2015 15:18
Show Gist options
  • Save ckng/6490961 to your computer and use it in GitHub Desktop.
Save ckng/6490961 to your computer and use it in GitHub Desktop.
Install libmemcached, libevent and memcached
$ sudo aptitude install memcached libsasl2-dev libsasl2-2 sasl2-bin libsasl2-2 libsasl2-modules
# Install libevent 2.0.21
# may need "sudo apt-get install cloog-ppl"
$ wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
$ tar xvfz libevent-2.0.*-stable.tar.gz
$ cd libevent-2.0.*-stable
$ ./configure; make; make install
$ cd ../; rm -rf libevent-2.0.*-stable*
# Install current memcached git
git clone https://github.com/php-memcached-dev/php-memcached.git;
# NOTE: if compile error
# https://github.com/php-memcached-dev/php-memcached/issues/69#issuecomment-17051990
$ vi ./php-memcached/php_libmemcached_compat.h
typedef const struct memcached_server_st *memcached_server_instance_st;
$ cd php-memcached; phpize; ./configure; make; make install
# Install libmemcached 1.0.17
$ wget https://launchpad.net/libmemcached/1.0/1.0.17/+download/libmemcached-1.0.17.tar.gz
$ tar xvfz libmemcached-1.0.*.tar.gz; cd libmemcached-*
$ ./configure; make; make install
$ cd ../; rm -rf libmemcached-*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment