How to install Memcached service method in Linux

小云云
Release: 2018-03-06 09:57:12
Original
2002 people have browsed it

This article mainly shares with you how to install the Memcached service method in Linux. The installation of Memcached is based on the libevent environment, so when we install memcached, we first install the libevent environment.

Install libevent

Install libevent environment. The version 2.0.21 is used here.

Upload rz to the linux service, use

tar -zxvf libevent-2.0.21-stable.tar.gz

After decompression, rename to

mv libevent-2.0.21-stable.tar.gz libevent

Enter libevent

cd libevent

Configure the environment: At this time, the environment is placed under the libevent path under usr.

./configure -prefix=/usr/libevent

Execute

make && make install command

Environment configuration successful

Install memcached

Upload Rz to the linux server and decompress it

tar -zxvf memcached-1.5.6.tar.gz

Rename:

mv memcached-1.5.6.tar.gz memcached

cd Enter the decompressed memcached directory:

Execute the configuration command, also configure memcached under usr, the directory will not be automatically created.


Note that when creating a new one, the newly installed libevent environment will be used, so = is followed by the environment path

./configure --prefix=/usr/memcache/ --with-libevent=/usr/libevent

After configuring no error, execute

make


After no error is reported, execute

make install

The installation is successful.

ps –ef | grep memcached. Check the port number, not open.

Enable memcached.

Start memcached in daemon mode

/usr/memcache/bin/memcached-d -l 127.0.0.1 -p 11211 -m 2048 -u root

Check ps again –ef| grep memcached.

There is a process in use..

telnet test

telnet 127.0.0.1 11211, successful


Related recommendations:
Implementation steps of using memcached and xcache for PHP cache optimization

Ubuntu memcached installation and configuration method in php

Instance introduction of high-performance caching system (Memcached)

The above is the detailed content of How to install Memcached service method in Linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!