![ngrok 在 ubuntu 12.04 中的安装](https://linux22.com/image/877829/ngrok%20%E5%9C%A8%20ubuntu%2012.04%20%E4%B8%AD%E7%9A%84%E5%AE%89%E8%A3%85.png)
在 ubuntu 中安装 ngrok 时遇到问题,我去了https://ngrok.com/download并为 ubuntu 下载它,但它总是提供二进制文件,不允许我们在 ubuntu 中运行,有人可以建议任何其他方式安装它吗?
答案1
要安装 32 位版本:
wget https://dl.ngrok.com/ngrok_2.0.19_linux_386.zip
unzip ngrok_2.0.19_linux_386.zip
在那之后
./ngrok
您将会看到这一点,已在我的 32 位系统上进行了测试。
NAME:
ngrok - tunnel local ports to public URLs and inspect traffic
DESCRIPTION:
ngrok exposes local networked services behinds NATs and firewalls to the
public internet over a secure tunnel. Share local websites, build/test
webhook consumers and self-host personal services.
Detailed help for each command is available with 'ngrok help <command>'.
Open http://localhost:4040 for ngrok's web interface to inspect traffic.
EXAMPLES:
ngrok http 80 # secure public URL for port 80 web server
ngrok http -subdomain=baz 8080 # port 8080 available at baz.ngrok.io
ngrok http foo.dev:80 # tunnel to host:port instead of localhost
ngrok tcp 22 # tunnel arbitrary TCP traffic to port 22
ngrok tls -hostname=foo.com 443 # TLS traffic for foo.com to port 443
ngrok start foo bar baz # start tunnels from the configuration file
VERSION:
2.0.19
AUTHOR:
inconshreveable - <[email protected]>
COMMANDS:
authtoken save authtoken to configuration file
credits prints author and licensing information
http start an HTTP tunnel
start start tunnels by name from the configuration file
tcp start a TCP tunnel
test test ngrok service end-to-end
tls start a TLS tunnel
update update to the latest version
version print the version string
help Shows a list of commands or help for one command
答案2
它适用于较高版本,但我不确定是否适用于 12.04:
apt-get install ngrok-client
答案3
我遇到了类似的问题——运行 Ubuntu 16.04 LTS(64 位)。我按照以下说明操作 @恩格洛克,但无法让命令ngrok http 8080
按照我读到的应该的方式做出响应。在阅读和观看之后这YouTube 视频让我找到了我需要的东西。注意:视频没有语音,但它清楚地表明了解压后的可执行文件的安装位置,这是关键。
下载后,我在终端中从压缩文件所在的同一目录运行以下命令(在我的情况下,它位于我的主目录中):
unzip ngrok-stable-linux-amd64.zip
然后我找到可执行文件“ngrok”并运行以下命令:
sudo mv ngrok /usr/local/bin/
完成这些步骤后,我能够运行ngrok http 8080
并获得预期的结果(下面是我正在谈论的 ngrok 文档中的示例)
Tunnel Status online
Version 2.0/2.0
Web Interface http://127.0.0.1:4040
Forwarding http://92832de0.ngrok.io -> localhost:80
Forwarding https://92832de0.ngrok.io -> localhost:80
Connnections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00