centos7安装gitlab服务

775 阅读1分钟

至少4G内存,不然会很卡,可能安装不成功

1.下载镜像

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

2.安装

rpm -ivh gitlab-ce-13.1.2-ce.0.el7.x86_64.rpm

3.修改配置文件

vim /etc/gitlab/gitlab.rb

#修改访问URL external_url 'http://localhost:8866'

#配置时区 gitlab_rails['time_zone'] = 'Asia/Shanghai

4.重置配置

gitlab-ctl reconfigure

5. 启动

gitlab-ctl restart

默认的用户名: admin@example.com 密码: 5iveL!fe

6. 其他操作

启动服务:gitlab -ctl start

 查看状态:gitlab -ctl status

 停掉服务:gitlab -ctl stop

 重启服务:gitlab -ctl restart

 让配置生效:gitlab -ctl reconfigure

如有相关提示解决方案:

image.png

安装: yum install policycoreutils-python

image.png

修改系统编码: vim /etc/locale.conf 如果没有文件的话 执行下面这个 vim /etc/sysconfig/i18n

LC_ALL=en_US.UTF-8 
LANG=en_US.UTF-8 
LANGUAGE=en_US.UTF-8

重载配置 source /etc/locale.conf 或 source /etc/sysconfig/i18n