Installation of memcached under Linux memcached knowledge finishing

Source: Internet
Author: User
Tags memcached

1, ready to install software memcached and libevent (I am the latest version under the official website libevent-2.0.21-stable.tar.gz and memcached-1.4.21.tar.gz)

2, Installation Libevent

1) Unzip the file

TAR-ZXVF libevent-2.0.21-stable.tar.gz

2) Specify the installation path

./configure--prefix=/opt/

3) Installation

Make

Make install

  4) test whether the installation is successful

Ls-al/opt/lib | grep libevent

3, installation memcached

1) Unzip the file

TAR-ZXVF memcached-1.4.21.tar.gz

2) specify Libevent path

./configure--with-libevent=/opt/

  3) Installation

Make

Make install

The memcached will be automatically placed on the/usr/local/bin/memcached after installation is complete.

4) test whether the memcached is installed successfully

ls-al/usr/local/bin/mem*

5) Start memcached service

    /usr/local/bin/memcached-d-M 10-u root-l 192.168.20.149-p 11211-c 256-p/tmp/memcached.pid

The-D option is to start a daemon,
-M is the amount of memory allocated to Memcache, in megabytes, I'm 10MB,
-U is the user running memcache, I am root here,
-L is the server IP address of the listener, if there are multiple addresses, I specify the server IP address 192.168.20.149,
-P is the port that sets Memcache listening, I set here 11211, preferably more than 1024 ports,
The-c option is the maximum number of concurrent connections to run, the default is 1024, I set the 256 here, according to the load of your server to set,
-P is set to save memcache PID file, I am here to save in/tmp/memcached.pid

  6) Stop memcached

Kill ' Cat/tmp/memcached.pid '

  

  

Installation of memcached under Linux memcached knowledge finishing

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.