centos7安装gitlab_centos7下gitlab安装说明

d0f33fc6e2c148596a179f8c89b575ae.png
619c05f2e7c2634aafdf3b7b48d7533a.png

执行 1

sudo yum install -y curl policycoreutils-python openssh-server

sudo systemctl enable sshd

sudo systemctl start sshd

sudo firewall-cmd --permanent --add-service=http

sudo firewall-cmd --permanent --add-service=https

sudo systemctl reload firewalld

如果遇到

9d6355ce85f35f48771fcbbab0fd96c2.png

原因是

由于yum命令一次只能下载一个软件,所以当你需要下载第二个软件包的时候,系统会用进程锁锁定yum解决办法:rm -f /var/run/yum.pid 将该文件删除,然后再次运行yum

执行后再执行1

b32419d71c4fa0e50a3b8fadea594eec.png

执行 2

#安装 Postfix并开机启动 启用

sudo yum install postfix

sudo systemctl enable postfix

sudo systemctl start postfix

39f791401bdcf4d990ab054a64cda517.png

执行 3

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash

执行 4 执行安装

说明EXTERNAL_URL的内容为访问的地址需配置对

这步很重要

sudo EXTERNAL_URL="https://192.168.1.112" yum install -y gitlab-ee

这步下载需等待

ed58c262c9a85b68d1afb71aae9f229d.png

如果启动后访问遇到502

b67a3d1771be975abd23942d708a5280.png

需要修改端口

sudo gitlab-ctl stop

sudo vim /etc/gitlab/gitlab.rb

增加或修改

external_url 'http://192.168.56.136:1890'

gitlab_workhorse['auth_backend'] = "http://localhost:8081"

unicorn['port'] = 8081

更新配置

gitlab-ctl reconfigure

重启

sudo gitlab-ctl start

启动成功首先是设置密码

05330db80404b8d4f9ae904d2c31562c.png

启动成功默认用户是root,密码是首次进去设置的

其他命令

设置开机启动

systemctl enable gitlab-runsvdir.service

修改配置后的初始化

gitlab-ctl reconfigure

启动sudo gitlab-ctl start

停止sudo gitlab-ctl stop

重启sudo gitlab-ctl restart

禁止开机自启动

systemctl disable gitlab-runsvdir.service

防火墙命令

1.查看状态

systemctl status firewalld.service

2.关闭

systemctl stop firewalld.service

3.禁止开机启动

systemctl disable firewalld.service

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值