linux yum install memcached and extensions


Find related packages
#yum search memcached

Now you can install it
#yum -y install --enablerepo=rpmforge memcached Enter the installation package of your choice here

View
#php -m|grep memcached
 
settings boot start
#chkconfig memcached on

start memcached
#service memcached start

 

Let me say here that memcached and memcache are different, and the connection methods are also different.

$memcache = new Memcache;             //创建一个memcache对象
$memcache->connect('localhost', 11211)
$memcached = new Memcached;             //创建一个memcached对象
$memcached->addServer('localhost', 11211)

This place needs attention

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325180023&siteId=291194637
Recommended