Installing KVM for Asp.Net VNext - kvm

I want to play with the new aspnet vnext, but it needs kvm to be installed.
Here they say that i need to clone the repo and run kvmsetup.cmd. BUT there is no such file when i clone the repo.
So i went back to their home page, i cloned the repo (home), now i can see a kvmsetup.cmd file. when i run it in the powershell it doesnt install KVM !!
Thanks for your help.
UPDATE:
i had this problem :
I resolved this problem by opening the powershell as an administrator with the following command : Set-ExecutionPolicy RemoteSigned.
It did work, but it didn't add KVM to the path :

Try executing kvm outside of the cloned directory.

This has changed now. Just open command prompt with admin rights and run this to install KVM.
#powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.ps1'))"
That will download KVM and set all the corrects paths. Unrestricted wont work if you don't run CMD with Admin rights.
Close the command prompt and reopen command prompt to start using KVM

Related

I want to install git-secret on a windows machine

I found the command to install git-secret as 'chocolatey install git-secret' or 'scoop install git-secret' in a power shell. Both of the commands are giving errors as manifest not found. Is there any command with which I can install git-secret? Please help.
Perhaps this will be of help?
Launch a powershell instance as Administrator
PS C:\> git clone https://github.com/awslabs/git-secrets.git
PS C:\> cd git-secrets
PS C:\git-secrets> ./install.ps1
This could be wrapped-up in a chocolatey package if you are rolling this out to the masses.
Original solution found here:
https://faun.pub/git-secrets-installation-in-windows-60a29ff1260c

Download and install wget

I am new in using API to download data. I have to install wget on my Windows 10 64-bit machine but not sure how to proceed. Where to download and how to install it properly. Could you share with me the necessary steps?
Thanks
M
I installed wget on my command line for Windows 10 64-bit machine using the following steps:
Download the wget setup EXE here: https://sourceforge.net/projects/gnuwin32/files/wget/1.11.4-1/wget-1.11.4-1-setup.exe/download?use_mirror=excellmedia
Run the EXE, and accept all the defaults
Now you have the wget app that you access via your command line, as there is no GUI. You can access wget in two ways..1) cd to the directory, or 2) add it as an environment variable, so you can access it from any directory on the command prompt. I would recommend the second approach if you plan on using wget frequently:
Cd to Wget- copy the following and paste to your command line:
cd \Program Files (x86)\GnuWin32\bin
Once in this folder, your can now type wget and all of its functions
Add Environment Variable- instead of having to manually cd to the directory for wget, you can just add wget as an environment variable. First, open file explorer and paste the following into the directory:
Control Panel\System and Security\System
click Advanced System Settings -> click Environment Variables -> select ‘Path’ in the Environment Variables window -> click Edit -> click New -> click Browse -> then enter this location:
C:\Program Files (x86)\GnuWin32\bin
click Ok on each window to exit. Now close your terminal and open it again. You can now evoke wget from any directory on your command prompt, without having to manually cd into the directory that houses the wget app.
You can first make use of a bash console on your Windows 10.
Take a look at the instruction:
how-to-install-and-use-the-linux-bash-shell-on-windows-10
After enabling this feature you will be able to install wget from Ubuntu terminal using:
sudo apt-get install wget
Alternative solution found on superuser:
how-to-download-files-from-command-line-in-windows-like-wget-is-doing

Vagrant 1.9.6 hangs on command "vagrant ssh"

I have vagrant 1.9.6 and oracle virtual box 5.1.22 installed on my system. when I ran vagrant up and tried to switch into vagrant ssh on GIT bash it hangs there and nothing get it to work on me.
screenshot:
I solved mine by adding this line export VAGRANT_PREFER_SYSTEM_BIN=1 in my .bash_profile file. You can manually create this file on windows and place it on your home directory.
Take a look at this thread

dnx is not recognize to run asp.net 5 application

try to run Asp.Net 5 Application through command prompt by using command
C:\asp.net5App\src\asp.net5>dnx .web
error message that I am getting.
'dnx' is not recognized as an internal or external command,
operable program or batch file.
Run dnvm upgrade.
If dnvm is not recognized, follow the instructions on the Home repo to install it, then do the previous step.
I am tied of this thread, because it has so many misleading answers that happen to work for some people and not for others. But anyway this is what worked for me.
Install visual studio 2015 (Enterprise)
open Developer Command Prompt for VS2015 and ran the following commands
#powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}"
the above installs .NET Version Manager (DNVM)
Then i cd into the folder where dnvm has been installed e.g
cd /Users/johnny/.dnx/bin
there i ran these commands
dnvm upgrade -r coreclr (To install DNX for .NET Core)
dnvm upgrade -r clr (To install DNX for the full .NET Framework)
then i ran
dnvm setup (to firmly setup the path)
then i got out of /Users/johnny/.dnx/bin and ran
where dnvm = C:\Users\johnny.dnx\bin\dnvm.cmd
dnvm = produced a batch of commands options to be used
Check that you've got an active runtime before you can use dnx.
dnvm use

Manual Installation of Glassfish on Ubuntu

I just installed Glassfish on my Ubuntu server (No GUI) using THIS tutorial. Everything went well. But now when I'm trying to play with ASADMIN tool it's telling me this:
The program 'asadmin' is currently not
installed. You can install it by
typing: apt-get install glassfishv2
-bash: asadmin: command not found
So, in order to run asadmin tool always need to type:
/opt/glassfish/bin/asadmin start-domain domain1
or go to that folder and run it from there.
So, the question is, what file do i need to edit in order to set this path in to the environment.
You can add the following to your ~/.bashrc file to add all the binaries in /opt/glassfish/bin to your $PATH
export PATH=$PATH:/opt/glassfish/bin
~ expands to /home/your-user - just to be clear.
Just type to CLI:
export PATH=/opt/glassfish/bin/:$PATH