1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
#!/bin/bash
set -euo pipefail
version=$MEMCACHED_VERSION
sudo apt-get -y remove memcached
sudo apt-get install libevent-dev
echo Installing Memcached version ${version}
# Install memcached with TLS support
wget https://memcached.org/files/memcached-${version}.tar.gz
tar -zxvf memcached-${version}.tar.gz
cd memcached-${version}
# Manual patch so 1.5 will compile
if [[ -f "../memcached_${version}.patch" ]]; then
patch -p1 < "../memcached_${version}.patch"
fi
./configure --enable-tls
make
sudo mv memcached /usr/local/bin/
echo Memcached version ${version} installation complete
|