Linux next Memcache installation
Memcache is high performance. A distributed Memory object caching system for reducing database load in dynamic applications. Increase your access speed. At present, using memcache to solve large-user reading on the Internet is a popular way to use, which has been widely used in Internet enterprises.
about the specific introduction of memcache, interested friends please refer to this article: http://blog.csdn.net/xifeijian/article/details/21994941
1. Download Memcache
Wall crack recommended official download (http://memcached.org/). Right now. The latest download version number is 1.4.17,
After download. Upload it to Linux. Upload it here to the/root/src/,
?
Run tar zxvf memcached-1.4.17.tar.gz, below/root/src/. Will unzip out a memcached-1.4.17 folder.
Next, go to the memcached-1.4.17 folder and run the ./configure--prefix=/root/local/memcached-1.4.17 command, which indicates that the installation is in =/root/local/ memcached-1.4.17 folder,
Wait for the program configuration,
?
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqveglmzwlqawfu/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast "/>
Please check the Configure, if there is an error message, here is prompted to install libevent. So let's install Libevent first.
? Follow the prompts, download libevent and install, Libevent installation Step 3 steps:
1. Unpack the libevent package, tar zxvf libevent-2.0.4-alpha.tar.gz
2, enter the unpacked folder, run configure. /configure--prefix=/root/local/libevent2.0.4
3. Run make && make install
So far. Libevent installation is complete.
Then we continue to install memcache.
1. Go to memcached-1.4.17 folder and run ./configure--prefix=/root/local/memcache1.4.17--with-libevent=/root/local/ LIBEVENT2.0.4/
.......................................................................
Wait, found now configure time no longer error.
.......................................................................
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqveglmzwlqawfu/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast "/>
2. Run make && make install
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqveglmzwlqawfu/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast "/>
At this point, memcache even if installed, forced to want to start a memcache bar ~ ~
? Go to the Bin folder and run:./memcached-d-M 128-u root,?? Smooth, successful start.
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqveglmzwlqawfu/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast "/>
?
The memcached command often uses startup parameters such as the following:
#/root/local/bin/memcached-d-M 200-u root-l 192.168.1.91-p 9023-c 256-p/tmp/memcached.pid
Relevant explanations such as the following:
The-D option is to start a daemon,
-M is the amount of memory allocated to Memcache, in megabytes, 200MB
-U is the user running memcache, assuming that the current is root, you need to use this parameter to specify the user.
-L is the ServerIP address of the listener, assuming that there are multiple addresses, I specify the IP address of the server here 192.168.1.91
-P is the port where Memcache is set to listen, I set the 9023 here. Preferably a port above 1024.
The-c option is the maximum number of concurrent connections to run. The default is 1024. Set up here for 256
-P is set to save memcache PID file, I am here to save in/tmp/memcached.pid
Stop the memcache process: Kill ' cat/tmp/memcached.pid '. We can also start multiple daemons, but the port cannot be duplicated.
Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.
MEMCAHCE (MC) series (two) Linux next memcache installation