Install MemCached in Linux

Source: Internet
Author: User

Install MemCached in Linux

Prerequisites:

1. The latest version of MemCached is 1.4.22. You can download it from the official website.

2. MemCached depends on libevent. Therefore, you must install libevent before installing MemCached.

2.1 run the following command to check whether the system has installed libevent.

[Root @ SecurityCheck ~] # Rpm-qa | grep libevent
Libevent-headers-1.4.13-4.el6.noarch
Libevent-1.4.13-4.el6.x86_64
Libevent-doc-1.4.13-4.el6.noarch
Libevent-devel-1.4.13-4.el6.x86_64

Installation Process:
 
3. Upload the downloaded file to/opt/favccxx and run the following command to decompress the package.

[Root @ SecurityCheck favccxx] # tar-zxvf memcached-1.4.22.tar.gz

4. Run the [root @ SecurityCheck favccxx] # cd memcached-1.4.22 and switch to the memcached directory.

5. Run the [root @ SecurityCheck memcached-1.4.22] #./configure & make test & sudo make install, one-click installation.

6. Run root @ SecurityCheck bin] #./memcached-u root to start MemCached. The default start port of MemCached is 11211. You can also use [root @ SecurityCheck bin] #./memcached-p 12306-u root to change the default port number. If you want to close the window and the memcache process is still running, add-d to the command to start it as a daemon.

7. Common MemCached commands can be viewed through [root @ SecurityCheck bin] #./memcached-h. Below are some common commands.

-D: Start a daemon process,
-M: The amount of memory allocated to Memcache. The unit is MB. The default value is 64 MB,
-U: the user who runs Memcache
-L: IP address of the listener server
-P: Set the Memcache listening port. The default value is 11211. Note:-p (p is in lower case)
-C: set the maximum number of concurrent connections. The default value is 1024.

8. Now, after installing MemCached, you can try MemCached.

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.