Use Magent + Memcached cache server cluster deployment in Linux
1. Compile and install libevent
Cd/root/soft_hhf/
Wget http://cloud.github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
Tar-xvf libevent-2.0.21-stable.tar.gz
Cd libevent-2.0.21-stable
./Configure -- prefix =/usr
Make & make install
Cd ../
2. Compile and install Memcached
Wget http://danga.com/memcached/dist/ memcached-1.2.6.tar.gz
Tar-zxvf memcached-1.2.6.tar.gz-C/usr/local cd/usr/local mv memcached-1.2.6 memcached
Cd memcached
./Configure -- with-libevent =/usr/local
Make install
ExportPKG_CONFIG_PATH = $ PKG_CONFIG_PATH:/usr/local/lib/pkgconfig3. compile and install Magent wget http://memagent.googlecode.com/files/magent-0.5.tar.gz cd/usr/local mkdir magent
Tar-zxf magent-0.5.tar.gz-C/usr/local/magent cd/usr/local/magent
/Sbin/ldconfig
Sed-I "s # LIBS =-levent-lm # g" Makefile
Vi magetn. c add: # ifndef SSIZE_MAX # define SSIZE_MAX 32767 # endif
Make
Cp magent/usr/bin/magent
. /Etc/init. d/iptables stop: the installation is complete. memched is the cache server and libevent is provided for I/O operations. Therefore, libevent must be installed, and Magent is the proxy server, the client connects to Magnet to achieve Server Load balancer and server backup so that when the server has a done server, the backup server can be enabled, and the data can be set to the server through the hash algorithm for routing addressing. 4. build a test. three memcached servers are provided to store data, and two memcached servers are provided to back up data. first, enable these five memcached servers. The ports are s1: 3333, s2: 4444, s3: 5555, b1: 6666, b6: 7777, And the start command is as follows: memcached-m 1-u root-d-l127.0.0.1-p 3333 indicates that the instance is successfully started, and the remaining four servers are started. The Magent Proxy Server magent-u root-n 51200-l 127.0.0.1-p 2222-s 127.0.0.1: 3333-s127.0.0.1: 4444-s127.0.0.1: 5555-B 127.0.0.1: 6666-B 127.0.0.1: 7777 at this point, the server cluster is successfully built 5. test: Use telent to connect to magent telnet 127.0.0.1 2222 stats to view the simple set and get status.
Install and configure Memcached source code in CentOS 6.6
Memcached installation and startup script
Performance problems of using Memcached in PHP
Install Memcached in Ubuntu and its command explanation
Install and apply Memcached
Use Nginx + Memcached's small image storage solution
Getting started with Memcached
For details about Memcached, click here
Memcached: click here
This article permanently updates the link address: