<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # Installing GitLab on Google Cloud Platform > 原文:[https://docs.gitlab.com/ee/install/google_cloud_platform/](https://docs.gitlab.com/ee/install/google_cloud_platform/) * [Prerequisites](#prerequisites) * [Creating the VM](#creating-the-vm) * [Installing GitLab](#installing-gitlab) * [Next steps](#next-steps) * [Assigning a static IP](#assigning-a-static-ip) * [Using a domain name](#using-a-domain-name) * [Configuring HTTPS with the domain name](#configuring-https-with-the-domain-name) * [Configuring the email SMTP settings](#configuring-the-email-smtp-settings) * [Further reading](#further-reading) # Installing GitLab on Google Cloud Platform[](#installing-gitlab-on-google-cloud-platform "Permalink") 本指南將幫助您在[Google Cloud Platform(GCP)](https://cloud.google.com/)實例上安裝 GitLab. **替代安裝方法:** Google 提供了一份白皮書,用于[在 Google Kubernetes Engine 上部署可投入生產的 GitLab](https://cloud.google.com/solutions/deploying-production-ready-gitlab-on-gke) ,包括所有步驟和外部資源配置. 這些是使用 GCP VM 的替代方法,并使用[Cloud native GitLab Helm chart](https://docs.gitlab.com/charts/) . ## Prerequisites[](#prerequisites "Permalink") 在 GCP 上安裝 GitLab 的前提條件只有兩個: 1. 您需要有一個 Google 帳戶. 2. 您需要注冊 GCP 計劃. 如果您是第一次,Google 會為您提供[$ 300 的信用額,](https://console.cloud.google.com/freetrial)可在 60 天內[免費](https://console.cloud.google.com/freetrial)使用. 完成這兩個步驟后,就可以[創建 VM 了](#creating-the-vm) . ## Creating the VM[](#creating-the-vm "Permalink") 要在 GCP 上部署 GitLab,您首先需要創建一個虛擬機: 1. 轉到[https://console.cloud.google.com/compute/instances](https://console.cloud.google.com/compute/instances)并使用您的 Google 憑據登錄. 2. 點擊**創建** [![Search for GitLab](https://img.kancloud.cn/46/46/4646e813ce4848325a01c1eba4638d5f_2516x808.png)](img/launch_vm.png) 3. On the next page, you can select the type of VM as well as the estimated costs. Provide the name of the instance, desired datacenter, and machine type. Note our [hardware requirements for different user base sizes](../requirements.html#hardware-requirements). [![Launch on Compute Engine](https://img.kancloud.cn/9b/fd/9bfd5ccb8c037d7d1e12dfe81d92dff1_922x1943.png)](img/vm_details.png) 4. 要選擇大小,類型和所需的[操作系統](../requirements.html#supported-linux-distributions) ,請在" `Boot disk` **"**下單擊" **更改** ". 完成后單擊" **選擇"** . 5. 最后,允許 HTTP 和 HTTPS 通信,然后點擊**創建** . 該過程將在幾秒鐘內完成. ## Installing GitLab[](#installing-gitlab "Permalink") 幾秒鐘后,實例將被創建并可以登錄.下一步是將 GitLab 安裝到實例上. [![Deploy settings](https://img.kancloud.cn/5e/c7/5ec748f08d461f64d6e40d7f30e46b2f_1914x144.png)](img/vm_created.png) 1. 記下實例的 IP 地址,因為在后續步驟中將需要使用該 IP 地址. 2. 單擊 SSH 按鈕以連接到實例. 3. 登錄到實例后,將出現一個新窗口. [![GitLab first sign in](https://img.kancloud.cn/fe/9a/fe9a18fcbb6dee9e739aa66b236b703b_1798x1254.png)](img/ssh_terminal.png) 4. 接下來,在[https://about.gitlab.com/install/上](https://about.gitlab.com/install/)按照說明為您選擇的操作系統安裝 GitLab. 您可以將上述步驟中的 IP 地址用作主機名. 5. 恭喜你! GitLab 現在已安裝,您可以通過瀏覽器訪問它. 要完成安裝,請在瀏覽器中打開 URL 并提供初始管理員密碼. 該帳戶的用戶名是`root` . [![GitLab first sign in](https://img.kancloud.cn/ed/2c/ed2cc192433867d21c7f28454c4c171e_1898x1034.png)](img/first_signin.png) ## Next steps[](#next-steps "Permalink") 這些是首次安裝 GitLab 之后要執行的最重要的后續步驟. ### Assigning a static IP[](#assigning-a-static-ip "Permalink") 默認情況下,Google 會為您的實例分配一個臨時 IP. 如果您要在生產中使用 GitLab 并使用域名,則強烈建議分配一個靜態 IP,如下所示. 閱讀 Google 有關如何[提升臨時 IP 地址](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address#promote_ephemeral_ip)的文檔. ### Using a domain name[](#using-a-domain-name "Permalink") 假設您擁有一個域名,并且已正確設置 DNS 以指向在上一步中配置的靜態 IP,則可以通過以下方法配置 GitLab 以了解更改: 1. SSH 進入虛擬機. 您可以輕松使用 Google 控制臺中的**SSH**按鈕,然后會彈出一個新窗口. [![SSH button](https://img.kancloud.cn/5e/c7/5ec748f08d461f64d6e40d7f30e46b2f_1914x144.png)](img/vm_created.png) 將來,您可能想設置[使用 SSH 密鑰的連接](https://cloud.google.com/compute/docs/instances/connecting-to-instance) . 2. 使用您喜歡的文本編輯器編輯 Omnibus GitLab 的配置文件: ``` sudo vim /etc/gitlab/gitlab.rb ``` 3. 將`external_url`值設置為您希望 GitLab 在**不使用** `https` **情況下**擁有的域名: ``` external_url 'http://gitlab.example.com' ``` 我們將在下一步中設置 HTTPS,而現在無需這樣做. 4. 重新配置 GitLab,以使更改生效: ``` sudo gitlab-ctl reconfigure ``` 5. 您現在可以使用域名訪問 GitLab. ### Configuring HTTPS with the domain name[](#configuring-https-with-the-domain-name "Permalink") 盡管不需要,但強烈建議使用 TLS 證書保護 GitLab. 請遵循[Omnibus 文檔中](https://docs.gitlab.com/omnibus/settings/nginx.html)的步驟. ### Configuring the email SMTP settings[](#configuring-the-email-smtp-settings "Permalink") 您需要正確配置電子郵件 SMTP 設置,否則 GitLab 將無法發送通知電子郵件,例如注釋和密碼更改. 檢查[Omnibus 文檔的](https://docs.gitlab.com/omnibus/settings/smtp.html)操作方法. ## Further reading[](#further-reading "Permalink") 可以將 GitLab 配置為與其他 OAuth 提供程序,LDAP,SAML,Kerberos 等進行身份驗證.以下是您可能感興趣閱讀的一些文檔: * [Omnibus GitLab documentation](https://docs.gitlab.com/omnibus/) * [Integration documentation](../../integration/README.html) * [GitLab Pages configuration](../../administration/pages/index.html) * [GitLab Container Registry configuration](../../administration/packages/container_registry.html)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看