Installation of Memcache and MongoDB in PHP environment on Windows, memcachemongodb_php tutorial

Source: Internet
Author: User

Installation of Memcache and MongoDB in PHP environment on windows, MEMCACHEMONGODB


MANGODB Installation

1. Download the MongoDB installation files, I install the Windows 64-bit, download the address as follows:

Https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.6.6-signed.msi

2. Create a new MongoDB folder on e-disk (casually put, such as E:\mongodb)

3. Unzip the downloaded installation file and move the extracted files to the E-drive MongoDB

4. Establish the MongoDB data storage directory E:\mongodb\data

5. Start MongoDB (simple boot not configured service)

E:\mongodb\bin\mongod.exe--dbpath  E:\mongodb\data

You can see the following information:

Indicates that the installation started successfully.

6. Enter http://localhost:27017/in the browser, the following message appears, indicating that MONGDB has been activated.

It looks like you is trying to access MongoDB over HTTP on the native driver port.

7, download the corresponding MongoDB PHP plugin (not very easy to find, if PHP is 5.4-5.5 version available this address: HTTP://PAN.BAIDU.COM/S/1SJJJSYH) and configured.

8. Use in PHP:

Try {    $mongonew MONGO (' localhost 'catch$e) {     Var_dump ($e);} $mongo _db $mongo->selectdb (' logdatastorage ');

Note: The above code is demo and cannot be used in a production environment.

Memcache Installation

1, 64-bit download

From : http://www.urielkatz.com/archive/detail/memcached-64-bit-windows/
Download:http://www.urielkatz.com/projects/memcached-win64/memcached-win64.zip
Source:Http://www.urielkatz.com/projects/memcached-win64/memcached-src.rar

2, unzip the compressed package just downloaded, get two files: Memcached.exe (server main program), PthreadGC2.dll

3. Run the command prompt with administrator privileges, navigate to the decompression path, install the memcached service, command:

memcached.exe-d Install

4, execution start → management tools → services open Windows Services viewing tool, find memcached service (no proof found not installed successfully)

5. Start memcached:

1024x768 -D start

-D cannot specify port default port 11211 for daemon start
-m Specifies the memory size

6. Configure Windows Firewall to add inbound rules for memcached default port 11211 (This step is not required if both the server and client are native)

7, the test can be normal communication, here with the help of Telnet:

127.0. 0.1 11211

If you enter a blank doc screen, the estimate is OK. The first line of command input is invisible, so I usually first hit the carriage return, return an error, it is OK, this is to indicate that you entered an unrecognized command;

Then look at the status, type stats and enter:

8, download the corresponding memcache PHP plugin (if PHP is 5.5 version available this address: http://pan.baidu.com/s/1mgspf9e) and configured.

9. Connect using in PHP:

$memcache New Memcache; $memcache->connect (' 127.0.0.1 ', 11211);

Reference documents

1. MONGODB installation configuration, start off

2. Windows Memcached installation and configuration instance

http://www.bkjia.com/PHPjc/927206.html www.bkjia.com true http://www.bkjia.com/PHPjc/927206.html techarticle Installation of memcache and MongoDB in PHP environment on Windows, Memcachemongodb mangodb installation 1. Download MongoDB installation files, I installed Windows 64-bit, download the address as follows: https:// FAs ...

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