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

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