Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install memcached extension for php on centos system

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "centos system how to install memcached extension for php" related knowledge, editor through the actual case to show you the operation process, the method of operation is simple and fast, practical, I hope that this "centos system how to install memcached extension for php" article can help you solve the problem.

1. Install via yum

The copy code is as follows:

Yum-y install memcached

# execute after installation:

Memcached-h

# the memcached help message indicates that the installation is successful

two。 Join the startup service

The copy code is as follows:

Chkconfig-level 2345 memcached on

3. Configure memcached

The copy code is as follows:

Vim / etc/sysconfig/memcached

# the contents of the file are as follows, which can be modified as needed:

Port= "11211" # port

User= "root" # user name

Maxconn= "1024" # Max connections

Cachesize= "64" # memory size

Options= "" # additional parameters

4. Install libmemached

The copy code is as follows:

Wget https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz

Tar-zxvf libmemcached-1.0.16.tar.gz

Cd libmemcached-1.0.16

. / configure-prefix=/usr/local/libmemcached-with-memcached

Make & & make install

5. Install php-devel

The copy code is as follows:

Yum install php-devel

6. Install the php memcached extension

The copy code is as follows:

Wget http://pecl.php.net/get/memcached-2.1.0.tgz

Tar-zxvf memcached-2.1.0.tgz

Cd memcached-2.1.0

/ usr/local/php/bin/phpize

. / configure-enable-memcached-with-php-config=/usr/local/php/bin/php-config-with-zlib-dir-with-libmemcached-dir=/usr/local/libmemcached-prefix=/usr/local/phpmemcached

Make & & make install

This is the end of the introduction to "how the centos system installs memcached extensions for php". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report