标签:nic profile 服务 后台 $path source 修改 -- pre
vim /etc/profile
export PATH=$PATH:/usr/local/go/bin
export GOROOT=/usr/local/go #go包的解压目录
export GOPATH=/opt/GOPATH #表示实际的工作目录
export PATH=$GOPATH/bin/:$PATH
source /etc/profile
go build main.go
nohup ./main &> web.log
panic: listen tcp ip:8090: bind: cannot assign requested address
修改web服务启动ip地址为 0.0.0.0
重新打包启动即可
Go web部署报错panic: listen tcp xxxxxxx:8090: bind: cannot assign requested address
标签:nic profile 服务 后台 $path source 修改 -- pre
原文地址:https://www.cnblogs.com/vaen/p/14605748.html