• 阿里云服务部署gogs代码管理系统


    一、此项目依赖于go、mysql 未安装该环境 请先安装,此项目占用 3000端口  阿里云安全组规则记得开启

    二、开始配置

    1、新建git用户;

    useradd git;

    修改git密码:passwd git;(密码:长度至少为8个字符串)

    整个项目切换为git用户进行安装操作:sudo git;安装目录为 /home/git

    1、配置mysql
    登录mysql:mysqld -u root -p
    创建gogs数据库:CREATE DATABASE gogs CHARACTER SET utf8 COLLATE utf8_bin;
    2、安装配置gogs
    wget https://dl.gogs.io/0.11.4/linux_amd64.tar.gz//下载软件包
    tar  -zxf  linux_amd64.tar.gz;//解压
    cd gogs
     
    mkdir data
    mkdir  log
    新建 custom-》conf-》app.ini文件
    mkdir custom
    cd custom
    mkdir conf
    cd conf
    vim app.ini
     

    APP_NAME = Gogs-项目管理
    RUN_USER = git
    RUN_MODE = prod

    [database]
    DB_TYPE = mysql
    HOST = 127.0.0.1:3306
    NAME = gogs
    USER = root
    PASSWD = *******
    SSL_MODE = disable
    PATH = data/gogs.db

    [repository]
    ROOT = /home/git/gogs-repositories

    [server]
    DOMAIN = 119.23.239.189
    HTTP_PORT = 3000
    ROOT_URL = http://*****:3000/  //自己的服务器地址
    DISABLE_SSH = false
    SSH_PORT = 22
    START_SSH_SERVER = false
    OFFLINE_MODE = false

    [mailer]
    ENABLED = false

    [service]
    REGISTER_EMAIL_CONFIRM = false
    ENABLE_NOTIFY_MAIL = false
    DISABLE_REGISTRATION = false
    ENABLE_CAPTCHA = true
    REQUIRE_SIGNIN_VIEW = false

    [picture]
    DISABLE_GRAVATAR = false
    ENABLE_FEDERATED_AVATAR = false

    [session]
    PROVIDER = file

    [log]
    MODE = file
    LEVEL = Info
    ROOT_PATH = /home/git/gogs/log

    [security]
    INSTALL_LOCK = true
    SECRET_KEY = Co4TFL8mKZ1Lwmo

    :wq 保存

    3:后台守护进程运行:nohup ./gogs web output 2>&1 &
     
    测试访问:ip:3000
     
     
  • 相关阅读:
    【LOJ#6277】数列分块1
    【LOJ6284】数列分块8
    【洛谷P3275】糖果
    【洛谷P3810】陌上花开
    【洛谷P1052】过河 离散化+dp
    【洛谷P2042】维护数列
    【模板】文艺平衡树
    【洛谷P4145】花神游历各国
    【洛谷P4878】布局
    hdu 5748(LIS)
  • 原文地址:https://www.cnblogs.com/jn1011/p/10981106.html
Copyright © 2020-2023  润新知