CentOS7 安装Gogs
mysql配置
-
新增gogs用户以及数据库
mysql> create database gogs character set utf8 collate utf8_bin; mysql> create user 'gogs'@'localhost' identified by 'test#gogs'; mysql> grant all privileges on gogs.* to 'gogs'@'127.0.0.1' with grant option; mysql> flush privileges;
Gogs安装及配置
- 创建git用户及组
$ groupadd git
$ useradd git -g git
- 下载安装
# cd /home/git
# wget https://dl.gogs.io/0.11.91/gogs_0.11.91_linux_amd64.tar.gz
# tar -zxvf gogs_0.11.91_linux_amd64.tar.gz
# mv gogs /home/git
# chown -R git:git gogs
$ /gogs/gogs web &
- 配置开机启动
# cp /home/git/gogs/scripts/systemd/gogs.service /etc/systemd/system
# systemctl enable gogs.service
本文由 yaoxiaoyao 创作,采用 知识共享署名4.0
国际许可协议进行许可
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名
最后编辑时间为: Sep 12,2019