首页 > 系统相关 >Centos7搭建gitlab

Centos7搭建gitlab

时间:2022-11-30 23:33:31浏览次数:46  
标签:postfix gitlab Centos7 systemctl yum ctl 安装 搭建

1·、安装ssh服务:yum install -y curl policycoreutils-pythonopenssh-server

 

 

 2、启动ssh服务并设置为开机自启:

  systemctl enable sshd

  systemctl start sshd

 3、添加http服务到firewalld,pemmanent表示永久生效

 

 4、安装Postfix以发送通知邮件,安装命令:yum -y install postfix

 

 

 5、将postfix服务设置成开机自启动:

  systemctl enable postfix

  systemctl start postfix

6、配置gitlab安装源:curl -fsSL https://packages.gitlab.cn/repository/raw/scripts/setup.sh | /bin/bash

7、安装gitlab:sudo EXTERNAL_URL="https://gitlab.example.com" yum install -y gitlab-jh(https://gitlab.example.com修改为自己的ip地址)

注意:除非您在安装过程中指定了自定义密码,否则将随机生成一个密码并存储在 /etc/gitlab/initial_root_password 文件中(出于安全原因,24 小时后,此文件会被第一次 gitlab-ctl reconfigure 自动删除,因此若使用随机密码登录,建议安装成功初始登录成功之后,立即修改初始密码)。使用此密码和用户名 root 登录。

 

9、修改url:vi  /etc/gitlab/gitlab.rb

 

 10、重置并启动gitlab:

  gitlab-ctl reconfigure

  gitlab-ctl restart

 

 11、通过网页访问

 

 

 

标签:postfix,gitlab,Centos7,systemctl,yum,ctl,安装,搭建
From: https://www.cnblogs.com/zhangnk/p/16940173.html

相关文章