文章目錄CentOS7 安裝 GitLab首次登錄GitLab修改管理員密碼設置中文管理員通過賬號審核申請刪除項目Windows系統Git上傳代碼至Gitlab倉庫CentOS7 安裝 GitLab安裝sshsudo yum install -y&...
安裝ssh
sudo yum install -y curl policycoreutils-pythonopenssh-server1
將SSH服務設置成開機自啟動:
sudo systemctl enable sshd1
啟動SSH服務
sudo systemctl start sshd1
開啟防火墻
service firewalld start1
添加http服務到firewalld,pemmanent表示永久生效,若不加–permanent系統下次啟動后就會失效。
sudo firewall-cmd --permanent --add-service=http1
重啟防火墻
sudo systemctl reload firewalld1
安裝Postfix以發送通知郵件
sudo yum install postfix1
將postfix服務設置成開機自啟動
sudo systemctl enable postfix1
啟動postfix
sudo systemctl start postfix1
添加YUM-Gitlab源
vim /etc/yum.repos.d/gitlab-ce.repo1
[gitlab-ce] name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0 enabled=1
yum makecache1
我們選擇安裝最新版本的Gitlab。
yum install -y gitlab-ce1
可以訪問"https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/"查看Gitlab-ce的版本。 安裝歷史版本請使用下面命令:
yum install -y gitlab-ce-{VERSION}1
修改gitlab配置文件指定服務器ip
vim /etc/gitlab/gitlab.rb1
重置并啟動GitLab
gitlab-ctl reconfigure gitlab-ctl restart12
根據之前配置的ip訪問就行,默認端口8080
管理員賬號為root
密碼保存在配置文件內
cat /etc/gitlab/initial_root_password1
進入 GitLab 控制臺
GitLab 版本不同,命令會有所不同(網上說的而基本都是gitlab-rails console production ),推薦大家直接上 GitLab 官網去找對應版本的命令
gitlab-rails console -e production1
進入控制臺后,執行下面命令,此 user 則表示 root 用戶
user = User.where(id: 1).first1
修改密碼,確認密碼
user.password = 'secret_pass'user.password_confirmation = 'secret_pass'12
保存密碼
user.save!1
退出控制臺
exit1
如下圖所示
來源:本文內容搜集或轉自各大網絡平臺,并已注明來源、出處,如果轉載侵犯您的版權或非授權發布,請聯系小編,我們會及時審核處理。
聲明:江蘇教育黃頁對文中觀點保持中立,對所包含內容的準確性、可靠性或者完整性不提供任何明示或暗示的保證,不對文章觀點負責,僅作分享之用,文章版權及插圖屬于原作者。
Copyright?2013-2024 JSedu114 All Rights Reserved. 江蘇教育信息綜合發布查詢平臺保留所有權利
蘇公網安備32010402000125
蘇ICP備14051488號-3技術支持:南京博盛藍睿網絡科技有限公司
南京思必達教育科技有限公司版權所有 百度統計