Install Memcached on Windows - windows

While doing some web development, I needed to have Memcached (source code) installed on my local machine to closely simulate what was going on my server.
How to install Memcached on Windows?

Steps to install Memcached on Windows:
Download a stable version, in either 32-bit or 64-bit I have tested the 64-bit version.
Unzip it in some hard drive folder. For example C:\memcached
There will be memcached.exe file in the unzipped folder.
Open a command prompt (need to be opened as administrator).
Run c:\memcached\memcached.exe -d install
For start and stop run following command line
c:\memcached\memcached.exe -d start
c:\memcached\memcached.exe -d stop

As told in some previous comments the v1.4.4 is sometimes coming from a trusted source, sometimes not and it becomes hard to find. But there is now a very stable Windows native port for both 32 bits and 64 bits versions.
https://github.com/jefyt/memcached-windows
It's running well on our two PHP servers (PHP7 and PHP8).
Hope this helps.
Another Cygwin version is also available here and runs well too
https://github.com/nono303/memcached

Related

How do I run Redis on Windows 32 bit?

I have tried to set up Redis server on my windows 7 32 bit. I did not find a 32-bit supportive version of Redis. How can I do this?
Advance thanks.
Download the .zip file to your hard drive.
Unzip the files into any location, such as ‘C:\Program Files\Redis\’.
Add the path of your Redis folder as a Windows ‘environment variable.’
Open your Command Prompt (ex: cmd.exe).
install redis server
redis-server --service-install
start redis server
redis-server --service-start
save and stop the Redis database
redis-server shutdown save
from command line please check if redis is up
redis-cli ping
The source of redis not contains executable file like redis-server, you must compile it.
Redis not support windows officially, but microsoft had provided a fork in windows https://github.com/microsoftarchive/redis.
The release it supported is only for 64bit windows, but the document says you can build it yourself with 32bit

How do I install just the client tools for PostgreSQL on Windows?

