{
  "schemaVersion": "0.11.0",
  "canonical": "https://www.pystone.net/notes/gitlab-server-setup/",
  "atlas": "https://www.pystone.net/?node=gitlab-server-setup#knowledge-atlas",
  "markdown": "https://www.pystone.net/notes/gitlab-server-setup.md",
  "context": "https://www.pystone.net/notes/gitlab-server-setup.context.json",
  "knowledgeVersion": "224c990773de.5fa8af6e39fa",
  "build": {
    "siteCommit": "224c990773de166d23a886306577dd90379529ce",
    "notesCommit": "5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a",
    "builtAt": "1970-01-01T00:00:00.000Z",
    "version": "224c990773de.5fa8af6e39fa"
  },
  "id": "note:gitlab-server-setup",
  "slug": "gitlab-server-setup",
  "title": "Gitlab服务器配置",
  "type": "note",
  "visibility": "public",
  "idStability": "rename-stable",
  "author": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "publisher": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "aliases": [],
  "summary": "Gitlab服务器配置",
  "contentRole": "unspecified",
  "isMoc": false,
  "mocRecognition": "none",
  "generated": false,
  "attribution": "unspecified",
  "domain": "10-计算机、信息技术与工程",
  "tags": [],
  "mocs": [],
  "contentHash": "be177eef7fc53e032dd4fb65c38265282b1b9db782d2cf8d171ac9cebd50e00b",
  "assets": [],
  "headings": [
    {
      "depth": 1,
      "text": "Gitlab服务器配置",
      "anchor": "gitlab服务器配置",
      "citation": "https://www.pystone.net/notes/gitlab-server-setup/#gitlab%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%85%8D%E7%BD%AE"
    },
    {
      "depth": 2,
      "text": "配置流程",
      "anchor": "配置流程",
      "citation": "https://www.pystone.net/notes/gitlab-server-setup/#%E9%85%8D%E7%BD%AE%E6%B5%81%E7%A8%8B"
    },
    {
      "depth": 2,
      "text": "ref",
      "anchor": "ref",
      "citation": "https://www.pystone.net/notes/gitlab-server-setup/#ref"
    }
  ],
  "claims": [],
  "outgoing": [],
  "incoming": [
    {
      "id": "note:software-engineering-and-quality",
      "title": "软件工程与质量保障",
      "url": "https://www.pystone.net/notes/software-engineering-and-quality/",
      "atlas": "https://www.pystone.net/?node=software-engineering-and-quality#knowledge-atlas",
      "label": "软件工程与质量保障",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "CI-CD与质量保障/CI-CD工具链中的“Gitlab服务器配置”导航项",
      "citation": "https://www.pystone.net/notes/software-engineering-and-quality/#ci-cd%E4%B8%8E%E8%B4%A8%E9%87%8F%E4%BF%9D%E9%9A%9Cci-cd%E5%B7%A5%E5%85%B7%E9%93%BE"
    }
  ],
  "contentMarkdown": "# Gitlab服务器配置\n\n﻿# Gitlab服务器配置\n\n> 创建时间：2021/4/27 14:53\n\n## 配置流程\n\n安装依赖包：\nsudo apt-get install curl openssh-server ca-certificates postfix\n\n执行完成后，出现邮件配置，选择Internet那一项（不带Smarthost的）\n\n利用清华大学的镜像来进行主程序的安装，按照链接中的步骤做就可以：\nhttps://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/\n\n配置GitLab IP地址和端口号：\nsudo -e /etc/gitlab/gitlab.rb\nexternal_url \"http://192.168.1.xxx:8085\"\n\n> 根据自己的需求设置端口号，不要跟其他程序冲突就可以。\n\n如果开启额防火墙，需要把相应的端口放开，例如使用 firewalld 防火墙，则输入以下命令\nfirewall-cmd --zone=public --add-port=8085/tcp --permanent\n\n应用配置：\ngitlab-ctl reconfigure\n\n重启：\n其他内网的任意一台计算机上使用浏览器访问：\nhttp://192.168.1.xxx:8085\n\n> 注意：由于使用的是http协议，在网页上不输入http，会默认使用https，报错：\n>  This site can’t provide a secure connection\n\n## ref\n\nhttps://www.jianshu.com/p/8079a9a81ef3\n"
}
