0
点赞
收藏
分享

微信扫一扫

linux centos8系统安装gitlab

boom莎卡拉卡 2022-01-16 阅读 78

linux系统安装gitlab

1.安装相关依赖

yum -y install policycoreutils openssh-server openssh-clients postfix

2.启动ssh服务&设置为开机启动

systemctl enable sshd && sudo systemctl start sshd

3. 设置postfix开机自启,并启动,postfix支持gitlab发信功能

systemctl enable postfix && systemctl start postfix

4.开放ssh以及http服务,然后重新加载防火墙列表

firewall-cmd --add-service=ssh --permanent
firewall-cmd --add-service=http--permanent
firewall-cmd --reload

如果关闭防火墙就不需要做以上配置

5.gitlab 镜像下载地址

gitalb镜像下载链接

 wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-14.6.2-ce.0.el8.x86_64.rpm

6.gitlab的安装和系统版本有关联,centos8可以安装el8版本的gitalb

7. 安装gitlab

rpm -i gitlab-ce-10.2.7-ce.0.el7.x86_64.rpm

8. 修改配置

vim /etc/gitlab/gitlab.rb

external url ‘http://ip:82’
nginx[‘listen_port’] = 82

9.重载配置以及启动gitlab

gitlab-ctl reconfigure
gitlab-ctl restart

10. 查看gitlab的初始化密码,账号是root

cat /etc/gitlab/initial_root_password 

11.重置root的密码,根据官网提示修改root密码

https://docs.gitlab.com/ee/security/reset_user_password.html
举报

相关推荐

0 条评论