git本地服务器架设gogs操作步骤
##主题介绍 centos7.2下git本地服务器架设gogs操作步骤
##下载gogs
- 下载地址:
https://gogs.io/docs/installation/install_from_binary
$ wget -c http://cn2.php.net/get/php-7.0.11.tar.xz/from/this/mirror
$ tar xvf gogs_v0.9.97_linux_amd64.tar.gz
$ cd gogs
$ ./gogs web
$ mv gogs /home/git/
$ chown -R git:git /home/git/
$ cp /home/git/gogs/scripts/systemd/gogs.service /etc/systemd/system/
$ systemctl daemon-reload
$ systemctl start gogs || systemctl status gogs
$ sudo -u git mkdir -p /home/git/gogs/custom/conf/
$ sudo -u git vim /home/git/gogs/custom/conf/app.ini
##创建git用户
$ cat /etc/passwd
$ which git-shell
$ useradd -m -G users,video -s /usr/bin/git-shell git
##mysql数据库建设
- gogs依赖本地数据库,需要创建一个数据库
mysql>
$ grant all privileges on git.* to 'git'@localhost identified by 'duwj9283' with grant option;
$ flush privileges;