安装环境

Centos 7.2

Gogs版本:0.11.4

 

Nginx安装

yum install nginx

修改/etc/nginx/nginx.conf

 gogs安装

/etc/nginx/conf.d目录下创建gogs.conf文件,用于代理

server {
        listen 80;
        server_name 30.18.28.13;
        location / {
            proxy_pass http://127.0.0.1:3000;
            proxy_read_timeout 600;
        }
}

 

Mariadb安装

安装方式参见:http://www.cnblogs.com/shhnwangjian/p/8044231.html

配置如下:

  • 数据库开启InnoDB

修改/etc/my.cnf文件

[mysqld]
default-storage-engine=INNODB
  • 创建数据库
CREATE DATABASE gogs CHARACTER SET utf8 COLLATE utf8_general_ci;

 

Git安装

yum install git

 

Gogs安装

  • 官方下载地址:

https://gogs.io/docs/installation/install_from_binary

0.11.4版本:https://dl.gogs.io/0.11.4/

  • 安装

1、创建git用户

useradd git

passwd git

2、创建仓库根目录

cd /home/git

mkdir gogs-repositories

3、解压安装包

cd /home/git

4、更改属主

cd /home/git

chown -R git:git ./gogs

chown -R git:git ./gogs-repositories

5、gogs注册服务

cp /home/git/gogs/scripts/systemd/gogs.service /usr/lib/systemd/system

systemctl start gogs.service

6、配置

gogs安装

gogs安装

gogs安装

 

 推荐:http://www.jianshu.com/p/3e8355d4971c

 

相关文章:

  • 2021-10-17
  • 2021-08-29
  • 2021-07-03
  • 2021-11-10
  • 2021-09-13
  • 2021-07-10
  • 2022-12-23
猜你喜欢
  • 2022-01-09
  • 2021-03-31
  • 2021-12-18
  • 2021-12-20
  • 2021-09-06
  • 2021-08-12
相关资源
相似解决方案