日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

GItLib环境搭建

發布時間:2024/6/21 综合教程 27 生活家
生活随笔 收集整理的這篇文章主要介紹了 GItLib环境搭建 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

服務器配置

centos7+

2核4G+

手動部署GitLab環境

1.安裝依賴包

sudo yum install -y curl policycoreutils-python openssh-server

2.依次運行以下命令,配置SSH服務

啟動SSH服務

sudo systemctl start sshd

設置SSH服務為開機自啟動

sudo systemctl enable sshd

3.安裝Postfix來發送通知郵件

sudo yum install postfix

4.設置Postfix開機自啟動

sudo systemctl enable postfix

5.啟動Postfix服務

運行以下命令,打開main.cf文件

vim /etc/postfix/main.cf

找到如下圖所示的代碼,然后按i進入編輯模式

inet_interfaces = localhost

將該行代碼修改為inet_interfaces = all
按Esc退出編輯模式,然后輸入:wq并回車,保存關閉文件

運行以下命令,啟動Postfix服務

sudo systemctl start postfix

6.添加GitLab軟件包倉庫

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

7.安裝GitLab

sudo EXTERNAL_URL="GitLab服務器的公網IP地址" yum install -y gitlab-ce

8.構建命令

sudo gitlab-ctl reconfigure

9.檢查是否安裝成功

sudo gitlab-ctl status

10.啟動gitlab服務

sudo gitlab-ctl start

11.獲取Linux初裝gitlab初始默認密碼

cat /etc/gitlab/initial_root_password

12.用瀏覽器訪問GitLab服務器的公網IP地址

常用命令

#更新配置,并啟動gitlab服務

sudo gitlab-ctl reconfigure

#啟動 gitlab

sudo gitlab-ctl start

#重新GitLab

sudo gitlab-ctl restart

#停止 gitlab

sudo gitlab-ctl stop

#查看gitlab服務狀態

sudo gitlab-ctl status

#查看Gitlab日志

sudo gitlab-ctl tail

#修改默認的配置文件

sudo vim /etc/gitlab/gitlab.rb

參考資料

1.https://help.aliyun.com/document_detail/52857.html

2.https://blog.csdn.net/wangxiuwen12/article/details/118304592

3.https://blog.csdn.net/timonium/article/details/119451755

總結

以上是生活随笔為你收集整理的GItLib环境搭建的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。