Preliminary Study on memcache (II) -- install memcache in Windows

Source: Internet
Author: User

Install memcache in Windows

 

Since the platform we developed uses Windows many times, we will be concerned about how to install and use memcached on Windows.

1. Install memcache on the server
1. Download memcache for Windows

: Http://code.jellycan.com/memcached/. download Win32 binary and decompress it to c: \ memcached.
2. In the command line status, enter:
--------------------------------------------------------------------
Memcached.exe-D install # Install memcached as a Windows Service
Memcached.exe-d start # Start the memcached Service
--------------------------------------------------------------------
Generally, it is normal to input the above command without any feedback information.
Now let's see if memcached is listening normally. Enter:
--------------------------------------------------------------------
Netstat-
--------------------------------------------------------------------
Check whether 11211 of the port is occupied. If yes, It is good and everything is normal.

Eg: If you use another port when starting memcached, check the usage of other ports.

 

Ii. php extension (PHP-memcache) Installation
# PHP-memcache enables PHP to access memcached
First, check the PHP version. I am currently using php5.3.8 and compiled using vc9. First, find php_memcache-2.2.6-5.3-vc9-x86.zip on the internet, download and decompress the file php_memcache.dll.

Copy the file to the PHP/EXT directory and add extension = php_memcache.dll to PhP. ini. Of course, the prerequisite is that the extension_dir has been correctly defined in PHP. ini.

Restart Apache. Visit the PHP file containing "phpinfo ();" on the website to check whether memcache items exist. If so, congratulations! The installation is successful!
Now, you can start your memcache journey ......

Eg: Check whether the CGI mode is used by Apache. If yes, the installation may fail. You need to change it to the default mode of apache2.

 

Iii. 64-bit Installation

Unfortunately, a colleague's computer uses 64-bit win7. At this time, we need to download the 64-bit memcached and PHP-memcache.

After the download, the installation method is similar. You just need to copy the found pthreadgc2.dll to the ext directory.

 

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.