centos 7 安装gitlab

本文详细介绍如何从零开始安装GitLab服务器,并配置必要的服务组件。包括使用rpm包进行安装、配置防火墙、邮件服务等步骤,以及如何通过浏览器访问并设置初始密码。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一,安装
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ol/7/gitlab-ce-14.6.1-ce.0.el7.x86_64.rpm/download.rpm

rpm -ivh gitlab-ce-14.6.1-ce.0.el7.x86_64.rpm
yum install -y curl policycoreutils-python openssh-server cronie
yum -y install lokkit
lokkit -s http -s ssh
yum install postfix -y
service postfix start
chkconfig postfix on
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | bash

二. gitlab服务操作
2.1 初始化配置gitlab
gitlab-ctl reconfigure

2.2 启动和停止gitlab
命令:

gitlab-ctl start
gitlab-ctl stop

三. 浏览器访问
https://192.168.3.200

cat /etc/gitlab/initial_root_password
这个文件将在首次执行reconfigure后24小时自动删除

改后密码为
root
root@root

http://192.168.3.200/
初次登录时需要为gitlab 的root 用户设置密码。
命令:

cd /opt/gitlab/bin
gitlab-rails console -e production
user = User.where(username:“root”).first
user.password = root@nierdaye.com
user.password_confirmation = root@nierdaye.com
user.save!
quit

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值