In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
With regard to the high-performance distributed memory object caching system Memcached, we mentioned "how to install memcached on windows" in another article. This time, let's take a look at how to install Memcached and PHP Memcached extensions in Centos systems.
i. Install Memcached
1. Install the dependency package libevent
Memcached depends on the libevent library, so you may need to execute the
Yum install libevent-devel
two。 Install memcached
Download the latest source version from http://memcached.org/, which is (1.4.23)
Tar-xzvf memcached-1.4.23.tar.gz cd memcached-1.4.23. / configure-- prefix=/usr/local/memcache make & & make install
3. Configure memcached self-startup
To copy scripts/memcached.sysv to / etc/init.d/memcached under the source code directory, you need to modify / etc/init.d/memcached as shown below:
Chown $USER / usr/local/memcache/bin/memcached daemon / usr/local/memcache/bin/memcached-d-p $PORT-u $USER-m $CACHESIZE-c $MAXCONN-P / var/run/memcached/memcached.pid $OPTIONS
(that is, modify the path where memcached is located)
Then execute the following command:
Chmod 755 memcached chkconfig-add memcached
Start the service using the following directive
Service memcached start
ii. Install the PHP Memcahced extension
Pecl.php.net has two memcache extensions:
Memcache memcached extensionmemcached PHP extension for interfacing with memcached via libmemcached library
The version of memcached is relatively new and uses the libmemcached library. Libmemcached is considered to have been better optimized and should have higher performance than the php only version of memcache. So memcached is installed here (assuming php5.4 is already installed in / usr/local/php).
1. Install dependent libraries
Https://launchpad.net/libmemcached/1.0/1.0.4/+download/libmemcached-1.0.4.tar.gz
Tar-xzvf libmemcached-1.0.4.tar.gz cd libmemcached-1.0.4. / configure make make install
two。 Install memcached
Download http://pecl.php.net/get/memcached-2.0.1.tgz and install it using the following instructions:
Tar vxzf memcached-2.0.1.tgz cd memcache-2.0.1 phpize. / configure-enable-memcache-with-php-config=/usr/local/php/bin/php-config make make install
After the installation is complete, find the generated memcached.so in that directory according to the directory path indicated by the last display of Installing shared extensions: / usr/local/***, and copy it to the directory pointed to by php.ini 's extension_dir. Modify the php.ini to add the line extension = memcached.so to restart apache, and then open the phpinfo information page on the page to see if the memcached extension has been installed successfully.
Of course, we can also write a short piece of test code to see if memcached is running properly. For details, please refer to the article on how to install memcached under windows system.
Summary
The above is the whole content of this article. I hope the content of this article has a certain reference and learning value for everyone's study or work. Thank you for your support. If you want to know more about it, please see the relevant links below.
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.