Installation and configuration of Memcached.exe in windows/linux/php

Source: Internet
Author: User
Tags memcached memory usage

Installation and configuration of Memcached.exe in windows+php

The 1.Windows version of the download address is: http://code.jellycan.com/memcached/

Extract compressed files to c:/memcached/

2. Enter the "c:/memcached/memcached.exe-d Install" installation under CMD.

3. Re-enter: "C:/memcached/memcached.exe-d start" start. Note: Later memcached will start automatically every time a service is powered on as windows. This way the server side is already installed.

4. If-M is specified, it means the number of the cache size-M, in M, for example:

C:/memcached/memcached.exe–l 127.0.0.1–m 32–d Start

The following settings memcached help with memory issues:

Following the installation steps above, the use of memcached–m 200来 to adjust the maximum memory footprint will be found to have no effect, always the default 64MB of memory, search on the Internet, because the registry does not write information, you can modify this.

1. Memcached–d shutdown first closes the memcached service.

2. Enter the registry, find Hkey_local_machine/system/currentcontrolset/services/memcached Server, in which there is a ImagePath entry, the value is "c:/ Memcached/memcached.exe "-D runservice, followed by-L 127.0.0.1-M 3000-c 2048.

3.memcached–d start starts the memcached service, which modifies the memcached maximum memory to 3000MB.

If you download a binary version, run directly on it, you can add parameters to set.

Common settings:

-P <num> Listening ports
-L <ip_addr> connected IP address, 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 <username> Run as <username> (valid only when run as root)
-M <num> maximum memory usage, in MB. Default 64MB
-Returns an error when M memory is exhausted instead of deleting the item
-C <num> Maximum simultaneous connection number, default is 1024
-F <factor> block size growth factor, default is 1.25
-N <bytes> min Allocate space, key+value+flags default is 48
-H Display Help

Installation and configuration of Memcached.exe in linux+php

Home
Http://www.danga.com/memcached

Download Address:
Http://danga.com/memcached/download.bml

Download file
Memcached-1.2.6.tar.gz
Tar zxvf memcached-1.2.6.tar.gz
./configure--prefix=/usr/local/memcached-1.2.6
Make
Make install

Attention:

Memcache need this package libevent, otherwise install the error:

Checking for libevent directory ... configure:error:libevent is required. You can get it from http://www.monkey.org/~provos/libevent/

If it ' s already installed, specify its path using--with-libevent=/dir/

Download get file libevent-1.4.9-stable.tar.gz

Tar zxvf libevent-1.4.9-stable.tar.gz

./configure--prefix=/usr/local/libevent-1.4.9-stable.tar.gz
Make
Make install

Since my installation was not installed under USR, the last boot memcache error:

[Root@localhost bin]#/memcached-d-M 10-p 11211-u root-l 0.0.0.0
./memcached:error while loading shared libraries:libevent-1.4.so.2:cannot open Shared object file:no such file or dire Ctory

Check the installation of libevent:

Ls-al/usr/lib | grep libevent
The libevent-1.4.so.2 copy/link to the/usr/lib, otherwise the memcached will not load properly.

CP libevent-1.4.so.2/usr/lib/

Article Source: http://www.diybl.com/course/6_system/linux/linuxjq/20071010/77432.html


To start the service after the installation is complete
Cd/usr/local/memcached-1.2.6/bin
./memcached-d-M 50-p 11211-u root-l 0.0.0.0
Parameter description
-m specifies how many megabytes of cache space to use;
-p Specifies the port to be monitored;
-u specifies which user to run

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.