快速搭建Gogs服务器

作者: chuan_bai | 来源:发表于2018-03-22 15:48 被阅读52次

    首先说明下
    服务器环境为centos6.9
    mysql版本为5.1.7

    1.确定服务器内核

    uname -a
    

    2.使用yum安装git

    yum -y install git
    

    3.用命令行进入mysql创建gogs表

    $ mysql -uroot -proot
    > create user 'gogs'@'localhost' identified by '123456';
    > grant all privileges on gogs.* to 'gogs'@'localhost';
    > flush privileges;
    > exit;
    

    4.下载gogs包

    https://dl.gogs.io地址下根据系统版本版本下载对应的安装包
    本次用的版本是:
    gogs_v0.9.141_linux_amd64.tar.gz

    5.解压tar包

    tar -xvf gogs_v0.9.141_linux_amd64.tar
    

    6.对目录授权

     chown -R git:git gogs/
    

    7.启动gogs服务

    cd gogs 
    su git
    ./gogs web   
    

    注意 这个时候退出终端可能会关闭gogs服务
    需要加上nohup命令,这时候退出就没有问题了

    nohup ./gogs web
    

    如果需要配置gogs的参数对app.ini文件进行修改
    路径为

    /gogs/custom/conf/app.ini
    

    相关文章

      网友评论

        本文标题:快速搭建Gogs服务器

        本文链接:https://www.haomeiwen.com/subject/iosaqftx.html