Linux下GitLab安装

软件下载

https://packages.gitlab.com/gitlab/gitlab-ce

如果是centOS8以下的建议找老版本的,用15版本会报glibc-2.25找不到,我折腾了一晚也没搞好,把服务器还蹦了。

这个我用10版本的安装包https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.8.5-ce.0.el7.x86_64.rpm【拖鞋/妥协】

包下载完后放进去(也可以wget)我习惯下载完放进去

直接下载可能会出现连接不信任问题

yum install -y ca-certificates #安装证书更新就可以下载了
[root@dlb rpm]# rpm -ivh gitlab-ce-10.8.5-ce.0.el7.x86_64.rpm    #直接安装可能会缺少依赖
warning: gitlab-ce-10.8.5-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
error: Failed dependencies:
	policycoreutils-python is needed by gitlab-ce-10.8.5-ce.0.el7.x86_64
[root@dlb rpm]# yum install policycoreutils-python   #安装这个就可以了

 安装完毕后,需要修改配置文件,让其远程连接生效

[root@dlb rpm]# vim  /etc/gitlab/gitlab.rb
#612 改端口 。101改超时

[root@dlb rpm]# gitlab-ctl reconfigure  # 重置  执行时间略长
。。。。。。
Running handlers:
Running handlers complete
Chef Client finished, 423/609 resources updated in 02 minutes 12 seconds
gitlab Reconfigured!
[root@dlb rpm]# gitlab-ctl restart   #启动
ok: run: alertmanager: (pid 4741) 0s
ok: run: gitaly: (pid 4751) 1s
ok: run: gitlab-monitor: (pid 4763) 0s
ok: run: gitlab-workhorse: (pid 4777) 1s
ok: run: logrotate: (pid 4786) 0s
ok: run: nginx: (pid 4795) 1s
ok: run: node-exporter: (pid 4802) 0s
ok: run: postgres-exporter: (pid 4808) 1s
ok: run: postgresql: (pid 4892) 0s
ok: run: prometheus: (pid 4900) 0s
ok: run: redis: (pid 4910) 1s
ok: run: redis-exporter: (pid 4915) 0s
ok: run: sidekiq: (pid 4933) 0s
ok: run: unicorn: (pid 4945) 0s
#  到这里就安装好了
 gitlab-ctl start # 启动所有 gitlab 组件
 gitlab-ctl stop # 停止所有 gitlab 组件
 gitlab-ctl restart # 重启所有 gitlab 组件
 vim /etc/gitlab/gitlab.rb# 修改默认的配置文件
 gitlab-ctl status # 查看服务状态
 gitlab-ctl reconfigure # 启动服务

 在浏览器输入:第13行输入的

初次打开可能报502,再次刷新或等等看就可以了

初始账户: root 密码: 5iveL!fe,根据提示修改就行了。

参考 https://www.cnblogs.com/wenwei-blog/p/5861450.html

gitlab中文官网 https://www.gitlab.cc/downloads/#centos7

本地idea项目上传gitlab,http://www.javashuo.com/article/p-dhqtshqk-pg.html

posted @ 2022-07-12 13:40  大萝卜萌萌哒  阅读(792)  评论(2编辑  收藏  举报