Cook php
Published in

Cook php

Installing Memcached on Windows 2020

Memcached is a neat program that allows us to keep information on memory.

What we need?

Memcached (It has the version 1.66). As for 2020, it is the latest version of it. it is way modern than the previous version around here (1.4.5 3 years ago)

NSSM — the Non-Sucking Service Manager (it is to install it as a service)

Installing

Uncompress the Memcached file in any folder.

Copy nssm.exe in the same folder.

And runs the next command line:

@echo off
echo removing the service (if it is already installed)
nssm remove memcached166
echo and installing the service
nssm install memcached166 memcached.exe

It will install the service with the name “memcached166” (you can change the name).

You could also edit the service as

nssm edit memcached166

For example, you can change the service account, if it is initiated as a startup service and such.

If the service is not installed, then you can start it as

net start memcached166

Network

By default, memcached uses the port 11211

More configuration

It is the configuration of Memcached.

I tried to install it as a service using -d but it failed. However, it is possible to runs as service without -d

By default, it uses 64mb of ram. It could sound a little but it could help a lot. Memcached it is not mean to load “tons” of information, especially because the memory is volatile. But you can change it. If you already installed it as a service, then remember that you can edit the service (using nssm)

-p, --port=<num>          TCP port to listen on (default: 11211)
-U, --udp-port=<num> UDP port to listen on (default: 0, off)
-s, --unix-socket=<file> UNIX socket to listen on (disables network support)
-a, --unix-mask=<mask> access mask for UNIX socket, in octal (default: 700)
-A, --enable-shutdown enable ascii "shutdown" command
-l, --listen=<addr> interface to listen on (default: INADDR_ANY)
if TLS/SSL is enabled, 'notls' prefix can be used to
disable for specific listeners (-l notls:<ip>:<port>)
-d, --daemon run as a daemon
-m, --memory-limit=<num> item memory in megabytes (default: 64)
-M, --disable-evictions return error on memory exhausted instead of evicting
-c, --conn-limit=<num> max simultaneous connections (default: 1024)

--

--

--

How to cook PHP Code

Recommended from Medium

The Newbie Guide to Setting Up a Jetson Nano on JP4.4

✍ Aenco Academy #23: HTML v.s. URL? ✍

AWS Certified Solutions Architect Associate — Learning Materials

Why to choose AWS Cloud for your Web Application?

From Data Entry to Software Engineering

What I learned from my first UX Hackathon

15 Useful Snippets for your Daily life Python Problems

python snippets

🚀 Here are my best finds for a Tech Smart Boss this week — Issue #220

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jorge Castro

Jorge Castro

More from Medium

How to connect to a MySQL database using C# and WindowsForms

How to install Chocolatey in windows- DevOps Champ

Docker file for Coppermine Photo Gallery 1.6.10 version

How to Install PostgreSQL on Windows and run it from CMD