美文网首页
CentOS7 安装Gogs 和 gitlab 社区版

CentOS7 安装Gogs 和 gitlab 社区版

作者: tanpengsccd | 来源:发表于2017-06-14 09:04 被阅读411次

前言

楼主香港 腾讯 CentOS 主机 1G 单核 主机,先尝试的gitlab,虽然gitlab 功能强大,无奈配置不够,点一下卡10s。只能使用更轻量化的Gogs。

gogs (Go Git Service)

如果先前安装过gitlab 建议先卸载

---gitlab-ctl unisntall
再userdel git -r -rf -f

安装准备

新建git用户

  1. 添加git 用户
    useradd git

  2. 配置最高权限(可能需要)

    echo -e "\n用户名 ALL=(ALL) ALL\n" >> /etc/sudoers
    tail -3 /etc/sudoers
    
  3. 切换到git
    sudo su - git

安装mysql

  1. 安装mariadb(mysql 变种)
    yum install mariadb-server mariadb
  2. 配置
# 启动MariaDB
    systemctl start mariadb  
    systemctl stop mariadb  
    systemctl restart mariadb  
#设置开机启动
    systemctl enable mariadb  
#进入
    mysql 
#新建数据库
    create database gogs

官方步骤

https://github.com/gogits/gogs
可能需要下列步骤

#下载
wegt https://github.com/gogits/gogs/releases/download/v0.11.19/linux_amd64.tar.gz 
#解压
tar zxvf linux_amd64.tar.gz
# 配置 gogs/conf/app.ini  配置 域名 ssh 等

#自启动脚本 gogs/scripts/system/ 到 /etc/systemd/system

sysystemctl start gogs
systemctl enable gogs

gitlab

硬件要求(最低)

  1. 1 核心CPU最多支持100个用户
  2. 安装使用GitLab需要至少4GB可用内存(RAM + Swap)
  3. 1GB 物理内存 + 3GB 交换分区 是最低的要求

详情 https://docs.gitlab.com.cn/ce/install/requirements.html#part-6542a9e251e

配置内存 swap

http://blog.csdn.net/ithomer/article/details/53942718

安装

如需要设置 域名 需要 配置 /etc/gitlab/gitlab.rb
具体操作:
https://about.gitlab.com/downloads/

相关文章

网友评论

      本文标题:CentOS7 安装Gogs 和 gitlab 社区版

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