gitlab 安装_GitLab入门详解(一) 安装部署

本文档详细介绍了在CentOS7环境下,如何安装和配置Gitlab。首先确保系统为CentOS7.4,内存至少2GB,磁盘50GB,关闭防火墙和SELinux。接着,通过yum安装必要的依赖包,然后手动下载并安装Gitlab的RPM包。配置文件`gitlab.rb`中设置外部URL,并使用`gitlab-ctl reconfigure`命令初始化和配置Gitlab服务。最后,通过浏览器访问服务器地址完成配置。

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

Gitlab安装配置

1、环境准备

操作系统:CentOS Linux release 7.4.1708 (Core) 内存:2G及以上磁盘:50G安全:关闭防火墙,selinux

2、安装Gitlab所需的依赖包

yum install curl policycoreutils-python openssh-server postfix wget -y

3、手动安装gitlab

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.2.3-ce.0.el7.x86_64.rpmrpm -ivh gitlab-ce-10.2.3-ce.0.el7.x86_64.rpm

4、配置gitlab服务

需要修改配置文件,换成你自己的服务器地址就好vim /etc/gitlab/gitlab.rbexternal_url 'http://10.0.0.191'

5、初始化gitlab

# 注意,当修改了gitlab配置文件,就得reconfigure[root@git01 tools]# gitlab-ctl reconfigure# 启停gitlab-ctl start |restart |status |stop[root@git01 tools]# gitlab-ctl statusrun: gitaly: (pid 3971) 473s; run: log: (pid 3504) 593srun: gitlab-monitor: (pid 3982) 472s; run: log: (pid 3565) 581srun: gitlab-workhorse: (pid 3985) 472s; run: log: (pid 3461) 611srun: logrotate: (pid 3994) 471s; run: log: (pid 3487) 599srun: nginx: (pid 4001) 471s; run: log: (pid 3472) 605srun: node-exporter: (pid 4023) 471s; run: log: (pid 3550) 587srun: postgres-exporter: (pid 4028) 470s; run: log: (pid 3649) 563srun: postgresql: (pid 4036) 469s; run: log: (pid 3238) 685srun: prometheus: (pid 4045) 469s; run: log: (pid 3595) 569srun: redis: (pid 4051) 468s; run: log: (pid 3178) 691srun: redis-exporter: (pid 4058) 468s; run: log: (pid 3578) 575srun: sidekiq: (pid 4063) 467s; run: log: (pid 3443) 617srun: unicorn: (pid 4072) 467s; run: log: (pid 3405) 623s

6、通过浏览器进行访问

7bf767999ada11046c797ad4e1e0be60.png

52318623ccfb9b6e5e080420e30881b2.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值