How to add memcached to system start-up in Windows Server 2008


I have spent a whole day or two only in trying to make memcached start-up automatically on system restart in Windows 2008 Server system. I was getting this error “memcached.exe exits with Failed to ignore SIGHUP” when I tried to use the -d switch. In the end, it turned out to be pretty simple but trying to do it with Windows NT Resource Kit, PowerShell’s New-Service command, srvany.exe or the likes did NOT work at all for me. What worked for me was this:

  1. You go to Run > “RegEdit” hit enter.
  2. Then you find the key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
  3. Add a string value to it, name it whatever you want and put the full path to the memcached.exe file into the value of it.
Add memcached.exe to startup in Registry
Add memcached.exe to startup in Registry in Windows 2008 Server

Now you should be able to see the memcached startup when you reboot the system.

PS: In case you have a dependent service on memcached, change its start-up type to Automatic(delayed)

Advertisements

Author: Imran Akram

A .NET/SharePoint Consultant and a political enthusiast who believes in putting the feet of the elected and/or unelected officials to fire in order to get good governance.

One thought on “How to add memcached to system start-up in Windows Server 2008”

  1. This only works if there is someone logged in to the system. Doesn’t work for an unattended server, there is no (documented) way to make memcached run as a service in windows

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s