Install gogs with my N1 Box

作者: shaneZhang 分类: 互联网技术 发布时间: 2019-12-18 23:06

Last week, I bought a Phicomm N1 Box. I installed the Armbian OS to it. Let’s install gogs for it.

First we use this guide to install go-lang. Because of the N1 box’s cpu is armv8l and the author did not provide a compiled installation . So we need to compile it through source code.

###remove the old golang
sudo apt-get remove golang-go
sudo apt-get remove --auto-remove golang-go
###get the latest source code
wget https://studygolang.com/dl/golang/go1.13.5.src.tar.gz
tar -zxvf go1.13.5.src.tar.gz
sudo mv go /usr/local/
#####add the environment to path####
vim ~/.bashrc
export GOROOT=/usr/local/go              # 安装目录。
export GOPATH=$HOME/go     # 工作环境
export GOBIN=$GOPATH/bin           # 可执行文件存放
export PATH=$GOPATH:$GOBIN:$GOROOT/bin:$PATH       # 添加PATH路径
source ~/.bashrc
########## test the golang
go version
#####compile the gogs source code
sudo adduser --disabled-login --gecos 'Gogs' git
git clone https://github.com/gogs/gogs.git gogs
cd gogs
go build -tags "sqlite pam cert" -o gogs
#####test the gogs#####
./gogs web
#######settings the database and continue 
use this guide. 
https://gogs.io/docs/installation/configuration_and_run.html

本页面支持繁体中文友好显示:Install gogs with my N1 Box

如果觉得我的文章对您有用,请随意打赏。如果有其他问题请联系博主QQ(909491009)或者下方留言!

发表评论

电子邮件地址不会被公开。 必填项已用*标注