gitlab rpm包安装方法

gitlab rpm包安装方法
当前安装方式适合centOs7版本,需要有root权限,如果当前用户不是root用户,需要配置当前用户的sudo
1. yum install -y curl policycoreutils-python openssh-server
2. systemctl enable sshd && systemctl start sshd
3. firewall-cmd --permanent --add-service=http
  在执行这条命令后如果报FirewallD is not running这个错误,说明防火墙没有启动,使用systemctl start firewalld启动防火墙
4. firewall-cmd --permanent --add-service=https
5. 指定一个端口作为后续在web端访问gitlab的端口并且打开这个端口对外访问。
  5.1. firewall-cmd --zone=public --list-ports 查询当前都有哪些端口可以通过外部访问
  5.2. firewall-cmd --zone=public --add-port=80/tcp --permanent 打开你需要打开的端口
6. systemctl reload firewalld 重启防火墙
7. yum install postfix 安装邮件服务
8. systemctl enable postfix && systemctl start postfix
9. 使用rpm包安装命令安装gitlab的rpm包,下载地址为https://packages.gitlab.com/gitlab/gitlab-ce社区版本或者使用清华大学镜像https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
rpm -ivh ...rpm
10. vim /etc/gitlab/gitlab.rb 修改文件中的external_url 'http://地址:端口',改为可以访问到的地址和端口
11. gitlab-ctl reconfigure:初始化gitlab配置信息并启动每一个组件,
接下来就可以在web浏览器端进行访问了。

gitlab的初始化账号为root,密码为:5iveL!fe

gitlab常用命令
 1. gitlab-ctl start:启动gitlab,
 2. gitlab-ctl stop:停止gitlab。
 3. gitlab-ctl status:查看gitlab状态
 4. gitlab-ctl restart:重启服务

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值