TASK [debug] ***************************************************************************************************************************************** ok: [45.77.44.159] => { "msg": [ "", "Hello from Docker!", "This message shows that your installation appears to be working correctly.", "", "To generate this message, Docker took the following steps:", " 1. The Docker client contacted the Docker daemon.", " 2. The Docker daemon pulled the \"hello-world\" image from the Docker Hub.", " (amd64)", " 3. The Docker daemon created a new container from that image which runs the", " executable that produces the output you are currently reading.", " 4. The Docker daemon streamed that output to the Docker client, which sent it", " to your terminal.", "", "To try something more ambitious, you can run an Ubuntu container with:", " $ docker run -it ubuntu bash", "", "Share images, automate workflows, and more with a free Docker ID:", " https://hub.docker.com/", "", "For more examples and ideas, visit:", " https://docs.docker.com/engine/userguide/" ] }
vim src/ngrok/log/logger.go log "github.com/keepeye/log4go"
编译服务器,这里也同时编译了一个 linux 下的客户端。64位系统使用 amd64,如果是32位,需要修改成 amd386。
1 2 3 4 5
# 如果有权限错误看提示修改权限 cd /usr/local/go/src GOOS=linux GOARCH=amd64 ./make.bash cd /usr/local/src/ngrok/ GOOS=linux GOARCH=amd64 make release-server release-client
# 端口随你自己定义 cd /usr/local/src/ngrok/bin ./ngrokd -domain="$NGROK_DOMAIN" -httpAddr=":8085"
返回一下结果,说明成功:
1 2 3 4 5
[08:09:41 UTC 2016/12/19] [INFO] (ngrok/log.(*PrefixLogger).Info:83) [registry] [tun] No affinity cache specified [08:09:41 UTC 2016/12/19] [INFO] (ngrok/log.Info:112) Listening for public http connections on [::]:80 [08:09:41 UTC 2016/12/19] [INFO] (ngrok/log.Info:112) Listening for public https connections on [::]:443 [08:09:41 UTC 2016/12/19] [INFO] (ngrok/log.Info:112) Listening for control and proxy connections on [::]:4443 [08:09:41 UTC 2016/12/19] [INFO] (ngrok/log.(*PrefixLogger).Info:83) [metrics] Reporting every 30 seconds