PHP memcache extension installation for Windows
Working principles of the VMware3 network modes (bridging, nat, and Host-only) of the VM. Details of VMware network configuration 1: Introduction to three network modes after the virtual machine is installed, two NICs are added to the network connection: VMnet1 is the network interface in Host-only mode of the VM, and VMnet8 is the network interface in NAT mode, the following describes how to select the virtual machine Network mode. Click Edit virtual machine settings and select Ethernet on the Hardware tab. The Network connection framework on the left has the following four single options: 1. in the bridge mode, the VMware Virtual Operating System is like an independent host in the LAN. It can access any machine in the network, but you need more than one IP address, in addition, you must manually configure the IP address subnet mask for the virtual system, and the subnet mask must be in the same network segment as the host machine, in this way, the virtual system can communicate with the host machine. If you want to use VMware to create a virtual server in the LAN to provide network services for LAN users, you should select the bridge mode. NAT (network address translation mode) enables the virtual system to use the NAT (Network Address Translation) function to access the public network through the network where the host machine is located. That is, in NAT mode, you can access the TCP/IP configuration information of the Virtual System in Internet-based NAT mode. It is provided by the DHCP server of the VMnet8 (NAT) virtual network, the virtual system cannot be manually modified, so it cannot communicate with other real hosts in the Local Area Network. The biggest advantage of the NAT mode is that the virtual system is very easy to access the Internet, you do not need to perform any other configuration. You only need to allow the host machine to access the Internet. 1. download and install the memcached server software. 1. Download The memcached software 32-bit: Memory download page: http://blog.couchbase.com/memcached-144-windows-32-bit-binary-now-available 64-bit: memcached-win64-1.4.4-14.zip(download link directly, memcached-win64-1.4.4-14.zip download page: http://blog.couchbase.com/memcached-windows-64-bit-pre-release-available I use wamp, a 64-bit computer. Download the memcached server software package. Decompress the package to the specified directory. I chose D: \ memcached 2. Install memcached and run cmd.exe as an administrator and go to the memcached folder. And install memcached. No prompt is displayed after installation. 3. start the memcached service and run the memcached command "memcached.exe-d start" in cmd.exe. Then, go to the process in the task manager to check whether the memcached service has been started. 4. Set the basic memcached parameter-p listening port-l connection IP address, the default value is local-d start to start memcached service-d restart to restart memcached service-d stop | shutdown to disable the running memcached service-d install to install memcached service-d uninstall to uninstall memcached service-u run as (only valid when running as root) -MB maximum memory usage, in MB. By default, an error is returned when 64MB-M memory is used up, instead of deleting the maximum number of concurrent connections in item-c. The default value is 1024-f, and the default value is 1.25-n, key + value + flags the default value is 48-H. Help is displayed. 5. memcached stop and unmount command 1 D: \ memcached> memcached.exe-d stop2 D: \ memcached> memcached.exe-d uninstall 2. Install memcache extension in PHP 1. Download memcache. dll extension: http://pecl.php.net/package/memcache/3.0.8/windows Download Note: select the version that matches your environment and the thread security version. My local wamp2.5 php version is 5.5 Windows 64-bit, so the download is 5.5 Thread Safe (TS) x64 2. After the download is complete, decompress the compressed package, as shown in. Copy the php_memcache.dll extension file to the php extension directory, for example (D: \ wamp \ bin \ php \ php5.5.12 \ ext). 3. Modify php. INI file open php. INI file (My address is: D: \ wamp \ bin \ apache \ apache2.4.9 \ bin \ php. ini) add a line of code: extension = php_memcache.dll note: the new line must be followed by a semicolon. The semicolon represents the comment point, which cannot be used. After saving it, restart the server (apache, nginx, or iis) and I will simply restart wamp. Input in the browser: http://localhost/?phpinfo=1 We can see that the memcache extension has been loaded. 3. Can I create a PHP file test. php locally to test the memcache function? Php $ memcache = new Memcache; $ memcache-> connect ('2017. 0.0.1 ', 11211) or die ('shit'); $ memcache-> set ('key', 'Hello memcache! '); $ Out = $ memcache-> get ('key'); echo $ out; then access the file through a browser. The normal result shows the input: hello memcache! Finished. If you want to use VMware to install a new virtual system, you can directly access the Internet without manual configuration in the virtual system. We recommend that you use the NAT Mode 3. host-only (Host mode) requires that the real environment and virtual environment be isolated in some special network debugging environments, in this case, you can use the Host-only mode in the Host-only mode. All virtual systems can communicate with each other, however, the virtual system and the real network are isolated and can be shared using the Internet connection provided in Windows XP (in fact, it is a simple route NAT) to allow virtual machines to access the virtual system through the Host's real network card TCP/IP configuration information (such as the IP address gateway address DNS server), all by VMnet1 (Host-only) DHCP servers in the virtual network are dynamically allocated. If you want to use VMware to create a virtual system isolated from other machines in the network and perform some special network debugging, you can select the Host-only mode. The preceding figure shows the working principle of the three network modes (bridging, nat, and Host-only) of the Virtual Machine VMware.