Install and use Memcache
I. Resource download
You must install libevent before installing memcached.
Bytes
Decompress the two installation packages to the installation directory (the installation directory is determined by yourself)
Ii. Install libevent
1. Enter the libevent installation directory.
2. Run the following command to install
./Configure
Make
Make install
Note: To make errors, you must install the missing items. For details, refer to the error message after make.
3. Install memcached
Go to its installation directory and run the following command:
./Configure
Make
Make install
4. Start memcached (there are many ways to start memcached online. below is what I have successfully verified)
1. Start
./Memcached-d-c 10240-m 1024-u root
2. view the running status
Ps-ef | grep memcached
5. Connect to memcatched
1. The centos server in the lab probably does not have telnet installed. Therefore, you need to install telnet before connecting to memcatched.
Telnet Installation Reference http://blog.csdn.net/mi_mang/article/details/4605787
2. Connect to memcated
Telnet local host 11211
The status shown in if the request is successful
Now, you can perform basic memcached commands.
6. Disable memcached
Kill [service No.] // view service No. From the running status
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.