简体   繁体   English

如何在Windows 10上的Linux子系统上安装Ngrok 2.0

[英]How to install Ngrok 2.0 on linux subsystem on Windows 10

I am trying to use Ngrok to create an introspected tunnel to localhost webhook development tool on my Linux subsystem (Powershell --> bash) 我正在尝试使用Ngrok在我的Linux子系统上创建一个到localhost webhook开发工具的内省隧道(Powershell - > bash)

I try to install ngrok using the following: 我尝试使用以下命令安装ngrok:

sudo apt install ngrok-client

From what I understand the sudo command used installs ngrok v 1.6. 根据我的理解,使用的sudo命令安装了ngrok v 1.6。 When I attempt to execute ngrok 80 I get an error: 当我尝试执行ngrok 80我收到一个错误:

Invalid address server_addr 'ngrokd.ngrok.com:443'

I searched for this in another post and was informed that ngrok v. 1.6 is obsolete and in order to continue using ngrok would be to upgrade to 2.0 我在另一篇文章中搜索了这个,并被告知ngrok v.1.6已经过时,为了继续使用ngrok将升级到2.0

Testing PayPal with Rails 使用Rails测试PayPal

It's advised to download from the website http://ngrok.com , which is simple enough, but what is the correct way to download for linux subsystem use? 建议从http://ngrok.com网站下载,这很简单,但下载linux子系统的正确方法是什么? Should I download for Linux and unzip? 我应该下载Linux并解压缩吗? Or am I suppose to download for Windows? 或者我想为Windows下载?

Let me know if I'm misunderstanding anything 如果我误解了什么,请告诉我

I use ubuntu since years, I trust the online instructions so either do: 我使用ubuntu多年,我相信在线说明,所以要么:

sudo apt-get update
sudo apt-get install ngrok-client

or try to use this instruction and let me know if you have problems 或尝试使用此说明 ,如果您遇到问题,请告诉我

the same instructions are included hear 包含相同的说明

$ unzip /path/to/ngrok.zip

$ is just the sign from your terminal. $只是您终端的标志。 You do not need to input $ , but you need to open the terminal (ctrl+alt+t), run the unzip command to unzip the folder. 你不需要输入$ ,但你需要打开终端(ctrl + alt + t),运行unzip命令来解压缩文件夹。 You will find the folder under your downloads. 您将在下载中找到该文件夹​​。 So / is the root of your machine. 所以/是你机器的根。 You need to go inside your home folder which will be /home so you do cd (change directory) followed by that path 你需要进入你的家庭文件夹,这将是/home所以你做cd (更改目录),然后是该路径

cd /home

then you do ls to list all the directories. 那么你做ls列出所有目录。 You should see your profile with your name username . 您应该看到您的个人资料名称username You should be able to get in the download folder with cd <username>/Downloads where <username> should be replaced with your personal folder name 您应该可以使用cd <username>/Downloads进入下载文件夹,其中<username>应替换为您的个人文件夹名称

At this point you are inside the Downloads directory. 此时,您位于Downloads目录中。 You can do an ls in your terminal, find the name of the file you downloaded (should be something like ngrok-stable-linux-amd64.zip ) and run 您可以在终端中执行ls ,找到您下载的文件的名称(应该是类似于ngrok-stable-linux-amd64.zip )并运行

unzip <file-name.zip>

where file name is the file you downloaded (something like ngrok-stable-linux-amd64.zip ) or you can go back to the root directory and run 其中文件名是您下载的文件(类似于ngrok-stable-linux-amd64.zip ),或者您可以返回根目录并运行

cd /
unzip /home/<username>/Downloads/<yourfile.zip>

Read the documentation on how to use ngrok. 阅读有关如何使用ngrok的文档 Try it out by running it from the command line: 通过从命令行运行它来尝试:

./ngrok help

Also I read from the documentation, that you can set up that address 我还从文档中读到,您可以设置该地址

There is some discussion online about this 网上有一些关于此的讨论

Testing PayPal with Rails 使用Rails测试PayPal

I can help you more but I need your feedback 我可以帮助你更多,但我需要你的反馈

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM