银河麒麟安装GitLab
  3TkxxkgyJPGj 2023年11月02日 60 0

一、下载

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 # 配置

配置成功

银河麒麟安装GitLab_git


服务管理命令

[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-test03 (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错误,账号密码是对的

原因:本地时间和标准时间不一致

将本地时间修改正确后,登录成功!

【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

推荐阅读
  eHipUjOuzYYH   2023年12月07日   28   0   0 数据乐观锁redis
  Yoru5qB4TSKM   2023年12月10日   39   0   0 服务器重启IP