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

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # gitlab-ce安裝 GitLab是一個利用 Ruby on Rails 開發的開源應用程序,實現一個自托管的Git項目倉庫,可通過Web界面進行訪問公開的或者私人項目。GitLab擁有與Github類似的功能,能夠瀏覽源代碼,管理缺陷和注釋。可以管理團隊對倉庫的訪問,它非常易于瀏覽提交過的版本并提供一個文件歷史庫。它還提供一個代碼片段收集功能可以輕松實現代碼復用,便于日后有需要的時候進行查找。 1)基礎環境準備 yum install curl policycoreutils openssh-server openssh-clients postfix systemctl start postfix systemctl enable postfix systemctl enable sshd systemctl start sshd 2)安裝gitlab-ce curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash yum install -y gitlab-ce 注:由于網絡問題,國內用戶,建議使用清華大學的鏡像源進行安裝: [root@git ~]# vim /etc/yum.repos.d/gitlab-ce.repo [gitlab-ce] name=gitlab-ce baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/ repo_gpgcheck=0 gpgcheck=0 enabled=1 gpgkey=https://packages.gitlab.com/gpg.key [root@git ~]# yum makecache [root@git ~]# yum install gitlab-ce 3)配置并啟動gitlab-ce gitlab-ctl reconfigure 可以使用gitlab-ctl管理gitlab,例如查看gitlab狀態: [root@git ~]# gitlab-ctl status run: gitlab-workhorse: (pid 12171) 231s; run: log: (pid 7817) 555s run: logrotate: (pid 12175) 230s; run: log: (pid 7832) 548s run: nginx: (pid 12181) 230s; run: log: (pid 7823) 549s run: postgresql: (pid 12186) 229s; run: log: (pid 7683) 587s run: redis: (pid 12194) 229s; run: log: (pid 7600) 592s run: sidekiq: (pid 12198) 229s; run: log: (pid 7806) 558s run: unicorn: (pid 14967) 6s; run: log: (pid 7774) 560s 關閉gitlab:[root@git ~]# gitlab-ctl stop 啟動gitlab:[root@git ~]# gitlab-ctl start 重啟gitlab:[root@git ~]# gitlab-ctl restart 登錄gitlab 第一次登錄gitlab,需要為root用戶修改密碼,root用戶也是gitlab的超級管理員。 ![4-1](http://opnq5yeqm.bkt.clouddn.com/4-1.png) # 配置GitLab主機名 1)修改/etc/gitlab/gitlab.rb文件 mkdir -p /etc/gitlab touch /etc/gitlab/gitlab.rb chmod 600 /etc/gitlab/gitlab.rb 找到如下這段代碼,把external_url改成部署機器的域名或者IP地址,如我的電腦ip地址就是 192.168.0.14 ![4-2](http://opnq5yeqm.bkt.clouddn.com/4-2.png) 2)修改/var/opt/gitlab/gitlab-rails/etc/gitlab.yml文件 vim /var/opt/gitlab/gitlab-rails/etc/gitlab.yml ![4-3](http://opnq5yeqm.bkt.clouddn.com/4-3.png) 執行命令:gitlab-ctl reconfigure 如果還是不能正常訪問的話,查看80端口是否被占用? 有時候80端口可能被apache給暫用了,針對此問題,直接停用apache服務,或者修改apache的默認端口。 到此為止,gitlab的web管理頁面就可以正常訪問,并通過自定義域名訪問了。 # 端口被占用 如果出現如下頁面可以嘗試修改gitlab的端口 ![4-4](http://opnq5yeqm.bkt.clouddn.com/4-4.png) vim /etc/gitlab/gitlab.rb 將external_url 直接輸入 ip加上端口號 ,比如因為80端口被占用,我直接輸入7777端口 external_url 'http://192.168.0.14:7777 ![4-5](http://opnq5yeqm.bkt.clouddn.com/4-5.png) 修改NGINX監聽的端口為7777 ![4-6](http://opnq5yeqm.bkt.clouddn.com/4-6.png) 修改完畢之后執行命令:gitlab-ctl reconfigure # 修改Gitlab數據存儲路徑 默認的Gitlab數據存儲路徑,在目錄/var/opt/gitlab/git-data下,但是新的CentOS服務器根目錄分配的空間比較小,為了防止以后數據過大,所以可以修改路徑存儲為/data/gitlabData。 ![4-7](http://opnq5yeqm.bkt.clouddn.com/4-7.png) 修改完畢之后執行命令:gitlab-ctl reconfigure 設置完后,過一段使用時間,可以看到該目錄下的resposities,如下所示: ![4-8](http://opnq5yeqm.bkt.clouddn.com/4-8.png) # 漢化gitlab 1) 安裝git yum -y install git 2)克隆獲取漢化版本庫 下載最新的漢化包 git clone https://gitlab.com/xhang/gitlab.git 如果是要下載老版本的漢化包,需要加上老版本的分支,比如今天已經是10.5.2,我依舊想下載10.0.2,可以運行下面的語句 git clone https://gitlab.com/xhang/gitlab.git -b v10.0.2-zh 3)查看該漢化補丁及gitlab的版本 cat /opt/gitlab/embedded/service/gitlab-rails/VERSION cat gitlab/VERSION ![4-9](http://opnq5yeqm.bkt.clouddn.com/4-9.png) 4)停止gitlab服務 gitlab-ctl stop 5)切換到gitlab漢化包所在的目錄(即步驟二獲取的漢化版gitlab) cd /root/gitlab 6)比較漢化標簽和原標簽,導出 patch 用的 diff 文件到/root下 git diff v10.5.2 v10.5.2-zh > ../10.5.2-zh.diff 7)將10.5.2-zh.diff作為補丁更新到gitlab中 cd ~ yum install patch -y patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < 10.5.2-zh.diff 8)重新配置gitlab gitlab-ctl start gitlab-ctl reconfigure 登錄gitlab界面查看 ![4-10](http://opnq5yeqm.bkt.clouddn.com/4-10.png) 漢化完成!
                  <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>

                              哎呀哎呀视频在线观看