This is a creation in Article, where the information may have evolved or changed.
CentOS 7 Golang Gogs Deployment
It's been a long time since I've had a few minutes to record things, and it's very troublesome to use them.
Installation of Golang
install go
This native installation, however, seems to be a problem with Docker's environment, mainly gorootpath problems, which can result in a subsequent go get error (import path does not begin with hostname),
Cd/tmpcurl-lo Https://storage. Googleapis. com/golang/go1. 7. Linux-amd64. Tar. GZShasum-a theGo1. 7*. Tar. GZsudo tar-c/usr/local-xvzf go1. 7. Linux-amd64. Tar. GZMkdir-p ~/projects/{bin,pkg,src}sudo Vi/etc/profile. D/path. SHExport path= $PATH:/usr/local/go/binvi ~/. Bash_profile#export gobin= "$HOME/projects/bin"#export gopath= "$HOME/projects/srcexport"#GOROOT = "/path/to/go"Source/etc/profile && Source ~/. Bash_profile
Here's how I handled the error:
I Think you installed Go in/usr/local/go.
So change your goroot path to the value Of/usr/local/go/bin.
It seems meant to has your workspace (Gopath) located at/home/me/go.
This might fix your problem.
Add this to the bottom of your bash profiles, located here = $HOME/.profile
export GOROOT=/usr/local/goexport GOPATH=$HOME/goexport PATH=$PATH:$GOROOT/bin
Here are the commands that link database permissions:
grant all privileges on *.* to root@'%' identified by "mima";flush privileges;
Gogs Official source installation [1]: https://gogs.io/docs/installation/install_from_source.html
Go installation [2]: https:// Www.digitalocean.com/community/tutorials/how-to-install-go-1-7-on-centos-7
Resolution of the error [3]:/http Stackoverflow.com/questions/20458796/unrecognized-import-path-with-go-get