GitLab 是一個用於倉庫管理系統的開源項目,使用Git作爲代碼管理工具,並在此基礎上搭建起來的web服務。安裝方法是參考GitLab官網https://packages.gitlab.com/gitlab/gitlab-ee/install#bash-rpm。
安裝依賴軟件
yum -y install policycoreutils openssh-server openssh-clients postfix
依賴設置
設置postfix開機自啓,並啓動,postfix支持gitlab發信功能
systemctl enable postfix && systemctl start postfix
查看離線下載地址
下載合適的版本:此處演示 gitlab-ce-12.5.0-ce.0.el7.x86_64.rpm
Centos7版本選擇地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
本地安裝軟件
yum localinstall gitlab-ce-10.4.0-ce.0.el7.x86_64.rpm
修改gitlab配置文件
指定服務器ip和自定義端口:vi /etc/gitlab/gitlab.rb
修改內容:external_url “http://127.0.0.1:80”
配置文件生效並重啓
gitlab-ctl reconfigure
gitlab-ctl restart
[root@servce ~]# gitlab-ctl restart
ok: run: alertmanager: (pid 3163) 1s
ok: run: gitaly: (pid 3172) 0s
ok: run: gitlab-exporter: (pid 3189) 0s
ok: run: gitlab-workhorse: (pid 3192) 0s
ok: run: grafana: (pid 3199) 0s
ok: run: logrotate: (pid 3210) 0s
ok: run: nginx: (pid 3226) 1s
ok: run: node-exporter: (pid 3231) 0s
ok: run: postgres-exporter: (pid 3236) 1s
ok: run: postgresql: (pid 3245) 0s
ok: run: prometheus: (pid 3247) 1s
ok: run: redis: (pid 3262) 0s
ok: run: redis-exporter: (pid 3286) 1s
ok: run: sidekiq: (pid 3370) 0s
ok: run: unicorn: (pid 3382) 0s
頁面登錄
http://192.168.144.136/users/password/edit?reset_password_token=ePX2gaP8pa7unuMUKoEp
設置root新密碼:gitlab@321