I have a PostgreSQL database on a Linux system that I want to access from my Windows PC. But the only Windows binaries I have been able to find are the full installer, which includes the database server and client.
Is it possible to get a client-only Windows binary install for PostgreSQL from anywhere?
(To clarify, I want the standard PostgreSQL client, psql - not a GUI client or independent tool).
Unfortunately there is no real client "only" installer.
What you can do, is to download the ZIP archive of the complete Postgres binaries:
http://www.enterprisedb.com/products-services-training/pgbindownload
and then remove the "server" part from it.
When you unzip it, you get the following directories:
bin
doc
include
lib
pgAdmin III
share
StackBuilder
symbols
You can remove the doc, include, pgAdmin III, StackBuilder and symbols directories. As far as I can tell (but I am not sure) the client also doesn't need the share or lib directories, but you would need to test that. So that leaves only the bin directory.
I think the share directory could be needed for localized error messages in psql but I'm not sure about that.
Inside the bin directory you can essentially remove all .exe files (except psql.exe of course). You can also remove all wx*.dll files, they are only needed for pgAdmin. The libxml2.dll and libxslt.dll are also only needed for the server.
If you do want some of the other client tools, you might want to keep
pg_dump.exe
pg_dumpall.exe
pg_restore.exe
One drawback of this approach is that this requires the Visual C++ Redistributable to be installed. But you can overcome that as well by simply putting the MSVCR120.DLL from some computer where it is installed into the bin directory.
So that leaves you with these files (from the bin directory) that are required for the psql client:
iconv.dll (libiconv-2.dll in newer Postgres versions)
libeay32.dll
libintl-8.dll
libpq.dll
msvcr120.dll
ssleay32.dll
zlib1.dll
psql.exe
Of course you can also take all that from an existing Postgres installation without the need to download the ZIP archive.
It is obviously not a real installer, but if you put the cleaned up directory into a ZIP file, you can distribute that and whoever needs it just unzips the archive. Personally I find unzip to be the best "installer" anyway (I also use that to install the Postgres server, the Windows installer just has too many quirks)
As of 2020, when you click download the full installer from here , click next and next and you get the option to install only the command line - tools
. Remember to add the path to the bin folder in the PATH variable.
Actually there are client CLI tools in pgAdmin. All you need is just to install it on your Windows machine from https://www.postgresql.org/download/windows/.
Then you'll be able to find those tools in folder like C:\Program Files (x86)\pgAdmin III\1.22 or C:\Program Files (x86)\pgAdmin 4\v2\runtime, depends on the pgAdmin version you have installed.
Thanks to everyone who has posted on this thread.
For what it's worth, I got psql.exe from PostgreSQL 10.10 working under Windows 10 with just the following files from the zip archive:
libcrypto-1_1-x64.dll
libiconv-2.dll
libintl-8.dll
libpq.dll
libssl-1_1-x64.dll
psql.exe
When connecting to AWS Redshift, I got the following error:
psql: FATAL: invalid value for parameter "client_encoding": "WIN1252"
I resolved this by running
set PGCLIENTENCODING=UTF8
I found this solution at https://forums.aws.amazon.com/thread.jspa?messageID=600088
HTH.
I realize this is an older question, but when I used the Windows installer for the latest version of Postgres (10.4), it gave me the option to install just the command line tools. I just unchecked server and pgadmin in the installer's window when prompted to choose what I wanted to install.
Below are the steps I followed to connect to Amazon Redshift with postgres12 psql on windows:
download postgres 12.4 from below location:
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
run the installer which will take few minutes and prompt you for installations options
select command line tools as shown in below screenshot and install that
Above will install postgres12 command line in below folder C:\Program Files\PostgreSQL\12\bin. Make sure to add this to your PATH environment variable
open cmd and run command
set PGCLIENTENCODING=UTF8
run psql to connect to redshift. Make sure to change below parameters highlighted in red for your cluster endpoint, userid, copy script file name and log script file name respectively
psql -h redshift-cluster-1.abcdefgh.us-east-1.redshift.amazonaws.com -U demo_user -d dev -p 5439 -f d:\demo\redshift_script.sql -L d:\demo\log_redshift_script.log
all commands in redshift_script.sql file would get executed in PSQL and logs will be stored in log_redshift_script.log file
There is a third-party command-line tool available known as PGCLI - A command-line interface for Postgres with auto-completion and syntax highlighting.
Install:
pip install pgcli
Connect to POSTGRES Server from Command-line:
pgcli -h localhost -U xyz -d app_db
For official documentation, visit PGCLI
If there's pgadmin v4 installed then just copy these libraries (from C:\Program Files\pgAdmin 4\v4\runtime\):
libcrypto-1_1-x64.dll
libpq.dll
libssl-1_1-x64.dll
These were enough for me to connect from a client Windows 10 x64 PC to a remote Postgres 13 server. Note, that libraries coming with the ZIP archive mentioned above are slightly different and have more dependencies.
I kind of cheat. I install sqlbackupandftp.com on a Windows server - which has a free version that can schedule a single database backup. In the binaries, pg_dump.exe is there - typically on the C: drive like C:\Program Files (x86)\SQLBackupAndFTP\dbms\PostgreSql
I built standalone versions for windows and linux.
It has less dll dependecies and smaller size and work with many linux.
https://github.com/hemnstill/StandaloneTools/releases?q=pg_dump
You can also download "https://www.nuget.org/packages/Postgres.psql" nuget package to get "psql.exe"

install libssh2.dll on windows

I want to install SSH on my PC (windows 7 64bits).
But I have a problem with the installation of libssh2.dll file
I saved in: C: \ Windows \ SysWOW64
and even in C: \ Windows \ System32
and when I execute this command "regsvr32 libssh2.dll" in cmd as administrator I get this error message:
Libssh2.dll "The module" "was loaded, but the DllRegisterServer entry point was not found.
Verify that "libssh2.dll" is a valid DLL or OCX file and try again. "
I downloaded from this site file:
http://windows.php.net/downloads/pecl/releases/ssh2/0.12/
The only good that contains the libssh2.dll is x86 (knowing that I have a 64bits), is what may be causing the problem?
If someone knows a solution, please, share it, it is very important that I find a solution as soon as possible and thank you.
You have to put that libssh2.dll somewhere on the %path% so then the PHP extension can find it. Logic were to put it into your PHP dir (if you use the standard zipball from windows.php.net).
well why have you downloaded a 32 bit file to a 64 bit system
am I missing something here
You can only run a 32bit type if your Apache PHP and MySQL have 32bit running versions or 64 bit in your case. So if you are running a 32bit OS on a 64bit system then this is fine, if you are running 64 bit script on a 64 bit system and are trying to use a 32 bit script which I suspect you are then this is not fine!
I would therefore suggest that if this is the case you may have a mix match of OS Versus Script.
There are a few brave people operating in the 64 bit world and you should only ever use the stable versions of the product and like Apache unless you do you will not get the support you want because you have not utilised a stable version only and Apache will not support 64 bit, hence Apache lounge.
If you are running off localhost or 127.0.0.1, then running a stable 32 bit OS and running the 32 bit stable version is the only way you will get support.

