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: