ngrok window 版本编译及配置相关

#ubuntu 20.04.1
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

#安装go语言 git等
guorp@guorp-VirtualBox:~$ sudo apt-get install build-essential golang mercurial git
[sudo] password for guorp: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
。。。
#查看go的版本
guorp@guorp-VirtualBox:~$ go version
go version go1.13.8 linux/amd64

#使用git获取ngrok源码
guorp@guorp-VirtualBox:~$ git clone https://github.com/tutumcloud/ngrok.git ngrok
Cloning into 'ngrok'...
。。。
#设置全局变量代理的父级域名
guorp@guorp-VirtualBox:~$ export NGROK_DOMAIN="ngrok.e***.com"
#切换到ngrok目录
guorp@guorp-VirtualBox:~$ cd ngrok
#查看变量设置
guorp@guorp-VirtualBox:~/ngrok$ export
。。。
declare -x NGROK_DOMAIN="ngrok.e***.com"
。。。

#生成证书(openssl系统默认已安装)
guorp@guorp-VirtualBox:~/ngrok$ openssl genrsa -out base.key 2048
。。。
guorp@guorp-VirtualBox:~/ngrok$ openssl req -new -x509 -nodes -key base.key -days 10000 -subj "/CN=$NGROK_DOMAIN" -out base.pem
。。。
guorp@guorp-VirtualBox:~/ngrok$ openssl genrsa -out server.key 2048
。。。
guorp@guorp-VirtualBox:~/ngrok$ openssl req -new -key server.key -subj "/CN=$NGROK_DOMAIN" -out server.csr
guorp@guorp-VirtualBox:~/ngrok$  openssl x509 -req -in server.csr -CA base.pem -CAkey base.key -CAcreateserial -days 10000 -out server.crt
Signature ok
subject=CN = ngrok.e***.com
Getting CA Private Key
#生成成功
guorp@guorp-VirtualBox:~/ngrok$ ls
assets    base.pem  contrib       docs     Makefile   server.crt  server.key
base.key  base.srl  CONTRIBUTORS  LICENSE  README.md  server.csr  src
#复制证书
guorp@guorp-VirtualBox:~/ngrok$ cp base.pem assets/client/tls/ngrokroot.crt
#编译Linux版本
guorp@guorp-VirtualBox:~/ngrok$ sudo make release-server release-client
[sudo] password for guorp: 
GOOS="" GOARCH="" go get github.com/jteeuwen/go-bindata/go-bindata
。。。
go install -tags 'release' ngrok/main/ngrokd
go install -tags 'release' ngrok/main/ngrok
#linux版本生成功
guorp@guorp-VirtualBox:~/ngrok$ sudo GOOS=windows GOARCH=amd64 make release-server release-client

 #nginx   配置

 server {
        listen       80;
        server_name  *.ngrok.****.com; #公网域名
        location / {
              proxy_pass  http://127.0.0.1:81; 服务器端的映射地址
              proxy_redirect off;
              proxy_set_header   Host $http_host:81;
              #proxy_set_header   Host             $host:81;
              proxy_set_header   X-Real-IP        $remote_addr;
              #proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
              proxy_connect_timeout 1; 
              proxy_send_timeout 120; 
              proxy_read_timeout 120;
        }
 
    }

开放服务器 4443端口

 增加子级域名解析

服务端启动命令:

ngrokd -tlsKey=server.key -tlsCrt=server.crt -domain="ngrok.****.com" -httpAddr=":81" -httpsAddr=":443" -log ngrokd.log

 

客户端配置:  

ngrok.cfg
server_addr: "ngrok.***.com:4443"
trust_host_root_certs: false

客户端启动命令

#日志文件名/配置文件/子级域名/本地服务端口号
ngrok -log=log -config=ngrok.cfg -subdomain prject 8080
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Hadoop是一个开源的分布式计算框架,用于处理大规模数据集的计算。Hadoop 2.7.5是Hadoop的一个版本,已经经过编译并适用于Windows操作系统。 Hadoop 2.7.5的编译版已经针对Windows操作系统进行了特定的优化和适配,以确保在Windows环境下能够正常运行。编译版通常会提供可执行文件、库文件和配置文件等组件,用户只需按照特定的安装步骤进行安装和配置,就能够在Windows系统中使用Hadoop进行大规模数据处理。 Windows版的Hadoop相对于其他操作系统版本的Hadoop,在安装、配置和使用上可能会存在一些差异。例如,Windows版的Hadoop可能会在配置文件中设置一些特定的参数和路径,来适配Windows操作系统的特性。同时,用户在使用Windows版Hadoop时,也需要注意在Windows系统下的一些限制和注意事项,比如文件路径的命名规范、权限管理等。 与其他操作系统版本的Hadoop相比,Windows版的Hadoop在用户群体和使用场景上可能会有一些差异。由于Windows系统在桌面领域的主导地位,Windows版的Hadoop可能更适合那些对于使用Windows操作系统更熟悉,或者有特定Windows场景需求的用户。同时,与其他操作系统版的Hadoop相比,Windows版的Hadoop可能也会面临一些与Windows操作系统相关的兼容性和性能方面的挑战。 总之,Hadoop 2.7.5的Windows编译版是一个专门为Windows操作系统优化和适配的分布式计算框架。用户可以根据自己的需求和对于Windows操作系统的偏好,选择使用Windows版的Hadoop来处理大规模数据集。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值