1.登录mysql,执行如下脚本:
DROP DATABASE IF EXISTS gogs;
CREATE DATABASE IF NOT EXISTS gogs CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
2.安装Git
cd /usr/local/src
yum -y groupinstall "Development Tools"
yum -y install zlib-devel perl-ExtUtils-MakeMaker asciidoc xmlto openssl-devel
tar zxvf
git-2.9.5.tar.gz -C /usr/local/bin
cd /usr/local/bin/
git-2.9.5
./configure --prefix=/usr/etc/git
make && make install
git version
cd /usr/local/src
unzip gogs_linux_amd64.zip
cd gogs
./gogs web
访问链接:http://[服务器IP地址]:3000
--配置安装界面(注意,需要把界面默认的git用户修改为root用户,生成http链接要把localhost换掉)
nohup ./gogs web & tail -f nohup.out
重启:
cd /usr/local/src/gogs
ps -ef | grep gogs
kill -9 pid
nohup ./gogs web & tail -f nohup.out