Memcached supports many platforms: Linux, FreeBSD, Solaris, Mac OS, and can also be installed on Windows.
Linux system installation memcached first install the libeventlibrary
sudo apt-get install libevent ibevent-dev Automatic download and installation(Ubuntu/Debian)
yum install libevent libevent-devel Automatic download and installation(Redhat/Fedora/Centos)
1.2.1. Install Memcached ¶
Automatic installation ¶
Ubuntu/Debian
sudo apt-get install memcached
Redhat/Fedora/Centos
yum install memcached
FreeBSD
portmaster databases/memcached
After installation, you can use whereis view the path to the command:
whereis memcached
It is found that the installation location is /usr/bin/memcached .
1.2.2. Source code installation ¶
Download from its official website ( http://memcached.org ) memcached thelatest version.
wget http://memcached.org/latest Downloading the latest version
tar -zxvf memcached-1.x.x.tar.gz Decompression source code
cd memcached-1.x.x Enter directory
./configure --prefix=/usr/local/memcached configuration
make && make test compile
sudo make install install
1.2.3. Memcached running ¶
Memcached the operation of the command:
$ /usr/local/memcached/bin/memcached -h command help