CentOS under source code compilation installation memcached

Source: Internet
Author: User
Tags memcached

Preparation of a compilation environment

---------------------------------------------------------------------------------------------------------

Yum Install GCC
Yum Install gcc-c++ Libstdc++-devel
Yum Install Zlib-devel

Second, the source package preparation
Download memcached source Package memcached-v1.4.25.
wget http://www.memcached.org/files/memcached-1.4.25.tar.gz

In addition, Memcache used the libevent this library for socket processing, so you also need to install Libevent
wget https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz

Three, installation and configuration

1. Compile and install Libevent
./configure--PREFIX=/USR
Make & make Install

To test whether the Libevent was installed successfully:
Ls-al/usr/lib | grep libevent

2, install memcached, also need to install in the specified Libevent installation location
./configure--WITH-LIBEVENT=/USR
Make & make Install

To test whether memcached is installed successfully:
ls-al/usr/local/bin/mem*

3. Open memcached Daemon
---------------------------------------------------------------------------------------------------------

memcached-d-U Root

---------------------------------------------------------------------------------------------------------

#连接参数

-P Listening Port

-L connected IP address, default is native

-D Start Memecache service

-D Restart Restart

-D stop|shutdown Shutdown service

-D Install installation

-D Uninstall Uninstall

-U Run as identity only valid under root

-m maximum memory usage, unit MB, default 64MB, Max 2G

-M error returned when memory is exhausted

-c Maximum number of simultaneous connections, default is 1024

-F Block Size growth because the default is 1.25

-N Minimum allocated space, key+value+flags default 48

-H Display Help

4. Use Telnet connection to test whether the installation was successful

---------------------------------------------------------------------------------------------------------
telnet localhost 11211

#直接按回车会出现客户端错误.
Quit #退出

---------------------------------------------------------------------------------------------------------

At this point, the memcached installation is complete.

CentOS under source code compilation installation memcached

Related Article

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.