# INSTALL GO and Gogs (github opensource server) on CENTOS 7
wget “https://dl.google.com/go/go1.10.linux-amd64.tar.gz”
mv go1.10.linux-amd64.tar.gz /usr/local/
cd /usr/local/
tar -zxvf go1.10.linux-amd64.tar.gz
ln -s /usr/local/go/bin/go /usr/local/bin/go
ln -s /usr/local/go/bin/godoc /usr/local/bin/godoc
ln -s /usr/local/go/bin/gofmt /usr/local/bin/gofmt
adduser -c “Gogs” git
su – git
go get -u github.com/gogits/gogs
cd src/github.com/gogits/gogs/
go build
./gogs web
#changed PORT here from 3000 to 8000
mkdir -p custom/conf
cp -rfv conf/* custom/conf/
vi custom/conf/app.ini
#fix mysql bug
cd src/github.com/gogits/
wget “https://github.com/m2nlight/gogs/releases/download/v0.11.34_patch/gogs_patch_linux_amd64.tar.gz”
tar -zxvf gogs_patch_linux_amd64.tar.gz
mysql -uroot -p < gogs/scripts/mysql.sql ./gogs web now go to the browser and configure everything