马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
GitLab 是一个非常流行的用于版本控制和源代码管理的平台。它可以部署在私有服务器上或云端,并且支持多种安装方法。以下是一种常见的在 Linux 服务器上通过包管理器安装 GitLab 的过程。请注意,具体步骤可能因不同的 Linux 发行版和您的系统环境而有所不同。
基本步骤
1. 系统准备
确保您的服务器已更新到最新状态:
<pre><div class="tongyi-ui-highlighter global-dark-theme"><span class="tongyi-ui-highlighter-header"><span class="mr-auto first-letter:uppercase text-[color:var(--TY-Text-2)] tongyi-ui-highlighter-lang">bash</span><div class="tongyi-ui-highlighter-right-actions"><div class="tongyi-ui-highlighter-theme-changer"><div class="tongyi-ui-highlighter-theme-changer-btn"><span>深色版本</span><span role="img" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#icon-DownOutlined"></use></svg></span></div></div><svg width="12" height="12" viewBox="0 0 11.199999809265137 11.199999809265137" class="cursor-pointer flex items-center tongyi-ui-highlighter-copy-btn"><g><path d="M11.2,1.6C11.2,0.716344,10.4837,0,9.6,0L4.8,0C3.91634,0,3.2,0.716344,3.2,1.6L4.16,1.6Q4.16,1.3349,4.34745,1.14745Q4.5349,0.96,4.8,0.96L9.6,0.96Q9.8651,0.96,10.0525,1.14745Q10.24,1.3349,10.24,1.6L10.24,6.4Q10.24,6.6651,10.0525,6.85255Q9.8651,7.04,9.6,7.04L9.6,8C10.4837,8,11.2,7.28366,11.2,6.4L11.2,1.6ZM0,4L0,9.6C0,10.4837,0.716344,11.2,1.6,11.2L7.2,11.2C8.08366,11.2,8.8,10.4837,8.8,9.6L8.8,4C8.8,3.11634,8.08366,2.4,7.2,2.4L1.6,2.4C0.716344,2.4,0,3.11634,0,4ZM1.14745,10.0525Q0.96,9.8651,0.96,9.6L0.96,4Q0.96,3.7349,1.14745,3.54745Q1.3349,3.36,1.6,3.36L7.2,3.36Q7.4651,3.36,7.65255,3.54745Q7.84,3.7349,7.84,4L7.84,9.6Q7.84,9.8651,7.65255,10.0525Q7.4651,10.24,7.2,10.24L1.6,10.24Q1.3349,10.24,1.14745,10.0525Z"></path></g></svg></div></span><div><pre><code><span class="comment linenumber react-syntax-highlighter-line-number">1</span><span>sudo apt update
</span><span class="comment linenumber react-syntax-highlighter-line-number">2</span>sudo apt upgrade</code></pre></div></div></pre>
2. 添加 GitLab 官方仓库
- 添加官方 GPG 密钥:
<pre><div class="tongyi-ui-highlighter global-dark-theme"><span class="tongyi-ui-highlighter-header"><span class="mr-auto first-letter:uppercase text-[color:var(--TY-Text-2)] tongyi-ui-highlighter-lang">bash</span><div class="tongyi-ui-highlighter-right-actions"><div class="tongyi-ui-highlighter-theme-changer"><div class="tongyi-ui-highlighter-theme-changer-btn"><span>深色版本</span><span role="img" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#icon-DownOutlined"></use></svg></span></div></div><svg width="12" height="12" viewBox="0 0 11.199999809265137 11.199999809265137" class="cursor-pointer flex items-center tongyi-ui-highlighter-copy-btn"><g><path d="M11.2,1.6C11.2,0.716344,10.4837,0,9.6,0L4.8,0C3.91634,0,3.2,0.716344,3.2,1.6L4.16,1.6Q4.16,1.3349,4.34745,1.14745Q4.5349,0.96,4.8,0.96L9.6,0.96Q9.8651,0.96,10.0525,1.14745Q10.24,1.3349,10.24,1.6L10.24,6.4Q10.24,6.6651,10.0525,6.85255Q9.8651,7.04,9.6,7.04L9.6,8C10.4837,8,11.2,7.28366,11.2,6.4L11.2,1.6ZM0,4L0,9.6C0,10.4837,0.716344,11.2,1.6,11.2L7.2,11.2C8.08366,11.2,8.8,10.4837,8.8,9.6L8.8,4C8.8,3.11634,8.08366,2.4,7.2,2.4L1.6,2.4C0.716344,2.4,0,3.11634,0,4ZM1.14745,10.0525Q0.96,9.8651,0.96,9.6L0.96,4Q0.96,3.7349,1.14745,3.54745Q1.3349,3.36,1.6,3.36L7.2,3.36Q7.4651,3.36,7.65255,3.54745Q7.84,3.7349,7.84,4L7.84,9.6Q7.84,9.8651,7.65255,10.0525Q7.4651,10.24,7.2,10.24L1.6,10.24Q1.3349,10.24,1.14745,10.0525Z"></path></g></svg></div></span><div><pre><code><span class="comment linenumber react-syntax-highlighter-line-number">1</span><span>curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash</span></code></pre></div></div></pre>
3. 安装 GitLab
- 安装 GitLab:
<pre><div class="tongyi-ui-highlighter global-dark-theme"><span class="tongyi-ui-highlighter-header"><span class="mr-auto first-letter:uppercase text-[color:var(--TY-Text-2)] tongyi-ui-highlighter-lang">bash</span><div class="tongyi-ui-highlighter-right-actions"><div class="tongyi-ui-highlighter-theme-changer"><div class="tongyi-ui-highlighter-theme-changer-btn"><span>深色版本</span><span role="img" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#icon-DownOutlined"></use></svg></span></div></div><svg width="12" height="12" viewBox="0 0 11.199999809265137 11.199999809265137" class="cursor-pointer flex items-center tongyi-ui-highlighter-copy-btn"><g><path d="M11.2,1.6C11.2,0.716344,10.4837,0,9.6,0L4.8,0C3.91634,0,3.2,0.716344,3.2,1.6L4.16,1.6Q4.16,1.3349,4.34745,1.14745Q4.5349,0.96,4.8,0.96L9.6,0.96Q9.8651,0.96,10.0525,1.14745Q10.24,1.3349,10.24,1.6L10.24,6.4Q10.24,6.6651,10.0525,6.85255Q9.8651,7.04,9.6,7.04L9.6,8C10.4837,8,11.2,7.28366,11.2,6.4L11.2,1.6ZM0,4L0,9.6C0,10.4837,0.716344,11.2,1.6,11.2L7.2,11.2C8.08366,11.2,8.8,10.4837,8.8,9.6L8.8,4C8.8,3.11634,8.08366,2.4,7.2,2.4L1.6,2.4C0.716344,2.4,0,3.11634,0,4ZM1.14745,10.0525Q0.96,9.8651,0.96,9.6L0.96,4Q0.96,3.7349,1.14745,3.54745Q1.3349,3.36,1.6,3.36L7.2,3.36Q7.4651,3.36,7.65255,3.54745Q7.84,3.7349,7.84,4L7.84,9.6Q7.84,9.8651,7.65255,10.0525Q7.4651,10.24,7.2,10.24L1.6,10.24Q1.3349,10.24,1.14745,10.0525Z"></path></g></svg></div></span><div><pre><code><span class="comment linenumber react-syntax-highlighter-line-number">1</span><span>sudo apt install gitlab-ee</span></code></pre></div></div></pre>
4. 配置 GitLab
-
初始化 GitLab:
<pre><div class="tongyi-ui-highlighter global-dark-theme"><span class="tongyi-ui-highlighter-header"><span class="mr-auto first-letter:uppercase text-[color:var(--TY-Text-2)] tongyi-ui-highlighter-lang">bash</span><div class="tongyi-ui-highlighter-right-actions"><div class="tongyi-ui-highlighter-theme-changer"><div class="tongyi-ui-highlighter-theme-changer-btn"><span>深色版本</span><span role="img" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#icon-DownOutlined"></use></svg></span></div></div><svg width="12" height="12" viewBox="0 0 11.199999809265137 11.199999809265137" class="cursor-pointer flex items-center tongyi-ui-highlighter-copy-btn"><g><path d="M11.2,1.6C11.2,0.716344,10.4837,0,9.6,0L4.8,0C3.91634,0,3.2,0.716344,3.2,1.6L4.16,1.6Q4.16,1.3349,4.34745,1.14745Q4.5349,0.96,4.8,0.96L9.6,0.96Q9.8651,0.96,10.0525,1.14745Q10.24,1.3349,10.24,1.6L10.24,6.4Q10.24,6.6651,10.0525,6.85255Q9.8651,7.04,9.6,7.04L9.6,8C10.4837,8,11.2,7.28366,11.2,6.4L11.2,1.6ZM0,4L0,9.6C0,10.4837,0.716344,11.2,1.6,11.2L7.2,11.2C8.08366,11.2,8.8,10.4837,8.8,9.6L8.8,4C8.8,3.11634,8.08366,2.4,7.2,2.4L1.6,2.4C0.716344,2.4,0,3.11634,0,4ZM1.14745,10.0525Q0.96,9.8651,0.96,9.6L0.96,4Q0.96,3.7349,1.14745,3.54745Q1.3349,3.36,1.6,3.36L7.2,3.36Q7.4651,3.36,7.65255,3.54745Q7.84,3.7349,7.84,4L7.84,9.6Q7.84,9.8651,7.65255,10.0525Q7.4651,10.24,7.2,10.24L1.6,10.24Q1.3349,10.24,1.14745,10.0525Z"></path></g></svg></div></span><div><pre><code><span class="comment linenumber react-syntax-highlighter-line-number">1</span><span>sudo gitlab-ctl reconfigure</span></code></pre></div></div></pre>
这个命令将配置 GitLab 并启动所有必要的服务。
5. 配置 HTTPS 和域名
- 设置域名: 如果您使用的是自定义域名,请编辑
/etc/gitlab/gitlab.rb 文件并设置 external_url 参数为您的域名:
<pre><div class="tongyi-ui-highlighter global-dark-theme"><span class="tongyi-ui-highlighter-header"><span class="mr-auto first-letter:uppercase text-[color:var(--TY-Text-2)] tongyi-ui-highlighter-lang">ruby</span><div class="tongyi-ui-highlighter-right-actions"><div class="tongyi-ui-highlighter-theme-changer"><div class="tongyi-ui-highlighter-theme-changer-btn"><span>深色版本</span><span role="img" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#icon-DownOutlined"></use></svg></span></div></div><svg width="12" height="12" viewBox="0 0 11.199999809265137 11.199999809265137" class="cursor-pointer flex items-center tongyi-ui-highlighter-copy-btn"><g><path d="M11.2,1.6C11.2,0.716344,10.4837,0,9.6,0L4.8,0C3.91634,0,3.2,0.716344,3.2,1.6L4.16,1.6Q4.16,1.3349,4.34745,1.14745Q4.5349,0.96,4.8,0.96L9.6,0.96Q9.8651,0.96,10.0525,1.14745Q10.24,1.3349,10.24,1.6L10.24,6.4Q10.24,6.6651,10.0525,6.85255Q9.8651,7.04,9.6,7.04L9.6,8C10.4837,8,11.2,7.28366,11.2,6.4L11.2,1.6ZM0,4L0,9.6C0,10.4837,0.716344,11.2,1.6,11.2L7.2,11.2C8.08366,11.2,8.8,10.4837,8.8,9.6L8.8,4C8.8,3.11634,8.08366,2.4,7.2,2.4L1.6,2.4C0.716344,2.4,0,3.11634,0,4ZM1.14745,10.0525Q0.96,9.8651,0.96,9.6L0.96,4Q0.96,3.7349,1.14745,3.54745Q1.3349,3.36,1.6,3.36L7.2,3.36Q7.4651,3.36,7.65255,3.54745Q7.84,3.7349,7.84,4L7.84,9.6Q7.84,9.8651,7.65255,10.0525Q7.4651,10.24,7.2,10.24L1.6,10.24Q1.3349,10.24,1.14745,10.0525Z"></path></g></svg></div></span><div><pre><code><span class="comment linenumber react-syntax-highlighter-line-number">1</span><span>external_url </span><span>'https://yourdomain.com'</span></code></pre></div></div></pre>
- 重新配置 GitLab:
<pre><div class="tongyi-ui-highlighter global-dark-theme"><span class="tongyi-ui-highlighter-header"><span class="mr-auto first-letter:uppercase text-[color:var(--TY-Text-2)] tongyi-ui-highlighter-lang">bash</span><div class="tongyi-ui-highlighter-right-actions"><div class="tongyi-ui-highlighter-theme-changer"><div class="tongyi-ui-highlighter-theme-changer-btn"><span>深色版本</span><span role="img" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#icon-DownOutlined"></use></svg></span></div></div><svg width="12" height="12" viewBox="0 0 11.199999809265137 11.199999809265137" class="cursor-pointer flex items-center tongyi-ui-highlighter-copy-btn"><g><path d="M11.2,1.6C11.2,0.716344,10.4837,0,9.6,0L4.8,0C3.91634,0,3.2,0.716344,3.2,1.6L4.16,1.6Q4.16,1.3349,4.34745,1.14745Q4.5349,0.96,4.8,0.96L9.6,0.96Q9.8651,0.96,10.0525,1.14745Q10.24,1.3349,10.24,1.6L10.24,6.4Q10.24,6.6651,10.0525,6.85255Q9.8651,7.04,9.6,7.04L9.6,8C10.4837,8,11.2,7.28366,11.2,6.4L11.2,1.6ZM0,4L0,9.6C0,10.4837,0.716344,11.2,1.6,11.2L7.2,11.2C8.08366,11.2,8.8,10.4837,8.8,9.6L8.8,4C8.8,3.11634,8.08366,2.4,7.2,2.4L1.6,2.4C0.716344,2.4,0,3.11634,0,4ZM1.14745,10.0525Q0.96,9.8651,0.96,9.6L0.96,4Q0.96,3.7349,1.14745,3.54745Q1.3349,3.36,1.6,3.36L7.2,3.36Q7.4651,3.36,7.65255,3.54745Q7.84,3.7349,7.84,4L7.84,9.6Q7.84,9.8651,7.65255,10.0525Q7.4651,10.24,7.2,10.24L1.6,10.24Q1.3349,10.24,1.14745,10.0525Z"></path></g></svg></div></span><div><pre><code><span class="comment linenumber react-syntax-highlighter-line-number">1</span><span>sudo gitlab-ctl reconfigure</span></code></pre></div></div></pre>
- SSL 证书: 您可以使用 Let's Encrypt 获取免费的 SSL 证书。GitLab 可以自动配置 Let's Encrypt 证书。您需要在
/etc/gitlab/gitlab.rb 中启用它:
<pre><div class="tongyi-ui-highlighter global-dark-theme"><span class="tongyi-ui-highlighter-header"><span class="mr-auto first-letter:uppercase text-[color:var(--TY-Text-2)] tongyi-ui-highlighter-lang">ruby</span><div class="tongyi-ui-highlighter-right-actions"><div class="tongyi-ui-highlighter-theme-changer"><div class="tongyi-ui-highlighter-theme-changer-btn"><span>深色版本</span><span role="img" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#icon-DownOutlined"></use></svg></span></div></div><svg width="12" height="12" viewBox="0 0 11.199999809265137 11.199999809265137" class="cursor-pointer flex items-center tongyi-ui-highlighter-copy-btn"><g><path d="M11.2,1.6C11.2,0.716344,10.4837,0,9.6,0L4.8,0C3.91634,0,3.2,0.716344,3.2,1.6L4.16,1.6Q4.16,1.3349,4.34745,1.14745Q4.5349,0.96,4.8,0.96L9.6,0.96Q9.8651,0.96,10.0525,1.14745Q10.24,1.3349,10.24,1.6L10.24,6.4Q10.24,6.6651,10.0525,6.85255Q9.8651,7.04,9.6,7.04L9.6,8C10.4837,8,11.2,7.28366,11.2,6.4L11.2,1.6ZM0,4L0,9.6C0,10.4837,0.716344,11.2,1.6,11.2L7.2,11.2C8.08366,11.2,8.8,10.4837,8.8,9.6L8.8,4C8.8,3.11634,8.08366,2.4,7.2,2.4L1.6,2.4C0.716344,2.4,0,3.11634,0,4ZM1.14745,10.0525Q0.96,9.8651,0.96,9.6L0.96,4Q0.96,3.7349,1.14745,3.54745Q1.3349,3.36,1.6,3.36L7.2,3.36Q7.4651,3.36,7.65255,3.54745Q7.84,3.7349,7.84,4L7.84,9.6Q7.84,9.8651,7.65255,10.0525Q7.4651,10.24,7.2,10.24L1.6,10.24Q1.3349,10.24,1.14745,10.0525Z"></path></g></svg></div></span><div><pre><code><span class="comment linenumber react-syntax-highlighter-line-number">1</span><span>gitlab_rails[</span><span>'gitlab_shell_ssh_port'</span><span>] = </span>2222<span>
</span><span class="comment linenumber react-syntax-highlighter-line-number">2</span><span>gitlab_rails[</span><span>'gitlab_shell_http_port'</span><span>] = </span>8080<span>
</span><span class="comment linenumber react-syntax-highlighter-line-number">3</span><span>gitlab_rails[</span><span>'gitlab_shell_ssl_verify'</span><span>] = </span><span>false</span><span>
</span><span class="comment linenumber react-syntax-highlighter-line-number">4</span><span>gitlab_rails[</span><span>'gitlab_shell_use_system_ssl_certificates'</span><span>] = </span><span>true</span></code></pre></div></div></pre>
- 再次运行配置:
<pre><div class="tongyi-ui-highlighter global-dark-theme"><span class="tongyi-ui-highlighter-header"><span class="mr-auto first-letter:uppercase text-[color:var(--TY-Text-2)] tongyi-ui-highlighter-lang">bash</span><div class="tongyi-ui-highlighter-right-actions"><div class="tongyi-ui-highlighter-theme-changer"><div class="tongyi-ui-highlighter-theme-changer-btn"><span>深色版本</span><span role="img" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#icon-DownOutlined"></use></svg></span></div></div><svg width="12" height="12" viewBox="0 0 11.199999809265137 11.199999809265137" class="cursor-pointer flex items-center tongyi-ui-highlighter-copy-btn"><g><path d="M11.2,1.6C11.2,0.716344,10.4837,0,9.6,0L4.8,0C3.91634,0,3.2,0.716344,3.2,1.6L4.16,1.6Q4.16,1.3349,4.34745,1.14745Q4.5349,0.96,4.8,0.96L9.6,0.96Q9.8651,0.96,10.0525,1.14745Q10.24,1.3349,10.24,1.6L10.24,6.4Q10.24,6.6651,10.0525,6.85255Q9.8651,7.04,9.6,7.04L9.6,8C10.4837,8,11.2,7.28366,11.2,6.4L11.2,1.6ZM0,4L0,9.6C0,10.4837,0.716344,11.2,1.6,11.2L7.2,11.2C8.08366,11.2,8.8,10.4837,8.8,9.6L8.8,4C8.8,3.11634,8.08366,2.4,7.2,2.4L1.6,2.4C0.716344,2.4,0,3.11634,0,4ZM1.14745,10.0525Q0.96,9.8651,0.96,9.6L0.96,4Q0.96,3.7349,1.14745,3.54745Q1.3349,3.36,1.6,3.36L7.2,3.36Q7.4651,3.36,7.65255,3.54745Q7.84,3.7349,7.84,4L7.84,9.6Q7.84,9.8651,7.65255,10.0525Q7.4651,10.24,7.2,10.24L1.6,10.24Q1.3349,10.24,1.14745,10.0525Z"></path></g></svg></div></span><div><pre><code><span class="comment linenumber react-syntax-highlighter-line-number">1</span><span>sudo gitlab-ctl reconfigure</span></code></pre></div></div></pre>
6. 验证 GitLab
7. 管理 GitLab
- 查看 GitLab 服务状态:
<pre><div class="tongyi-ui-highlighter global-dark-theme"><span class="tongyi-ui-highlighter-header"><span class="mr-auto first-letter:uppercase text-[color:var(--TY-Text-2)] tongyi-ui-highlighter-lang">bash</span><div class="tongyi-ui-highlighter-right-actions"><div class="tongyi-ui-highlighter-theme-changer"><div class="tongyi-ui-highlighter-theme-changer-btn"><span>深色版本</span><span role="img" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#icon-DownOutlined"></use></svg></span></div></div><svg width="12" height="12" viewBox="0 0 11.199999809265137 11.199999809265137" class="cursor-pointer flex items-center tongyi-ui-highlighter-copy-btn"><g><path d="M11.2,1.6C11.2,0.716344,10.4837,0,9.6,0L4.8,0C3.91634,0,3.2,0.716344,3.2,1.6L4.16,1.6Q4.16,1.3349,4.34745,1.14745Q4.5349,0.96,4.8,0.96L9.6,0.96Q9.8651,0.96,10.0525,1.14745Q10.24,1.3349,10.24,1.6L10.24,6.4Q10.24,6.6651,10.0525,6.85255Q9.8651,7.04,9.6,7.04L9.6,8C10.4837,8,11.2,7.28366,11.2,6.4L11.2,1.6ZM0,4L0,9.6C0,10.4837,0.716344,11.2,1.6,11.2L7.2,11.2C8.08366,11.2,8.8,10.4837,8.8,9.6L8.8,4C8.8,3.11634,8.08366,2.4,7.2,2.4L1.6,2.4C0.716344,2.4,0,3.11634,0,4ZM1.14745,10.0525Q0.96,9.8651,0.96,9.6L0.96,4Q0.96,3.7349,1.14745,3.54745Q1.3349,3.36,1.6,3.36L7.2,3.36Q7.4651,3.36,7.65255,3.54745Q7.84,3.7349,7.84,4L7.84,9.6Q7.84,9.8651,7.65255,10.0525Q7.4651,10.24,7.2,10.24L1.6,10.24Q1.3349,10.24,1.14745,10.0525Z"></path></g></svg></div></span><div><pre><code><span class="comment linenumber react-syntax-highlighter-line-number">1</span><span>sudo gitlab-ctl status</span></code></pre></div></div></pre>
- 重启 GitLab 服务:
<pre><div class="tongyi-ui-highlighter global-dark-theme"><span class="tongyi-ui-highlighter-header"><span class="mr-auto first-letter:uppercase text-[color:var(--TY-Text-2)] tongyi-ui-highlighter-lang">bash</span><div class="tongyi-ui-highlighter-right-actions"><div class="tongyi-ui-highlighter-theme-changer"><div class="tongyi-ui-highlighter-theme-changer-btn"><span>深色版本</span><span role="img" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#icon-DownOutlined"></use></svg></span></div></div><svg width="12" height="12" viewBox="0 0 11.199999809265137 11.199999809265137" class="cursor-pointer flex items-center tongyi-ui-highlighter-copy-btn"><g><path d="M11.2,1.6C11.2,0.716344,10.4837,0,9.6,0L4.8,0C3.91634,0,3.2,0.716344,3.2,1.6L4.16,1.6Q4.16,1.3349,4.34745,1.14745Q4.5349,0.96,4.8,0.96L9.6,0.96Q9.8651,0.96,10.0525,1.14745Q10.24,1.3349,10.24,1.6L10.24,6.4Q10.24,6.6651,10.0525,6.85255Q9.8651,7.04,9.6,7.04L9.6,8C10.4837,8,11.2,7.28366,11.2,6.4L11.2,1.6ZM0,4L0,9.6C0,10.4837,0.716344,11.2,1.6,11.2L7.2,11.2C8.08366,11.2,8.8,10.4837,8.8,9.6L8.8,4C8.8,3.11634,8.08366,2.4,7.2,2.4L1.6,2.4C0.716344,2.4,0,3.11634,0,4ZM1.14745,10.0525Q0.96,9.8651,0.96,9.6L0.96,4Q0.96,3.7349,1.14745,3.54745Q1.3349,3.36,1.6,3.36L7.2,3.36Q7.4651,3.36,7.65255,3.54745Q7.84,3.7349,7.84,4L7.84,9.6Q7.84,9.8651,7.65255,10.0525Q7.4651,10.24,7.2,10.24L1.6,10.24Q1.3349,10.24,1.14745,10.0525Z"></path></g></svg></div></span><div><pre><code><span class="comment linenumber react-syntax-highlighter-line-number">1</span><span>sudo gitlab-ctl restart</span></code></pre></div></div></pre>
注意事项
- 根据您的需求,可能还需要配置其他参数,如数据库、Redis、备份等。
- 如果您使用的是非默认端口,请相应地更改配置文件中的端口设置。
- 确保防火墙允许必要的端口(如 HTTP/HTTPS)。
|