手工部署
===
### 編譯Linux版本GO
~~~
GOOS=linux GOARCH=amd64 go build
~~~
打包部署
```
bee pack -be GOOS=linux GOARCH=amd64
```
### ssh 鏈接服務器
```
ssh root@host
```
### 上傳文件
```
scp 本地文件 root@host:/遠程目錄
scp -r 本地目錄 root@host:/遠程目錄
```
### 下載文件
```
scp username@servername:/path/filename /tmp/local\_destination
```
### Nginx反向代理
~~~
server {
listen 80;
server_name www.kokcomic.com;
location / {
proxy_pass http://127.0.0.1:8094/;
}
}
~~~
### 啟動GO
~~~
nohup gofile &
~~~
### 檢測端口占用
~~~
netstat -ap | grep 8080
sudo lsof -i:8085
~~~
### 查看服務器端口
~~~
netstat-ap
netstat -ntlp
~~~