Closed he-sb closed 4 years ago
安装 git:
yum install -y git
安装 Node.js with NPM:
curl -sL https://rpm.nodesource.com/setup_14.x | bash -
yum install -y gcc-c++ make nodejs
安装 Golang toolchain:
yum install -y golang
vi /etc/profile
最后加入以下内容并保存:
# GOROOT
export GOROOT=/usr/lib/golang
# GOPATH
export GOPATH=/root/go
# GOPATH bin
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
使改动生效:
source /etc/profile
项目地址:https://github.com/workerindex/gdir
注意事项:
配置需要普通用户,不能是 root 用户,否则会报错;亲测并非必需,推测报错可能原因为 Node.js 或 Golang 安装问题,按本文方法安装是没问题的;需要准备 Cloudflare 和 GitHub 的 API;
GitHub 的 API 只需给 gist 权限即可;