一、下载
wget https://packages.gitlab.cn/repository/el/8/gitlab-jh-16.2.4-jh.0.el8.aarch64.rpm
二、安装
报错缺少依赖,需要安装atmic
[root@ky10sp2-wnc-test03 soft]# rpm -ivh gitlab-jh-16.2.4-jh.0.el8.aarch64.rpm
warning: gitlab-jh-16.2.4-jh.0.el8.aarch64.rpm: Header V4 DSA/SHA256 Signature, key ID 319ec913: NOKEY
error: Failed dependencies:
libatomic is needed by gitlab-jh-16.2.4-jh.0.el8.aarch64
wget http://mirror.centos.org/centos/8-stream/BaseOS/aarch64/os/Packages/libatomic-8.5.0-20.el8.aarch64.rpm
rpm -ivh libatomic-8.5.0-20.el8.aarch64.rpm
执行安装gitlab成功
[root@ky10sp2-wnc-test03 soft]# rpm -ivh gitlab-jh-16.2.4-jh.0.el8.aarch64.rpm
warning: gitlab-jh-16.2.4-jh.0.el8.aarch64.rpm: Header V4 DSA/SHA256 Signature, key ID 319ec913: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:gitlab-jh-16.2.4-jh.0.el8 ################################# [100%]
It looks like JiHu GitLab has not been configured yet; skipping the upgrade script.
*. *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,.
___ __ __ _______ __ __ __
/ (_) / / /_ __ / ____(_) /_/ / ____ _/ /_
__ / / / /_/ / / / / / / __/ / __/ / / __ `/ __
/ /_/ / / __ / /_/ / / /_/ / / /_/ /___/ /_/ / /_/ /
____/_/_/ /_/__,_/ ____/_/__/_____/__,_/_.___/
Thank you for installing JiHu GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your JiHu GitLab instance by setting `external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your JiHu GitLab instance by running the following command:
sudo gitlab-ctl reconfigure
For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://jihulab.com/gitlab-cn/omnibus-gitlab/-/blob/main-jh/README.md
Help us improve the installation experience, let us know how we did with a 1 minute survey:
https://wj.qq.com/s2/10068464/dc66
修改external_url
[root@ky10sp2-wnc-test03 soft]# vi /etc/gitlab/gitlab.rb
32行:external_url 'http://172.16.33.37'
[root@tiaoban gitlab]# gitlab-ctl reconfigure # 配置
配置成功
服务管理命令
[root@tiaoban gitlab]# gitlab-ctl start
[root@tiaoban gitlab]# gitlab-ctl status
[root@tiaoban gitlab]# gitlab-ctl stop
三、启动
启动gitlab
[root@ky10sp2-wnc-test03 soft]# gitlab-ctl start
ok: run: alertmanager: (pid 643571) 95s
ok: run: gitaly: (pid 643389) 106s
ok: run: gitlab-exporter: (pid 644778) 0s
ok: run: gitlab-kas: (pid 643448) 103s
ok: run: gitlab-workhorse: (pid 643458) 102s
ok: run: logrotate: (pid 641800) 338s
ok: run: nginx: (pid 642214) 192s
ok: run: node-exporter: (pid 643471) 102s
ok: run: postgres-exporter: (pid 643582) 95s
ok: run: postgresql: (pid 641930) 315s
timeout: down: prometheus: 0s, normally up, want up
ok: run: puma: (pid 642120) 243s
ok: run: redis: (pid 641837) 363s
ok: run: redis-exporter: (pid 643487) 133s
ok: run: sidekiq: (pid 642137) 237s
prometheus启动超时,查看日志发现9090端口占用
[root@ky10sp2-wnc-test03 soft]# tail -f /var/log/gitlab/prometheus/current
2023-08-17_03:27:54.33053 ts=2023-08-17T03:27:54.330Z caller=web.go:562 level=info component=web msg="Start listening for connections" address=localhost:9090
2023-08-17_03:27:54.33107 ts=2023-08-17T03:27:54.331Z caller=main.go:833 level=error msg="Unable to start web listener" err="listen tcp 127.0.0.1:9090: bind: address already in use"
2023-08-17_03:27:55.37410 ts=2023-08-17T03:27:55.373Z caller=main.go:534 level=info msg="No time or size retention was set so using the default time retention" duration=15d
2023-08-17_03:27:55.37414 ts=2023-08-17T03:27:55.374Z caller=main.go:578 level=info msg="Starting Prometheus Server" mode=server version="(version=2.45.0, branch=master, revision=8ef767e396bf8445f009f945b0162fd71827f445)"
2023-08-17_03:27:55.37417 ts=2023-08-17T03:27:55.374Z caller=main.go:583 level=info build_context="(go=go1.20.5, platform=linux/arm64, user=GitLab-Omnibus, date=, tags=netgo,builtinassets,stringlabels)"
2023-08-17_03:27:55.37421 ts=2023-08-17T03:27:55.374Z caller=main.go:584 level=info host_details="(Linux 4.19.90-24.4.v2101.ky10.aarch64 #1 SMP Mon May 24 14:45:37 CST 2021 aarch64 ky10sp2-wnc-test0服务器托管网3 (none))"
2023-08-17_03:27:55.37425 ts=2023-08-17T03:27:55.374Z caller=main.go:585 level=info fd_limits="(soft=50000, hard=50000)"
2023-08-17_03:27:55.37429 ts=2023-08-17T03:27:55.374Z caller=main.go:586 level=info vm_limits="(soft=unlimited, hard=unlimited)"
2023-08-17_03:27:55.37817 ts=2023-08-17T03:27:55.378Z caller=web.go:562 level=info component=web msg="Start listening for connections" address=localhost:9090
修改prometheus端口,并重启Prometheus
[root@ky10sp2-wnc-test03 soft]# vi /etc/gitlab/gitlab.rb
# prometheus['listen_address'] = 'localhost:9090'
prometheus['listen_address'] = 'localhost:9080'
重新配置
[root@ky10sp2-wnc-test03 soft]# gitlab-ctl reconfigure
重启gitlab
[root@ky10sp2-wnc-test03 soft]# gitlab-ctl restart
[root@ky10sp2-wnc-test03 soft]# gitlab-ctl status
run: alertmanager: (pid 767324) 305s; run: log: (pid 642586) 10152s
run: gitaly: (pid 767348) 303s; run: log: (pid 641884) 10321s
run: gitlab-exporter: (pid 771297) 1s; run: log: (pid 642305) 10177s
run: gitlab-kas: (pid 767493) 293s; run: log: (pid 642068) 10303s
run: gitlab-workhorse: (pid 767503) 293s; run: log: (pid 642196) 10194s
run: logrotate: (pid 767523) 292s; run: log: (pid 641812) 10333s
run: nginx: (pid 767537) 292s; run: log: (pid 642228) 10189s
run: node-exporter: (pid 767546) 291s; run: log: (pid 642284) 10181s
run: postgres-exporter: 服务器托管网(pid 767560) 291s; run: log: (pid 642688) 10146s
run: postgresql: (pid 767577) 291s; run: log: (pid 641942) 10310s
run: prometheus: (pid 770628) 96s; run: log: (pid 642407) 10165s
run: puma: (pid 770729) 85s; run: log: (pid 642128) 10206s
run: redis: (pid 768033) 259s; run: log: (pid 641851) 10327s
run: redis-exporter: (pid 768056) 258s; run: log: (pid 642363) 10171s
run: sidekiq: (pid 770655) 94s; run: log: (pid 642158) 10200s
Gitlab 登录报422错误,账号密码是对的
原因:本地时间和标准时间不一致
将本地时间修改正确后,登录成功!
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.fwqtg.net
RocketMQ 消息重试与死信队列 RocketMQ 前面系列文章如下: Rocke服务器托管网tMQ系列(一) 基本介绍 RocketMQ 系列(二) 环境搭建 RocketMQ 系列(三) 集成 SpringBoot RocketMQ 系列(四) 消息存…