Skip to content

Commit a42bdf1

Browse files
committed
fix some
1 parent c2c8654 commit a42bdf1

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## 部署
66

7-
1. 选择你喜欢的方式下载本目录下的main.go文件
7+
1. 克隆或者下载本仓库到你的服务器上
88

99
不多说。
1010

@@ -18,9 +18,27 @@
1818

1919
4. 尝试运行
2020

21-
`go get github.com/miekg/dns` 获取需要的库。`go run main.go yourdomain` 可先在shell前台运行,看功能是否正常使用与检查数据存放目录是否成功创建。如果没问题的话 直接 `nohup go run main.go yourdomain &`
22-
23-
(第一次运行需要到github拖miekg/dns库,所以需要你的服务器能上github)
21+
~~`go get github.com/miekg/dns` 获取需要的库。~~改用了mod形式。(方便在国内机器部署)
22+
23+
先执行
24+
25+
```shell
26+
$ go env -w GO111MODULE=on
27+
$ go env -w GOPROXY=https://goproxy.cn,direct #可选,国内机器不能上github则需要设置{代}{理}
28+
```
29+
30+
而后`go run main.go`即可看到如下字样,说明已经正常拉取需要的库。
31+
32+
```shell
33+
[root@centos dnslog]# go run main.go
34+
go: downloading github.com/miekg/dns v1.1.41
35+
go: downloading golang.org/x/net v0.0.0-20210226172049-e18ecbb05110
36+
go: downloading golang.org/x/sys v0.0.0-20210303074136-134d130e1a04
37+
2021/03/24 13:58:54 Dnslog Platform requires a domain name parameter, such as `dns1.tk` or `go.dns1.tk`, And check your domain's ns server point to this server
38+
exit status 1
39+
```
40+
41+
`go run main.go yourdomain` 可先在shell前台运行,看功能是否正常使用与检查数据存放目录是否成功创建。如果没问题的话 直接 `nohup go run main.go yourdomain &`
2442
2543
## 使用
2644

go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Dnslog
2+
3+
go 1.15
4+
5+
require github.com/miekg/dns v1.1.41

0 commit comments

Comments
 (0)