Download and install Memcached server yuminstalllibevent-develwgethttp: memcached.googlecode.comfilesmemcached-1.4.5.tar.gztar-zxvfmemcached-1.4.5.tar.gz. configure -- prefixusrlocalmemcached -- buildi686-pc-linux-gnu this step will see a lack of GCC download and install Me
McAch
EdServer
- Yum install libevent-devel
- Wget http://memcached.googlecode.com/FileS/memcached-1.4.5.tar.gz
- Tar-zxvf memcached-1.4.5.tar.gz
- ./Configure -- prefix =/usr/local/memcached -- build = i686-pc-linux-gnu
GCC is missing in this step.
- Yum install gcc
- ./Configure -- prefix =/usr/local/memcached
- Make
- Make install
AddPHPMemcache Extension
- Yum installPhp-Pecl-memcache
- Yum install zlib-devel
- Pecl install memcache
Add"ExTension = memcache. so"
Start Memcached Service
- Memcached-d-m 512-l 127.0.0.1-p 11211-u root
Appendix:
Memcached-d-m 10-u root-l 192.168.40.4-p 12000-c 256-P/tmp/memcached. pId(Complete startup)
Memcached-d-m 1024-u root-p 55001-c 2048 (started by default)
Parameter description:
-D option is to start a daemon
-M indicates the amount of memory allocated to Memcache. The unit is MB. Here is 10 MB.
-U is the user who runs Memcache. Here I am the root user.
-L is the IP address of the listener server.
-P is the port used to set Memcache listening, preferably over 1024.
-The c option is the maximum number of concurrent connections running. The default value is 1024, Which is set based on the load of your server.
-P is the pid file for saving Memcache.
-Vv debugging mode