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

Source: Internet
Author: User
This article introduces the installation and configuration of Memcached.exe in windows+php and the configuration of memcached in Liunx, and we can configure it according to your own system or method.

Installation and configuration of Memcached.exe in windows+php

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

Unzip the compressed file to c:/memcached/

2. Under CMD, enter the "c:/memcached/memcached.exe-d Install" installation.

3. Re-enter: "C:/memcached/memcached.exe-d start" starts. Note: memcached will start automatically every time a service is turned on for Windows. This way the server side is already installed.

4. If-M is specified, the number after the cache size is-m, in units of M., for example:

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

The following settings memcached use memory problem help:

After installing according to the above installation steps, using Memcached–m 200来 to adjust the maximum memory consumption will find no effect, always default 64MB of memory, search the Internet, because the registry does not write information, can be modified.

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

2. Go to the registry and locate Hkey_local_machine/system/currentcontrolset/services/memcached Server, where there is a ImagePath entry with a value of "c:/ Memcached/memcached.exe "-D runservice, followed by the-L 127.0.0.1-M 3000-c 2048.

3.memcached–d start starts the memcached service so that the maximum memory for memcached is modified to 3000MB.

If you are downloading a binary version, you can run it directly, and you can add parameters to set it up.

Common settings:

-P Listening Port
-L connected IP address, default is native
-D Start memcached service
-D Restart Restart memcached service
-D Stop|shutdown Close the running memcached service
-D Install memcached service
-d Uninstall Uninstall memcached service
-U Run as (only valid when running as root)
-m maximum memory usage, in megabytes. Default 64MB
-M running out of memory and returning an error instead of deleting an item
-C Maximum number of simultaneous connections, default is 1024
-F Block size growth factor, default is 1.25
-N Minimum allocated 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, or the installation should be 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 is 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
Copy/link the libevent-1.4.so.2 to the/usr/lib, otherwise 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 are used;
-p Specifies the port to listen on;
-u specifies which user to run

http://www.bkjia.com/PHPjc/632930.html www.bkjia.com true http://www.bkjia.com/PHPjc/632930.html techarticle This article introduces the installation and configuration of Memcached.exe in windows+php and the configuration of memcached in Liunx, and we can configure it according to your own system or method. windows+php ...

  • 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.