how to use redis in windows 10 from .msi installer - windows

I have questioon about how to run redis in windows 10. what i have do is :
I have install redis use .msi and my redis are run in services, but when i want run redis-cli in cmd, i got error like this :
C:\WINDOWS\system32>redis-cli
'redis-cli' is not recognized as an internal or external command,
operable program or batch file.
how to fix this problem ? and how to run redis in windows locally ? it is need to add my redis to environtment or something like that ?

Do the first option only if you have not shutdown your computer and not closed you terminal after installation
Close your terminal open again and try running redis-cli, if that doesn't works then do below,
Uninstall and Reinstall again, while reinstalling make sure that you check "Add the redis installation folder to the PATH environment variable"

Related

Commands in git-lab-runner on windows machine not working

I have a gitlab-runner installed on my windows 10.
When I try to use commands like pip and sh in my .gitlab-ci.yml file the runner does not recognize these commands even though they are recognized in my windows machine when run using cmd.
All the environment variables have been setup properly on my windows machine.
i.e pip works on my windows machine but not on my gitlab-runner.
Refer this link
My config.toml file has been set to "cmd".
Error seen: 'pip' is not recognized as an internal or external command,
operable program or batch file.
setting
before_script:
- SET SH_HOME=C:\cygwin64
resolved the issue referring this question

npm hangs on any command

I installed last version of Node.js (12.2 x64 windows)
After I run cmd as administrator and try to call any npm command (except npm -v), cmd window is hanging. After Ctrl+C it returns
Terminate batch job (Y/N)?
I was trying to left cmd for several hours but it didn't give some results.
It is strange because node.exe process is consuming CPU and memory quite hard.
I was trying to reinstall node.js several times without success.
I can't even get some debug information.
I faced such issue on my VM which I was using by connecting via rdp. Same version installed on my laptop works ok. On my VM I had Kaspersky antivirus, but after switching it off I got same result.
Did somebody face such issue? Is there some way to get more information problem?
Could you please recommend me some way to resolve?
I've finally resolved my issue.
According to suggestion from our local read me file
Node.js (with NPM) Note: On windows server machines, instead of node modules been installed at user %APPDATA% path, its better to install at a global path e.g c:\npm. This could be acheived by the npm command: $ npm config set prefix 'c:\npm' This is not required on individual developer's machine.
I've executed npm config set prefix 'c:\npm'.
As result it added prefix="'c:\\npm'" to my .npmrc file
This make node.js really crazy. It takes me about an hour to debug all these js scripts npm.js code.js etc... to find that it calls mkdirp with 'c:\\npm'\etc and it loop process forever.
If anyone will encounter this problem in the future you need to find the npmrc file delete it and delete all configurations for node, delete node as well and install it, this should fix that.
when deleting node some of the configurations aren't deleted so you have to delete it manually.
It happenned for me too : I installed node only for my user on Windows 10, and managed to use npm by calling it using the full path "c:\Program Files\nodejs\npm"
I solved by using "c:\Program Files\nodejs\npm" config set prefix "c:\Program Files\nodejs" (setting the prefix to the full path to npm)
And the result was :
λ cat c:\Users\<my_user_name>\.npmrc
prefix=c:\Program Files\nodejs
Now eveything works fine.
It's if the prefix is not set correctly.
Just want to point out to those commenting -if you can't get access to the command line npm, then you can't run npm config, obviously.
Open up powershell and type notepad $HOME/.npmrc, and edit the line where it says prefix=... and change it to a valid one.
For clarity, when you call:
npm config set prefix 'c:\npm'
you are required to have the ' wrapping the path, but you need to remove them from the .npmrc file so that npm commands will work. So your resulting line in .npmrc file should look like:
prefix="c:\\npm"
Just delete the .nprmc file at User/%UserProfile% and now try the command if it dosents work even reinstall once.

Nodejitsu on Windows

I've just started playing around with Node.js and was trying to get Nodejitsu to work on my system (Windows 7, Node version 0.8.15)
I installed Jitsu using the "npm install jitsu -g" command, but beyond that trying to perform jitsu users confirm or deploy returns:
'jitsu' is not recognized as an internal or external command, operable
program or batch file.
I understand that I most probably need to add the jitsu install location in my path, but am not sure where jitsu has been installed.
Help much appreciated. Thanks
on a normal Node.js installation on windows you will find the npm modules located at
C:\Program Files\nodejs\node_modules\npm\bin
or in
C:\Users\user\AppData\Roaming\npm\jitsu
You need to set up the PATH environment variable to the correct path
An then you will be able to use Nodejitsu :)

Mongodb Windows Install Fail

I am trying to install mongodb on my local computer. I have windows 7 and 64 bit. I am following these instructions which are given on mongo's website:
64-bit binaries:
Download and extract the 64-bit .zip.
Unzip the downloaded binary package to the location of your choice. You may want to
rename mongo-xxxxxxx to just "mongo" for convenience.
Create a data directory:
By default MongoDB will store data in \data\db, but it won't
automatically create that folder, so we do so here:
C:\> mkdir \data
C:\> mkdir \data\db
Or you can do this from the Windows Explorer, of course.
If you prefer to place datafiles elsewhere, use the --dbpath command line parameter
when starting mongod.exe. Run and connect to the server
The important binaries for a first run are:
mongod.exe - the database server. Try mongod --help to see startup options.
mongo.exe - the administrative shell
To run the database, click mongod.exe in Explorer, or run it from a CMD window.
C:\> cd \mongodb\bin
C:\mongodb\bin> mongod
Note: It is also possible to run the server as a Windows Service. But we can do that
later.
When i follow these steps i get the following error:
'C:\' is not recognized as an internal or external command, operable program or batch
file.
I am not sure what is going wrong i have followed the direction exactly. I extracted the zip file on my c drive as mongodb. I then created the folder data on my c drive and the folder db inside the data folder. I start the windows cmd line and do as they suggest and i get the above error. Can anyone help please. Thank you.
Don't type the C:\>, that's the command prompt.
For example, just type:
cd \mongodb\bin
and then press enter.
you may want to use this powershell that dowloads mongodb and installs it as windows service...
https://gist.github.com/serdarb/5102848

Run a windows xp bat script remotely from a ubuntu machine

Is it possible to run a windows xp bat script remotely from a ubuntu machine via command line?
This is possible if you have an ssh server running on the WinXP machine. It is trivial to set up such a server if you have installed Cygwin. This is well described here.
Then from an Ubuntu command line (or cron job) you run
ssh user#winxp command
Make sure your .bat has executable permissions.
I think that the technology you are after is WMI. I see that there is an ubuntu package called wmi-client, which you can sudo apt-get install and attempt to you. Some quick searches and I'm unable to find details, but maybe that will get you somewhere....
You would probably use something like remote desktop, and if you did it that way, it would work, but your question isn't very specific

Resources