memcached Linux Installation

Source: Internet
Author: User
Tags memcached

Installation of memcached

1) First download libevent-1.4.14b-stable.tar.gz and memcached-1.4.7.tar.gz source package, the former is the latter's dependency package, is an event-driven package.

2) The installation is very smooth, or the classic few compiled installation commands:

1.tar ZXVF libevent-1.4.14b-stable.tar.gz

2.CD libevent-1.4.14b-stable

3../configure--prefix=/usr/local/libevent-1.4.14b

4.make

5.make Install

6.

7.tar ZXVF memcached-1.4.7.tar.gz

8.CD memcached-1.4.7

9../configure--prefix=/usr/local/memcached-1.4.7--with-libevent=/usr/local/libevent-1.4.14b/

10.make 11.make Install

3) Start memcached:

./bin/memcached-d-M 256-u root-p 11211-c 1024-p/tmp/memcached.pid



#cd/usr/local/bin//Enter into the directory

#./memcached-d-M 900-u root-l 192.168.100.186-p 11211-c 256-p/tmp/memcached.pid//start memcached start parameter description:

Start parameter Description:
The-D option is to start a daemon,
-M is the amount of memory allocated to Memcache, in megabytes, default 64MB

-M return error on memory exhausted (rather than removing items)
-U is the user running memcache, and if it is currently root, you need to specify the user with this parameter.
-L is the server IP address of the listener, which defaults to all network cards.
-P is the port that sets the TCP listener for memcache, preferably a port above 1024
The-c option is the maximum number of concurrent connections that are running, by default 1024
-P is a PID file that is set to save Memcache

-F <factor> Chunk size growth factor (default:1.25)

-I Override the size of each slab page. Adjusts max item size (new 1.4.2 version)

You can also start multiple daemons, but the ports cannot be duplicated

To stop the memcache process:
Kill ' Cat/tmp/memcached.pid '


Linux, the installation of the source code generally consists of 3 steps: Configuration (Configure), compile (make), install (makes install)

Configure--prefix--with is used in the process, where--prefix refers to the installation path,--with refers to the library file on which the installation of this file depends

-----------

When installing httpd, specify the installation and use the ./Configure--prefix

Specific explanation:. Represents the current directory. / is a directory separator character. Together, it's the current directory.

Specify the installation path
If you do not specify prefix, the executable file is placed by default in/usr/local/bin, and the library file is placed by default in/usr/local/lib, and the configuration file is placed by default in/usr/local/etc. Other resource files are placed in the/usr/local/share.

You want to uninstall this program, either in the original make directory with the made uninstall (if the make file specified uninstall), or go to the above directory to delete the relevant files by hand.
Specify prefix, delete a folder directly is enough.

(Configure the installation path as the root directory.) After you run make and makes install, you can find the installed files in the root directory. )


memcached Linux Installation

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.