Node.js development, windows or linux? - windows

I'm interested in web development on the Node.js platform. My host OS is Windows 7. What would be the preferd way to set up a development environment. Run it directly on the host or in a linux based virtual machine? What are the pros and cons between these two methods?
If I go with a VM, can I still run the text editor and web browser in Windows (for performance reasons)?

Eh from experience, use Linux Docker.
edit Use Docker. bake in your dependencies, mount your project at run time, pin to a particular version of LTS node only. I'd take a 2gb docker image over un-runnable project leading to days lost being forced to upgrade to new packages. - 2018/04/10
But from someone whose spent the last 8 years developing in a linux based environment, and having spent the last 6 months developing software using nodejs in a windows dot net environment, here are my discoveries, shocking or otherwise...
Problems on windows:
can't effectively utilise docker Latest version of the docker toolkit solves this as far as I'm concerned. ymmv.
most node modules require node_gyp, which on the surface doesn't seem problematic (since gyp is supposed to be cross platform compiler), except when you delve into what it takes to get this working on windows: nothing short of installing visual studio will work. This sucks for me due to several reasons:
I'm normally on linux, so I never want to have to use visual studio.
It's entirely the most ridiculous idea that compiling something on windows requires at minimum a 3GB installation of an IDE... not libs but an entirely monolithic piece of GUI software I'll never ever launch.
the windows equivalent of debians build-essentials is actually a disparate sprawling ill named collection of gui only installers scattered across the internet all requiring a specific installation sequence. This, compared to sudo apt-get install build-essentials is overly time consuming and fraught with hidden gotchas.
developing on windows will allow you the bad habit of mixed case path names, unless your team either has a strict policy that is followed/enforced this will be a slippery slope to problems later on.
while windows supports more than 256 characters in paths, important tooling through out does not. enter stage left: rimraf and robocopy... ugh.
the windows terminal sucks... so does the default shell: cmd.exe...
Powershell is far too verbose in it's syntax and not to my taste... Installing Cmder aleviates this somewhat, however the only way for Cmder to interface with cmd.exe is to basically copy keystrokes to a hidden windows terminal running cmd.exe. (lolwut). Cmder works a lot better with shells that a more modular (zsh, bash, etc).. update: I now use powershell with pshazz and scoop, which is actually pleasant to use.
Having still improved the shell and terminal situation, nodejs for
windows will still assume your environment variables are %OF% %THE%
%WINDOWS% %VARIETY%... not the $UNIX $STYLE. So you'll basically be
using bower and npm mostly from cmd.exe... more ugh. I dont' seem to be having this issue anymore since I've incorporated a mix of cross-env and commander or yargs.
You'll also need to install python for windows, not a problem because choco exists and has you back there. update: have a look at boxstarter, will help automate your new machine setup with recipes (or you could actually graduate to using ansible or salt).
experienced python, ruby developers will tell you that old projects will need the version of their engine silo'd for when you need to revisit them (upgrading to newer versions is mostly not expedient or practical, read: rabbit holes), so you'll want something like rvm and virtualenv...
nvm (which only works on unix systems linux and macosx) because it's
a collection of bash scripts. I recommend using ZSH as your shell along with Zgen and Tarrasch/zsh-autoenv plugin.
nodeenv, which is more likely... a python program that integrates with virtualenv. Some people like this. I have no problem with it, but our team uses nvm.
however, you're better off with nvm-windows because "reasons". scratch that, use nodist on windows... bar far the better choice, you won't need to worry about some kind of autoenv since nodist by design handles this.
Installing on Windows:
install chocolatey
choco install cmder nodejs python2 choco install python2
install http://scoop.sh, then use it to install pshazz.
remove any versions of node manually installed globally.
install nvm-windows install nodist.
install visual-studio 2012 express, then never launch it if you treasure your cpu cycles. this may be overkill as microsoft have released an equivalent to build-essentials.
install windows 7/10 64bit sdk
Problems on Linux:
tldr; use nvm. for more reasons other than the below.
you'll have to set the global npm node_modules path to a user owned directory (I've started using ~/.local/share/npm). Pleasantly, this is something I found the windows installation of nodejs got right (probably not intentionally). A non issue when using nvm.
Ubuntu already has a binary called node, so #!/usr/bin/env node will by default not run nodejs. luckily debian systems have a neat management tool for controlling what the env binary emits: update-alternatives. ignore suggestions to use symlinks here, which will only cause problems later on in subtle ways. also a non issue when using nvm.
Installing on Linux :
$ sudo apt-get install git-core git-flow build-essentials python-dev python- pip
$ curl https://raw.githubusercontent.com/creationix/nvm/v0.20.0/install.sh | bash
$ npm config set prefix ~/.local/share/npm
$ nvm install stable
$ nvm alias default stable
references:
https://groups.google.com/forum/?fromgroups#!msg/msysgit/9YIR6jlNB0Q/zHhPN3tejFkJ
https://github.com/creationix/nvm
http://bliker.github.io/cmder/
https://github.com/coreybutler/nvm-windows
https://github.com/Tarrasch/zsh-autoenv
https://github.com/lukesampson/pshazz
http://scoop.sh
https://github.com/marcelklehr/nodist