CVSNT install hangs forever in Windows XP 64-bit

I need to access some source code stored on SourceForge using CVS.
I used (many computers ago) to use WinCVS, so I downloaded it from SourceForge and installed it on this machine, which runs Windows XP 64-bit (latest SP).
However, during the second part of the install, when it tries to install CVSNT, the install asks all the usual questions, and hangs during the actual install.
I have traced the install using ProcMon, and the installer starts up, creates a temporary file in my temp directory (which is on drive E:), and then executes it.
I can't see any particular reason why the install hangs - there is no obvious loop. Both the original installer, and the temporary file create 2 threads, and one thread exits. So I guess the other thread is waiting for something which never happens.
Any idea how to proceed from here?
The issue is that the installer doesn't like the default installation path of c:\Program files (x86)\cvsnt — if you use c:\cvsnt the installer will proceed.
Update: this appears correct. If you still would like it in the default location under C:\Program Files (x86)..., use the 8.3 name (you can find it with dir /x), usually C:\PROGRA~2. As you can see in the screenshot, the last step appears correctly now. With a path with a space in it, it would hang forever.
Second part of wincvs --> cvsnt.exe get hangs with windows 7 due to incompatible, So you may try tortoiseCVS. It has the portable version and also working fine
SOLUTION FOR Windows 8 64-bit:
On Windows 8 64-bit I was unable to install CVSNT (even to c:\cvsnt), but I solved the problem by simple copy the whole CVTNT directory from my old pc.
I copied to C:\Program Files (x86)\cvsnt (exact location where wincvs expected to find cvsnt).
We had a similar problem on a machine at work (the difference being it was Windows 7 64-bit in our case). Even though the user had admin privileges, we were only able to resolve the issue by logging on directly as the admin before installing cvsnt.
Do not install the version of CVSNT that comes with WinCVS. It's an old, outdated, buggy version. Install a later release (at least 2.5.0.4).

Node.js - tutorials on getting it to work with Cygwin on a Vista machine

All,
Am trying to get Node.js to work on Vista machine.
I installed Cygwin (as per the Github instructions) which appears to have been installed correctly. However, none of the commands are executing.
Are there any tutorials for the stages after the Cygwin installation?
PROBLEM: When any command is executed, I get 'Bash: command not found' error.
Not even command like 'c:\cygwin\bin' is executing.
When I type 'user' in cygwin command prompt, I get 'ntvdm has encountered an system error. Parameter incorrect'.
I thought the above error may be due to the firewall, disabling the firewall did not have any effect, running the program with admin rights also did not change the results...
Am confused and would love to get some guidance on what steps to go with next on getting Node.js up and running on a Windows Vista machine.
Many thanks,
UPDATE1:
We managed to make a bit more progress. It appears that we had not installed all the relevant files related to Cygwin. Upon re-download and reinstalled, it ran well, however, we have driven into another error. Error we get:
How to compile/install node.js(could not configure a cxx compiler!) (Ubuntu).
We followed the instructions as per the above thread (3rd post from top for Windows machines), however, we are still stuck at the same error.
Any guidance please?
Have you tried just using the Windows self contained binaries? http://node-js.prcn.co.cc/ This way you actually don't need to bother with Cygwin.
At first, i tried it your way too, using Cygwin. After smashing my head for the 10th time against a wall i just stopped trying and found a much cleaner solution.
I'm using VirtualBox running a Debain guest system to locally develop on my Windows 7 machine. Using VirtualBox, you can easily set up shared folders or port forwarding for node apps between your Windows machine and your Debian guest system.
Since you are using a plain Linux-system, all the compiling-pain is blown away.
If you plan to run node.js in production on a windows system: don't. I hardly believe node.js will be ever stable enough on windows-based systems using MINGW/Cygwin...
People seem to run into problems with Cygwin because they think that they are using a Windows machine.
If you install Cygwin, and open a bash shell prompt using the Cygwin icon, you are now in a UNIX environment and everything works the same as it would on UNIX. That includes building node.js.
I think you added some info to the question and I can see your problem. Yes, normally on Cygwin it has been possible to build node.js just as you would on any UNIX system, but that is no longer possible on Windows 7. Before running ./configure you have to:
Close all cygwin apps.
Double-click on C:\Cygwin\bin\ash.exe
Run ./rebaseall and when it completes, run ./perlrebase.
exit from the ash shell window.
At this point Cygwin will be back to normal and you can ./configure and make install.

Resources