<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>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ## GitLab安裝 * 關閉防火墻 ``` [root@VM_0_11_centos ~]# systemctl stop firewalld [root@VM_0_11_centos ~]# systemctl disable firewalld ``` * selinux禁用 ``` vim /etc/sysconfig/selinux ``` 修改成disabled * 安裝gitlab ``` curl -sS https://packages.gitlab.com/install/repositries/gitlab/gitlab-ce/script.rpm.sh | sudo bash ``` ``` yum -y install gitlab-ce ``` * 配置ssl證書 ``` #新建目錄 [root@VM_0_11_centos ~]# mkdir -p /etc/gitlab/ssl #目錄中生成密鑰文件 [root@VM_0_11_centos ~]# openssl genrsa -out /etc/gitlab/ssl/gitlab.example.com.key 2048 #利用生成的密鑰生成證書請求文件 [root@VM_0_11_centos ~]# openssl -new -key /etc/gitlab/ssl/gitlab.example.com.key -out /etc/gitlab/ssl/gitlab.example.com.csr ``` ``` #需要輸入一些信息 Country Name (2 letter code) [XX]:cn State or Province Name (full name) []:js Locality Name (eg, city) [Default City]:nt Organization Name (eg, company) [Default Company Ltd]: Organizational Unit Name (eg, section) []: Common Name (eg, your name or your server's hostname) []:gitlab.example.com Email Address []:admin@example.com Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []:934158 An optional company name []: ``` > 請求證書 ``` [root@VM_0_11_centos ~]# openssl x509 -req -days 1900 -in /etc/gitlab/ssl/gitlab.example.com.csr -signkey /etc/gitlab/ssl/gitlab.example.com.key -out /etc/gitlab/ssl/gitlab.example.com.crt ``` > 請求之后生成了crt文件 ![](https://img.kancloud.cn/bc/1b/bc1bcb882508606bb4069f933d983ab8_461x88.png) > 生成pem文件 ``` [root@VM_0_11_centos ssl]# openssl dhparam -out /etc/gitlab/ssl/dhparams.pem 2048 ``` * 修改權限 ``` [root@VM_0_11_centos ssl]# chmod 600 * ``` * 修改gitlab.rb配置 > 位于/etc/gitlab/gitlab.rb ``` #修改幾處地方 external_url 'https://gitlab.example.com' ``` ![](https://img.kancloud.cn/dd/a1/dda1c416235a8f96b672bcf26a3f85ba_571x280.png) > 這幾項暫時不打開注釋 * 重新配置gitlab ``` gitlab-ctl reconfigure ``` > 然后要等好久,我一度認為卡死了。 ![](https://img.kancloud.cn/8c/68/8c685498ddb1f45a1e581100862c3c59_562x160.png) * 修改gitlab-nginx代理 ``` vi /var/opt/gitlab/nginx/conf/gitlab-http.conf ``` ``` server { listen *:80; server_name gitlab.example.com; #加上下面這句話 rewrite ^(.*)$ https://$host$1 permanent; server_tokens off; ## Don't show the nginx version number, a security best practice ``` * 重啟gitlab ``` [root@VM_0_11_centos ~]# gitlab-ctl restart ``` * 默認占據80端口,要改掉,我改成了8099 ``` vi /var/opt/gitlab/nginx/conf/gitlab-http.conf ``` 在以上文件中修改。 然后再次重啟gitlab。 * 在本地瀏覽器訪問gitlab ![](https://img.kancloud.cn/00/b2/00b2cfe0380913ffb250bbcb5b8df5d4_980x454.png) * 第一次需要設置新密碼,目前是934158qq。 * 然后使用root用戶進入 ![](https://img.kancloud.cn/00/b2/00b2cfe0380913ffb250bbcb5b8df5d4_980x454.png) * 創建倉庫克隆到本地 ``` git -c http.sslVerify=false clone https://gitlab.example.com/root/test-repo.git ``` > 這里用的https的方式。 * 會要輸入用戶名和密碼。 ``` Username for 'https://gitlab.example.com': root Password for 'https://root@gitlab.example.com': warning: You appear to have cloned an empty repository. wangyijiadeMacBook-Air:Projects bizzbee$ ``` * 最后提交push的時候也需要用如下: ``` wangyijiadeMacBook-Air:test-repo bizzbee$ git -c http.sslVerify=false push origin master Enumerating objects: 3, done. Counting objects: 100% (3/3), done. Writing objects: 100% (3/3), 217 bytes | 217.00 KiB/s, done. Total 3 (delta 0), reused 0 (delta 0) To https://gitlab.example.com/root/test-repo.git * [new branch] master -> master ```
                  <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>

                              哎呀哎呀视频在线观看