We have a system via which we just use a config file, which handles all our problems like path differences ("c:\blarg" vs "~user/blarg") and, as a bonus, lets us control differences between debug and production environments.
Node.js is cross platform, so we totally have developers working on all sorts of computers, and it's no problem at all.
This is an example config file I use on a file storage project:
/**
* All of these are mandatory except for log_level (which defaults to "info", 1)
* and log_echo_to_console (which defaults to false)
*/
exports.config = {
log_level: 0,
log_file: "/path/to/send.log",
request_log_file: "/path/to/send_requests.log",
log_echo_to_console: true,
port_number: 8088,
no_notification_emails: true,
image_url_base: "http://s3.amazonaws.com/", // MAKE SURE THIS ENDS IN "/"
tmp_file_folder:"/tmp/",
s3_info: {
key: 'xxxxxx',
secret: 'yyyyy',
file_bucket: 'sendtransfer/',
},
backend_info: {
db_info: {
server: "localhost",
user: "db_user",
password: "secret",
database: "SendRemote",
pooled_connections: 125,
idle_timeout_millis: 30000
},
memcache_info: {
host: "127.0.0.1",
port: "31111",
pooled_connections: 200,
timeout: 20000
}
},
debug_server: true
};
For Windows machines, just change the paths. It's all good!
Then in code, you can just type:
var local = require('local.config.js');
fs.writeFile(local.config.log_file);
// etc
Embrace multiculturalism!!!

I am also on Windows 7 and use Virtualbox with a Linux ( debian ) guest, i would recommand it because I for myself am faster doing some stuff in the commandline then clicking arround in Windows.
Another nice feature is that if you put your VM on an USB stick you can take it with you and use it everywhere where a Virtualbox Host is installed, so you can take your whole development environment with you.
It's no problem at all to use your favourite text editor or browser in Windows, just install samba and mount your home directory into Windows.
Same goes for your browser since the VM is just another machine in your LAN, instead of pointing your browser to localhost point it to the VMs Ip and you are fine.
Obvious con here is if you don't have any experience with Linux yet you should probably stick to windows because it will take you some time to get into it.

just my two cents maybe even less:
I'll suggest you a third option: to double install windows/ubuntu setup (preferably ubuntu dist which is most gui friendly) and research this option as well this way you would be more familiar with the linux/unix and even iOS which will even make you understand windows better and a better programmer. Sometimes the virtual box is too slow, while linux is very efficient with resources.
If you have the ability to install a virtual machine,you can also give a go to installing a linux distribution and get yourself familiar with this language/system of OS which a lot of the web is structured upon

I really enjoy coding node.js on windows using git bash:
http://blog.nodester.com/post/19902515151/tips-for-windows-users
It's seems faster then and easier then running VirtualBox. Given that I still use Virtual Box for testing before going to production.

Related

how can i install heroku in my kali linux operating system?

