Prerequisite Preparation:
1. Memcached is currently the latest version: 1.4.22, can be downloaded from the official website.
2. memcached relies on libevent, so you need to install libevent before installing memcached.
2.1 Run the following command to see if the system has libevent installed.
[Email protected] ~]# Rpm-qa|grep libeventlibevent-headers-1.4.13-4.el6.noarchlibevent-1.4.13-4.el6.x86_ 64libevent-doc-1.4.13-4.el6.noarchlibevent-devel-1.4.13-4.el6.x86_64
Installation process:
3. Upload the downloaded file to/opt/favccxx and run the following command to unzip it.
[Email protected] favccxx]# TAR-ZXVF memcached-1.4.22.tar.gz
4. Run [[email protected]ck favccxx]# cd memcached-1.4.22 and switch to the memcached directory.
5. Run [[email protected] memcached-1.4.22]# ./configure && make && make test &am p;& sudo make install , one click to complete the installation.
6. Running[email protected]bin]# ./memcached-u Root,start memcached. memcached Default boot port is: 11211. You can also pass[[email protected]bin]# ./memcached-p 12306-u Root , change the default port number to start. If you want the memcache process to still run when the window is closed, you need to add-D to the command to indicate that it starts with the daemon.
7. memcached commands can be viewed by [[email protected] bin]# ./memcached-h . Here are some common commands.
-D: Start a daemon,-M: The amount of memory allocated to Memcache, in megabytes, by default 64mb,-u: The user running Memcache-L: The server IP address of the listener-P: Set the port for Memcache listening, default is 11211 Note:-P (p is lowercase)-C: Sets the maximum number of concurrent connections, default is 1024
8. At this point, memcached installation is complete, then you can experience memcached.
This article is from the "This person's IT World" blog, be sure to keep this source http://favccxx.blog.51cto.com/2890523/1626776
Install memcached under Linux