Notes on installing memcached in Linux

Source: Internet
Author: User
1. Compile and install libevent2. compile and install Memcached. When I write this article, libevent has 1.4.8 stable version and MemcachedServer has 1.3.0 version. This article takes the two versions as an example. My gcc is gccversion3.3.4 (Debian1: 3.3.4-7 ). First install libeventwgethttp: www.monkey.org

1. Compile and install libevent
2. Compile and install MeMcAchEd
When I wrote this article, libevent has a stable version of 1.4.8.
, Memcached Server already has version 1.3.0
. This article takes these two versions as an example. My gcc is gcc version 3.3.4 (Debian. 3.4-7 ).
First install libevent
Wget http://www.monkey.org /~ Provos/libevent-1.4.8-stable.tar.gz
Tar zxvf libevent-1.4.8-stable.tar.gz

CdLibevent-1.4.8-stable
./Configure-prefix =/usr specifies to install in/usr. At first, I did not specify the installation directory, causing libevent to be installed in/usr/local/lib. As a result, the libevent library cannot be found after Memcached is installed, even if the path is manually specified.
Make & make install
Make clean
Then install Memcached Server
Wget http://www.danga.com/memcached/dist/memcached-1.3.0.tar.gz
Tar zxvf memcached-1.3.0.tar.gz
Cd memcached-1.3.0/
./Configure -- with-libevent =/usr here you need to specify the libevent path
Make & make install
Make clean
Compilation and installation are complete in the twinkling of an eye.
Test whether Memcached is successfully installed:
/Usr/local/bin/memcached-d-m 10-u root-l 192.168.0.200-p 12000-c 256-P/tmp/memcached. pId
If no error message is displayed, it indicates that the Memcached service has been successfully installed and started.
Memcached basic description:
Startup parameters:
-D option is to start a daemon,
-M indicates the amount of memory allocated to Memcache. The unit is MB.
-U is the user who runs Memcache.
-L is the IP address of the listener server.
-P is the port used to set Memcache listening.
-The c option is the maximum number of concurrent connections. The default value is 1024.
-P is the pid file for saving Memcache.
Use the following statement to end the Memcached process:
Kill'Cat/Tmp/memcached. pid '......

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.