In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
In many large websites or information sites often have a large number of queries, then in order to reduce the pressure on the database there is a cache system, now more popular cache system has a lot, such as memcache, Xcache, etc., here is a simple talk about the open source memcache simple deployment and use.
The use of memcache depends on the libevent network library, so you must install libevent network library before installing memcache, where stable binary packages are available for download on both websites. libevent official website: http://libevent.org/, memcache official website: http://memcached.org/
[root@localhost src]# tar -zxvf libevent-2.1.8-stable.tar.gz[root@localhost src]# tar -zxvf memcached-1.4.34.tar.gz[root@localhost src]# cd libevent-2.1.8-stable[root@localhost libevent-2.1.8-stable]# ./ configure --prefix=/usr/local/libevent[root@localhost libevent-2.1.8-stable]# make && make install[root@localhost libevent-2.1.8-stable]# cd ../ memcached-1.4.34[root@localhost memcached-1.4.34]# ./ configure --prefix=/usr/local/memcached--with-libevent=/usr/local/libevent[root@localhost memcached-1.4.34]# make && make install#Actually at this point the basic installation is complete, But it's better to configure the environment [root@localhost memcached-1.4.34]# cd /usr/local/[root@localhost local]# ln -sv /usr/local/libevent/include/* /usr/include/#Add lib and include[root@localhost local]#ln -sv /usr/local/memchached/include/* /usr/include/[root@localhost local]# cd /etc/ld.so.conf.d/[root@localhost ld.so.conf.d]# vim libevent.conf/usr/local/libevent/lib[root@ localhost ld. so.conf.d]# ldconfig[root@localhost ld.so.conf.d]# cd /etc/ld.d/#environmental path to add bin file [root@localhost profile.d]# vim libevent.shexport PATH=$PATH: /usr/local/libevent/bin[root@localhost profile.d]# source libevent.sh[root@localhost profile.d]# vim memcache.sh export PATH=$PATH:/usr/local/memchached/bin[root@localhost profile.d]# source memcache.sh
Thus, the server-side deployment of memcache is completed. Here are the common parameters of memcache:
-d: Start with daemon-m: Allocate memcache memory in megabytes, default is 64M-u: Determine memcache startup user only when root is user-p: Specify memcache listening port with tcp port, default is 11211-U: Specify memcache listening port with udp port, default is 11211, 0 means off-c: Specify pid file when deamon mode of-d is used-s: Specify socket file to listen on, use this option to disable network support-a: Determine socket file file mask when socket is used to listen on file, default is 0700-l: Determine memcache server listening ip
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.