Use Magent + Memcached cache server cluster deployment in Linux

Source: Internet
Author: User

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.