Quellcode durchsuchen

更新 '_posts/Linux.md'

添加命令
aaronwei vor 5 Jahren
Ursprung
Commit
4dd3d160e0
1 geänderte Dateien mit 23 neuen und 1 gelöschten Zeilen
  1. 23 1
      _posts/Linux.md

+ 23 - 1
_posts/Linux.md

@@ -1,2 +1,24 @@
 ---
-linux 常用命令
+title: linux 常用命令
+---
+### 编译
+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 &
+```