I cant install heroku in my kali linux operating system. how can i resolve this issue?
isn't it not possible to run heroku in kali linux?
when I have try to install, it show snap command not found.
Heroku no longer supports Snap installs:
Snap installs are no longer supported. Please use another install method below.
Since Kali is derived from Debian, you should be able to use the Debian / Ubuntu method (which doesn't auto-update) or the standalone tarball method (which does). You can also use the NPM / Yarn package if you prefer, though Heroku recommends against it.
All of these options require some amount of trust in Heroku. The first two pull a script down from the Internet and pipe it into sh, which always makes me a bit uneasy. I suspect they both request elevated privileges during the install process. Instead of piping the file directly in to sh as Heroku recommends, I suggest you download it and at least give it a quick read through the first time.
In any case, here is the command that Heroku recommends to install the standalone version:
curl https://cli-assets.heroku.com/install.sh | sh

Yarn not working on windows + react-native-builder-bob, not even showing an error message

I'm developing a lib for common use in a couple react-native projets and for that I'm using a scaffolding lib recommended on react-native official docs page. This is what the company uses, so I have to use it too.
For some reason, running yarn from the command line on my windows machine does absolutely nothing, not even outputs an error message. The company had to lend me a Mac so I can work on the lib. I'm not saying just yarn commands like trying to install packages, even running yarn --version gives me no output, it just halts.
That's the strange part, it only happens if I'm running yarn from inside the project's folder. If I run yarn on my windows machine from some arbitrary folder or any project that does not uses react-native-builder-bob, yarn works normally. I can install packages, check the version, run commands, everything ok. That makes me think it's not something wrong with my yarn installation. Both the mac and my windows have installed version 1.22.10.
I dug through the issues on bob's github but could find nothing regarding windows and yarn. I also have a spare SSD which I tried running a fresh windows install, setting up my work environment again and still got the same issue.
I really want to use my windows machine to work on this project since it's way more powerful than the mac they lend me. Any help would be much appreciated
I had the same problem. Fixed it by changing options object scripts/bootstrap.js
const options = {
cwd: process.cwd(),
env: process.env,
stdio: 'inherit',
encoding: 'utf-8',
shell: true //add this property
};
I'm assuming you have already installed yarn and node.

How to install Redis on Windows 10 pc [duplicate]

How do I run Redis on Windows? The Redis download page just seems to offer *nix options.
Can I run Redis natively on Windows?
Historically, Microsoft had a Windows port of redis, which was released as Redis-64, which offers a full distribution of redis for Windows.
The Microsoft port is now deprecated, but some alternatives have sprung up to fill that void:
Memurai is the alternative officially recommended on the Redis-64 deprecation page; it is a commercial offering with free developer tier, maintained by Janea Systems
redis-windows is another unofficial port, which also exists
This release includes the redis-server.exe (memurai.exe on Memurai) application that runs a Redis instance as a service on your windows machine, as well as redis-cli.exe (memurai-cli.exe on Memurai) which you can use to interact with any Redis instance.
The RGL repository has historically been listed as an alternative Windows port for Redis, but this repository has not been maintained for some time and implements an older version of Redis than the Microsoft port.
Update
If you have Windows Subsystem for Linux (WSL), natively on Windows 10 and Windows Server 2019 you can do it per
Ogglas answer
Or follow these instructions to run a Redis database on Microsoft Windows
Turn on Windows Subsystem for Linux
In Windows 10, Microsoft replaced Command Prompt with PowerShell as the default shell. Open PowerShell as Administrator and run this command to enable Windows Subsystem for Linux (WSL):
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Reboot Windows after making the change — note that you only need to do this once.
Launch Microsoft Windows Store
start ms-windows-store:
Then search for Ubuntu, or your preferred distribution of Linux, and download the latest version.
Install Redis server
Installing Redis is simple and straightforward. The following example works with Ubuntu (you'll need to wait for initialization and create a login upon first use):
sudo apt-add-repository ppa:redislabs/redis
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install redis-server
Please note that the sudo command might or mightn't be required based on the user configuration of your system.
Restart the Redis server
Restart the Redis server as follows:
sudo service redis-server restart
Verify if your Redis server is running
Use the redis-cli command to test connectivity to the Redis database.
$ redis-cli
127.0.0.1:6379> set user:1 "Ben"
127.0.0.1:6379> get user:1
"Ben"
Please note: By default, Redis has 0-15 indexes for databases, you can change that number of databases NUMBER in redis.conf.
Stop the Redis Server
sudo service redis-server stop
Source :How to Install Redis on Windows
I found one more simple way to install Redis under Windows
Download the latest Redis .msi file from
https://github.com/MSOpenTech/redis/releases
after installation. The Redis service is installed, and we can operate it from Service manager
If you want to install MSOpenTech's latest port of Redis, on a Windows server, watched over by a Windows Service, without having to build anything yourself, read on.
MSOpenTech's seems to be the only port that is actively trying to keep up with the latest and greatest Redis. They claim it is production-ready, but they haven't exactly packaged it up neatly for installation on a server, especially if you want to run their RedisWatcher service to keep an eye on it, which is recommended. (I tried building RedisWatcher myself per their instructions, but the required Wix Toolset managed to mess up my system pretty good. I won't go into it.) Fortunately they've provided all the binaries you need, just not all in one place. From the README:
So far the RedisWatcher is not carried over to 2.6. However this
should not be affected by the Redis version, and the code in the 2.4
branch should work with the Redis 2.6 binaries.
So you'll need to download binaries from 2 branches in order to get all the necessary bits. Without further ado, here are the steps:
Download and extract the Redis binaries from the 2.6 branch
Copy all extracted binaries to c:\redis\bin
Create another folder at c:\redis\inst1
Download and extract the RedisWatcher binaries from the 2.4 branch
Run InstallWatcher.msi. This should create a Windows service called Redis watcher.
Open up the Windows Services console and start the Redis watcher service.
(optional) RedisWatcher should have installed to C:\Program Files (x86)\RedisWatcher. There you'll find a config file called watcher.conf, which you can edit to set up additional instances, use different paths than I specified in steps 2 & 3, etc. You will not need to restart the service for changes to take effect.
The most updated (only few minor releases behind) version of Redis can be found here. This repository provides you with 3.2.100 version (current is 3.2) whereas the most upvoted answer gives you only 2.4.6 version and the last update to the repo was 2 years ago.
The installation is straightforward: just copy everything from the archive to any folder and run redis-server.exe to run the server and redis-cli.exe to connect to this server through the shell.
To install Redis for Windows
You can choose either from these sources
https://github.com/MSOpenTech/redis/releases
or
https://github.com/rgl/redis/downloads
Personally I preferred the first option
Download Redis-x64-2.8.2104.zip
Extract the zip to prepared directory
run redis-server.exe or redis-server.exe --maxheap 2gb
then run redis-cli.exe
You can start using Redis now, please refer for commands
Maybe its a little Late but, I was able to run Redis on Windows 10 Aniversary Update.
Windows 10 Aniversary Update Comes with Bash on Ubuntu on Windows, simply, it comes with bash.
Below are the two tutorial that I followed:
1- How to Install and Use the Linux Bash Shell on Windows 10
2- How To Install and Use Redis
Below is the image of running Redis.
Enjoy :)
If you have Windows Subsystem for Linux (WSL), natively on Windows 10 and Windows Server 2019 you can do it like this:
Set up WSL:
To enable Windows Subsystem for Linux, follow the instructions on
Microsoft Docs. The short version is: In Windows 10, Microsoft
replaces Command Prompt with PowerShell as the default shell. Open
PowerShell as Administrator and run this command to enable Windows
Subsystem for Linux (WSL):
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Reboot Windows after making the change—note that you only need to do this one time.
Download and install one of the supported Linux distros from the Microsoft Store. Ubuntu works fine.
Note that Ubuntu 20.04 LTS may give you some trouble because of a known issue with the realtime clock (as of August 2020). Choosing Ubuntu 18.04 LTS instead avoids that issue.
Install and Test Redis:
Launch the installed distro from your Windows Store and then install redis-server. The following example works with Ubuntu (you’ll need to wait for initialization and create a login upon first use):
> sudo apt-get update
> sudo apt-get upgrade
> sudo apt-get install redis-server
> redis-cli -v
Restart the Redis server to make sure it is running:
> sudo service redis-server restart
Execute a simple Redis command to verify your Redis server is
running and available:
$ redis-cli
127.0.0.1:6379> set user:1 "Oscar"
127.0.0.1:6379> get user:1
"Oscar"
To stop your Redis server:
> sudo service redis-server stop
Source:
https://redislabs.com/blog/redis-on-windows-10/
https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux
Go to the releases and you can get a ZIP file containing the relevant files as well as a Word document called RedisService.docx with the following instructions:
Installing the Service
--service-install
This must be the first argument on the redis-server command line. Arguments after this are passed in the order they occur to Redis when the service is launched. The service will be configured as Autostart and will be launched as "NT AUTHORITY\NetworkService". Upon successful installation a success message will be displayed and Redis will exit.
This command does not start the service.
For instance:
redis-server --service-install redis.windows.conf --loglevel verbose
And then later, in the same document, another example:
The following would install and start three separate instances of Redis as a service:
redis-server --service-install -–service-name redisService1 –port 10001
redis-server --service-start --service-name redisService1
redis-server --service-install --service-name redisService2 –port 10002
redis-server --service-start --service-name redisService2
redis-server --service-install --service-name redisService3 –port 10003
redis-server --service-start --service-name redisService3
From what I can gather, this appears to be the new way forward rather than messing with a separate Windows service to monitor and restart the CLI.
Download redis from
Download Redis for windows
Then install it
open cmd with admin rights
run command net start redis
Thats it.
MS Open Tech recently made a version of Redis available for download on Github. They say that it isn't production ready yet, but keep an eye on it.
Github repo
Download releases as MSIs
You can use Memurai for Windows, a Redis-compatible cache and datastore for Windows, currently compatible with Redis 5. Memurai aims to fulfill the need for a supported Redis-compatible datastore on the Windows platform. At its core, it’s based on Redis source code, ported to run natively on Windows, and it’s designed to provide the level of reliability and performance required for production environments. Memurai is free for development and testing. You can learn more and download Memurai at https://www.memurai.com.
Alexis Campailla
CEO, Memurai
There are two ways. You can use MSI installation file or do it manually:
First download the msi or the zip file:
You can download both files from here:
https://github.com/MicrosoftArchive/redis/releases
Watch video tutorial (video covers example of both installations)
See this installation video tutorial: https://www.youtube.com/watch?v=ncFhlv-gBXQ
Instruction - for those who can not YT at work:
You can download a moderately out-of-date precompiled version of Redis for 32-bit
and 64-bit Windows thanks to Dusan Majkic from his GitHub page: https://github.com/dmajkic/redis/downloads. Go ahead and do that now.
After you download Redis, you’ll need to extract the executables from the zip file.
As long as you’re using a version of Windows more recent than Windows XP, you
should be able to extract Redis without any additional software. Do that now.
After you’ve extracted either the 32- or 64-bit version of Redis to a location of your
choice (depending on your platform and preferences; remember that 64-bit Windows
can run 32- or 64-bit Redis, but 32-bit Windows can only run 32-bit Redis), you can
start Redis by double-clicking on the redis-server executable. After Redis has
started, you should see a window similar to figure A.1.
src: https://redis.com/ebook/appendix-a/a-3-installing-on-windows/a-3-2-installing-redis-on-window/
Since MSOpenTech's port of Redis is no longer maintained - anyone interested in native port of Redis for Windows can now get the version 4.0.14 and 5.0.10 from here: https://github.com/tporadowski/redis/releases.
This fork is a merge of latest 3.2.100 version from MSOpenTech and 4.0.14/5.0.10 from antirez/redis with a couple of bugfixes.
I don't run redis on windows. There's too much hassle involved in keeping up with the ports, and they lag behind redis-stable by a version or two all the time.
Instead I run redis on a Vagrant virtual machine that runs redis for me. I've bundled up the whole thing into a simple github repo so everyone can get in on the fun without too much hassle. The whole thing is an automated build so there's no mess. I blogged about the details here.
To install Redis on Windows system follow the below steps:
Visit one of the below link:
https://github.com/MSOpenTech/redis/releases (recommended)
https://github.com/rgl/redis/downloads
Download MSI file.
Follow the installation Wizard and install the program on your system. (do not change the installation path that is "C:\Program Files\Redis")
Search for "Edit system environment variable" on your start menu
Click on "Environment Variable" button
Select "Path" and click on "Edit"
Now click on "New"
Paste C:\Program Files\Redis (or the path in case you have changed while installing)
Click on "Okay", "Okay" and "Okay"
Now open your Terminal (command prompt) and run redis-cli
Well I am getting some error to open redis-server (It was working fine till now but not sure what's wrong so figuring out and will update this answer)
I think these is the two most simple ways to run Redis on Windows
1 - Native (and updated) port for Windows
As described here on Option 3) Running Microsoft's native port of Redis:
Download the redis-latest.zip native 64bit Windows port of redis
wget https://github.com/ServiceStack/redis-windows/raw/master/downloads/redis-latest.zip
Extract redis64-latest.zip in any folder, e.g. in c:\redis
Run the redis-server.exe using the local configuration
cd c:\redis
redis-server.exe redis.conf
Run redis-cli.exe to connect to your redis instance
cd c:\redis
redis-cli.exe
2 - With Vagrant
You can use Redis on Windows with Vagrant, as described here:
Install Vagrant on Windows
Download the vagrant-redis.zip vagrant configuration
wget https://raw.github.com/ServiceStack/redis-windows/master/downloads/vagrant-redis.zip
Extract vagrant-redis.zip in any folder, e.g. in c:\vagrant-redis
Launch the Virtual Box VM with vagrant up:
cd c:\vagrant-redis
vagrant up
This will launch a new Ubuntu VM instance inside Virtual Box that will
automatically install and start the latest stable version of redis.
If you're happy with a bit of Powershell, you can also get very up-to-date Windows binaries using Powershell and chocolatey.
First, add chocolatey to Powershell following the instructions here (one simple command line as admin): https://chocolatey.org/
#powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
Then, use Powershell to get the redis package from chocolatey: http://chocolatey.org/packages/redis-64
choco install redis-64
Redis will be installed in something like C:\ProgramData\chocolatey\lib\redis-64.2.8.9
Windows PowerShell Copyright (C) 2013 Microsoft Corporation. All
rights reserved.
PS C:\windows\system32> choco install redis-64 Chocolatey (v0.9.8.27)
is installing 'redis-64' and dependencies. By installing you accept
the license for 'redis-64' an d each dependency you are installing.
redis-64 v2.8.9 Added
C:\ProgramData\chocolatey\bin\redis-benchmark.exe shim pointed to
'..\lib\redis-64.2.8.9\redis-benchmark.exe'. Added
C:\ProgramData\chocolatey\bin\redis-check-aof.exe shim pointed to
'..\lib\redis-64.2.8.9\redis-check-aof.exe'. Added
C:\ProgramData\chocolatey\bin\redis-check-dump.exe shim pointed to
'..\lib\redis-64.2.8.9\redis-check-dump.exe'. Added
C:\ProgramData\chocolatey\bin\redis-cli.exe shim pointed to
'..\lib\redis-64.2.8.9\redis-cli.exe'. Added
C:\ProgramData\chocolatey\bin\redis-server.exe shim pointed to
'..\lib\redis-64.2.8.9\redis-server.exe'. Finished installing
'redis-64' and dependencies - if errors not shown in console, none
detected. Check log for errors if unsure
Then run the server with
redis-server
Or the CLI with
redis-cli
Follow the instructions in C:\ProgramData\chocolatey\lib\redis-64.2.8.9\RedisService.docx to install the redis service
The Redis download page now has links to some unofficial Windows ports. The dmajkic one seems to be the most popular/complete.
More detailed answer: How to run Redis as a service under Windows
One of the most easy way to run Redis on windows host is to use Docker Redis container. Just fire up Hyper-V, Download Docker and run Redis
I am using Memurai which is Redis-compatible cache and datastore for Windows. It is also recommended by Microsoft open tech as it written on their former project here.
This project is no longer being actively maintained. If you are
looking for a Windows version of Redis, you may want to check out
Memurai. Please note that Microsoft is not officially endorsing this
product in any way.
you can install Redis by following this article:
https://github.com/ServiceStack/redis-windows
but for going straight, you can download it by this link:
https://github.com/ServiceStack/redis-windows/raw/master/downloads/redis-latest.zip
after downloading, go to the directory which you like to put your files,then extract the zip file, then open a command prompt and go to the directory where you extracted your file, then type "redis-server" and hit enter(for opening redis-cli open command and route to redis directory, but instead of "redis-server" execute "redis-cli").
I've provided installation instructions and downloads for the 2 most popular ways of running Redis on windows at: https://github.com/mythz/redis-windows that shows how to:
Use Vagrant to run the latest stable version of Redis inside a
VirtualBox VM.
Download and run Microsoft's Native Windows port of Redis
Using Windows 10?
https://learn.microsoft.com/en-us/windows/wsl/install-win10
/etc/apt/sources.list
(Debian 10 Buster/Bullseye)
Installs latest stable Redis (5.0.6 at time of posting)
deb https://deb.debian.org/debian bullseye main
deb https://deb.debian.org/debian bullseye-updates main
deb http://security.debian.org/debian-security/ buster/updates main
deb http://ftp.debian.org/debian bullseye-backports main
apt install redis-server
Today I know these 4 options:
The first is an open source fork that is on tporadowski/redis that offers compatibility with version 5 (version 6 in development).
The second is memurai (paid), compatible with version 5, has support and a free version for development.
The third is the zkteco-home/redis-windows recently, which offers compatibility with version 7, but is not open source.
There is also the option to run via WSL. But I don't recommend it in production environments.
You can try out baboonstack, which includes redis and also a node.js and mongoDB version manager. And it's cross platform.
The redis version on windows was published by microsoft open tech team But recently this project has been archived to https://github.com/MicrosoftArchive/redis read-only and will not update. Has stopped development
Here are my steps to install Redis 4.0.8 on Windows 10 Pro (1709) via Windows Subsystem for Linux:
in home/user/
01 wget http://download.redis.io/releases/redis-4.0.8.tar.gz
02 tar xzf redis-4.0.8.tar.gz
03 cd redis-4.0.8/
04 sudo apt-get install make
05 sudo apt-get update
06 sudo apt-get install gcc
07 cd deps
08 make hiredis jemalloc linenoise lua geohash-int
09 cd ..
10 make
You can skip several steps if you have an up-to-date environment.
The MSOpenTech-Redis project is no longer being actively maintained. If you are looking for a Windows version of Redis, you may want to check out Memurai. Please note that Microsoft is not officially endorsing this product in any way. More details in https://github.com/microsoftarchive/redis
To install & setup Redis Server on Windows 10 https://redislabs.com/blog/redis-on-windows-10
To install & setup Redis Server on macOS & Linux https://redis.io/download
Also, you may install & setup Redis Server on Linux via the package manager
For quick Redis Server Installation & Setup Guide for macOS https://github.com/rahamath18/Redis-on-MacOS
You can go through the below steps and get setup redis in windows.
Download the Redis zip file. Click here!
Extract the zip file to the prepared directory.
Run redis-server.exe, you can either directly run redis-server.exe by clicking or run via command prompt.
Run redis-cli.exe, after successfully running the redis-server. You can access it and test commands by running redis-cli.exe Test
PING command is used to test if a connection is still alive.
Reading about some users running Redis in a VM, it brought to my mind the recommendations from Redis team :
Redis runs slower on a VM. Virtualization toll is quite high because for many common operations. (...) Prefer to run Redis on a physical box, especially if you favor deterministic latencies. On a state-of-the-art hypervisor (VMWare), result of redis-benchmark on a VM through the physical network is almost divided by 2 compared to the physical machine, with some significant CPU time spent in system and interruptions.

Specifying JupyterHub Path Variable

I am in the process of installing jupyterhub. I successfully install jupyterhub using:
python3 -m pip install jupyterhub
npm install -g configurable-http-proxy
However, when I run jupyterhub -h in the Windows command prompt it gives:
"jupyterhub" is not recognized as an internal or external command, operable
program or batch file.
I added C:\Users\User\AppData\Local\Continuum\Anaconda3\Lib\site-packages\jupyterhub\ to my user environment variable, however still receive the message. What path should I be using?
Please note that according to this, Jupyterhub is not officially supported for Windows yet.
That aside, you could dockerize it to make your life easier. For this error, please check if you can see the executable in C:\Program Files\Continuum Analytics\Anaconda3\scripts. The lib directory you're specifying contains python source files and not the executables.
I had this same issue, and I saw this occurred because jupyterhub is a python script rather than an executable. So to run this on Windows I needed to execute it like python C:\Program Files\Continuum Analytics\Anaconda3\scripts\jupyterhub.
However, I still was unable to run jupyterhub on Windows because it depends on the pwd module, which is a Unix/Linux only module.
As others have said, Windows is not a supported platform. JupyterHub is best used on Linux-like platforms where you have Docker or something similar to conatainerize each user's session.
A good alternative is to install Oracle VirtualBox and run a local VM. I run a 64-bit Ubuntu and it's quite good performance. It makes things much easier to run JupyterHub on. Asides depending on pwd, there are also assumptions around user-creation and other activities that Windows isn't going to handle well.
In short, if you want to run on native Windows, you're going to become the first JupyterHub Windows contributor. I looked at doing it but it looked like too much effort.
The upside of running a VM is that behaviour in the VM is going to more closely resemble what you have running on the server anyway. If you don't plan running on a server, then just "jupyter notebook", as this is all JupyterHub ends up running...

Why Rethinkdb don't have binary for windows?

I am interested in Rethinkdb and would like to develop/test on it, but main problem is: it don't have package for windows operating system. I tried to compile from source code, that was also not possible as there was no any instruction.
What makes it so difficult to make executable for windows? Is there any alternative way to install Rethinkdb in windows OS? even very small and not that famous application has windows binary but not Rethinkdb. It is quite surprise for me. Another surprising is there are many community executable for other OS but not windows.
Thank you for understanding and waiting for good answer.
Rethinkdb just announced that it started development for Windows. Please follow
[1] https://github.com/rethinkdb/rethinkdb/issues/1100
[2] https://twitter.com/segphault/status/590633792781611009
Update:
RethinkDB announced in Windows :
[3] https://rethinkdb.com/docs/install/windows/
Cross-platform development isn't that easy. RethinkDB uses some features under the covers which makes porting it to Windows a difficult job, f.e. a Unix toolchain for the builds and Unix syscalls. For more information on that have a look at this GitHub issue. It states that Windows support is planned, but with low priority.
As a quick fix, you could RethinkDB run in a virtual machine or in Microsoft Azure. For the second one, I wrote a blog post a few weeks ago.
RethinkDB has already started development for Windows. While it's not released yet, this is how you can run it through Vagrant. See: https://github.com/gearz-lab/rethinkdb-vagrant
I'm using Chocolatey, feel free to skip steps if they don't apply.
Installing Chocolatey
Open Powershell as an administrator and run this command:
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
... now you should have Chocolatey installed. We're gonna use to install the others.
Installing Vagrant
Run this as an administrator:
choco install vagrant -y
Installing VirtualBox
Vagrant relies on a virtualization application that it calls a "provider". The default one is VirtualBox so let's install it. Run cmd as administrator and run this:
choco install virtualbox -y
Now you should be able to run the vboxmanage command. If it doesn't work, make sure C:\Program Files\Oracle\VirtualBox is in your PATH.
Installing Cygwin
We're gonna log on a virtual machine using SSH, so we need a SSH enabled terminal. For that, let's use Cygwin.
choco install cyg-get -y
Installing Cygwin packages
There'are two Cygwin packages we need to install, openssh, because Cygwin doesn't have SSH support by default, and rsync so Vagrant can use it to synchronize files between the host and the guest machines.
On PowerShell, running as an administrator, let's run these commands:
cyg-get openssh
cyg-get rsync
Cloning rethinkdb-vagrant
Open the Cygwin64 Terminal. You should now be in your Cygwin home folder, which should look like C:\tools\cygwin\home\[YOUR_USER].
Make sure you have git installed. If you don't just choco install git -y. Now, clone rethyinkdb-vagrant:
git clone https://github.com/gearz-lab/rethinkdb-vagrant.git
Now you should have a directory like this: C:\tools\cygwin\home\[YOUR_USER]\rethinkdb-vagrant.
Starting Vagrant and useful commands
From inside the Cygwin64 Terminal home directory (described in the last step), type cd rethinkdb-vagrant, now, any Vagrant commands will target cd rethinkdb-vagrant.
To setup and boot the machine: vagrant up (After this, RethinkDB is available, see next step).
To access the machine's terminal: vagrant ssh.
To destroy the machine (every RethinkDB data will be lost): vagrant destroy.
To suspend the machine: vagrant suspend.
To resume a suspended machine: vagrant resume.
Accessing RethinkDB.
Make sure you have vagrant up from the last step. Now:
For accessing the web administration tool: http://localhost:8080.
For accessing RethinkDB from a client app, the port is 28015.

Resources