|
@@ -1,28 +0,0 @@
|
|
|
----
|
|
|
-title: linux 常用命令
|
|
|
-date: 2020-06-14 23:00:00
|
|
|
-tags: Linux
|
|
|
-cover: https://static.jqwei.com/blog/img/IMG_3460.PNG
|
|
|
-categories: 运维处理
|
|
|
----
|
|
|
-### Golang交叉编译 💖
|
|
|
-Mac 下编译 Linux 和 Windows 64位可执行程序
|
|
|
-``` bash
|
|
|
-$ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build main.go
|
|
|
-$ CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build main.go
|
|
|
-```
|
|
|
-Linux 下编译 Mac 和 Windows 64位可执行程序
|
|
|
-``` bash
|
|
|
-$ CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build main.go
|
|
|
-$ CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build main.go
|
|
|
-```
|
|
|
-
|
|
|
-### 运行
|
|
|
-
|
|
|
-``` bash
|
|
|
-$ nohup go run aaronwei.go > /opt/logs/log/bufOverflow.log 2>&1 &
|
|
|
-$ nohup go run main.go > /opt/logs/log/rebot.log 2>&1 &
|
|
|
-$ nohup go run setting.go > /opt/logs/setting.log 2>&1 &
|
|
|
-$ nohup ./gogs web > /home/gogs/log/gogs.log 2>&1 &
|
|
|
-$ nohup hexo s > /opt/logs/blog.log 2>&1 &
|
|
|
-```
|