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.7.linux-arm64.tar.gz
tar -zxvf go1.13.7.linux-arm64.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)或者下方留言!

2 条评论
  • shaneZhang

    2020年2月13日 下午1:06

    抱歉是要下载官方的二进制包的,这里链接有问题,https://studygolang.com/dl/golang/go1.13.7.linux-arm64.tar.gz 是要用这个链接的。

  • 海風

    2020年2月5日 下午8:38

    你下載的是源碼,不是已經編譯好的arm64包,所以按你的步驟是不行的,已經編譯的應該是
    wget https://studygolang.com/dl/golang/go1.13.7.linux-arm64.tar.gz

回复 shaneZhang

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