Windows build memcached Environment configuration method

Source: Internet
Author: User
Tags memcached memory usage

Memcache installation under Windows

1, download memcache for Windows. Download Address: http://jehiah.cz/projects/memcached-win32, recommended download binaries version, decompression (in this case, extract to c:memcached).

2, in the command line State input:

c:/memcached/memcached.exe-d Install

This memcached has been installed as a Windows service

3. At the command line, enter:


c:/memcached/memcached.exe-d start

To start the memcached service. Of course, you can also choose to start in Windows services

You're right, that's it. Simple three-step memcache server End is ready
PHP Installation memcached module support

1, download the Php_memcache.dll module, you can find the corresponding version from Http://downloads.php.net/pierre/,
php5.3 Direct Download Http://shikii.net/blog/downloads/php_memcache-cvs-20090703-5.3-VC6-x86.zip

2, modify the php.ini, add the following content:


Extension=php_memcache.dll

3, restart the Apache server, and then look at the phpinfo, if there is memcache, then the installation is successful!
To test memcached under Windows

The test code is as follows:

<?php
$mem = new Memcache;
$mem->connect ("127.0.0.1", 11211);
$mem->set (' key ', ' Hello memcached! ', 0, 60);
$val = $mem->get (' key ');
Echo $val;

More test code, need to be:

http://www.php.net/manual/en/memcache.examples-overview.php

Basic settings for memcached

-P Listening Port
The IP address of the-l connection, the default is native
-D Start memcached service
-D Restart Restart memcached service
-D Stop|shutdown shut down the running memcached service
-D Install installation memcached service
-d Uninstall Uninstall memcached service
-U Run as (only valid when run as root)
-m maximum memory usage, in MB. Default 64MB
-Returns an error when M memory is exhausted instead of deleting the item
-C Maximum Simultaneous connection number, default is 1024
-F Block size growth factor, default is 1.25
-N Minimum allocation space, key+value+flags default is 48
-H Display Help

Related Article

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.