简介
鉴于Caddy v2并未提供i386架构下的二进制文件,只好手动交叉编译。
交叉编译
1、安装Golong
wget https://golang.org/dl/go1.14.6.linux-amd64.tar.gz tar xfz go1.14.6.linux-amd64.tar.gz -C /usr/local vim ~/.bashrc #设置环境变量
export GOPATH=/root/go export GOROOT=/usr/local/go export PATH=$GOROOT/bin:$PATH export GOBIN=$GOROOT/bin
source ~/.bashrc
2、检测是否安装成功
go version
3、编译Caddy
apt update && apt install curl git build-essential git clone "https://github.com/caddyserver/caddy.git" cd caddy/cmd/caddy/ GOOS=linux GOARCH=386 go build
最终得到的成品Caddy二进制文件,感谢可乐帮忙发布:https://github.com/CokeMine/Caddy_Linux
文章评论