Linux memcached Installation

Source: Internet
Author: User
Tags configuration php memcached zend

To prepare the installation package:

libevent-2.0.21-stable.tar.gz//memcached Server-side dependency packages

memcached-1.4.29.tar.gz//memcached Service Side

Libmemcached-1.0.18.tar.gz//memcached Extended Dependency Package

Memcached-2.2.0.tgz//php's memcached extension

1, installation Libevent

[Email protected] src]#Tar-ZXVF libevent-2.0. +-stable.Tar. Gz[[email protected] src]# CD libevent-2.0. +-Stable[[email protected] libevent-2.0. +-stable]#./configure--prefix=/usr/local/Libevent[[email protected] libevent-2.0. +-stable]# Make[email protected] libevent-2.0. +-stable]# Make Install

2, install memcached service side

[Email protected] src]#Tar-ZXVF memcached-1.4. in.Tar. gz [[email protected] src]# CD memcached-1.4. in[email protected] memcached-1.4. in]#./configure--prefix=/usr/local/memcached--with-libevent=/usr/local/Libevent[[email protected] memcached-1.4. in]# Make[email protected] memcached-1.4. in]# Make Install

3. Start memcached Service

 the 11211 1024x768 -p/tmp/memcached.pid

The-D option is to start a daemon,
-M is the amount of memory allocated to Memcache, in megabytes.
-U is the user running memcache.
-L is the server IP address of the listener, I do not fill it here.
-P is the port that sets Memcache listening.
The-c option is the maximum number of concurrent connections to run, which defaults to 1024 and is set according to the amount of load on your server.
-P is a PID file that is set to save Memcache.

4, install the memcached extension of the dependency package

tar -zxvf libmemcached-1.0. . Tar . Gz[[email protected] src]# CD libmemcached-1.0.  - [email protected] libmemcached-1.0. ) #./configure--prefix=/usr/local/libmemcached--with-memcached=/usr/local/memcached/bin/memcached[[email Protected] libmemcached-1.0.  -  Make

Make occurs when:./libtool:line 1125:g++: Command not found error

Yum Install GCC gcc-c++

and re-install

[Email protected] libmemcached-1.0. ) #./configure--prefix=/usr/local/libmemcached--with-memcached=/usr/local/memcached/bin/memcached[[email Protected] libmemcached-1.0.  -  Make [email protected] libmemcached-1.0.  -  Make Install

5. Install memcached PHP Extension

[Email protected] src]#Tar-ZXVF memcached-2.2.0. tgz [[email protected] src]# CD memcached-2.2.0[email protected] memcached-2.2.0]#/usr/local/php/bin/phpizeconfiguring for:P hp Api Version:20121113Zend Module Api No:20121212Zend Extension Api No:220121212[email protected] memcached-2.2.0]#./configure--with-php-config=/usr/local/php/bin/php-config--with-libmemcached-dir=/usr/local/libmemcached ...---------------------------------------------------------------------- Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/ 

6, Configuration PHP.ini

7. Restart the server

Linux memcached Installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.