安装Git

1、下载git并解压

wget https://www.kernel.org/pub/software/scm/git/git-2.12.2.tar.gz

https://github.com/git/git/releases

2、配置安装目录

./configure --prefix=/usr/local/git
make make install
缺少依赖再安装对应的依赖包

3、添加环境变量

vim /etc/profile
export PATH=$PATH:/usr/local/git/bin
source /etc/profile

安装Gogs

gogs (Go Git Service)轻量级的git服务器
官网文档 https://gogs.io/docs

下载

wget https://dl.gogs.io/0.11.4/linux_amd64.tar.gz
二进制包,解压直接使用

./gogs web启动gogs 输入ip:3000进入设置