1.环境准备

  • 虚拟机配置

    CPU:1C 内存:2G以上 硬盘:20G

  • 系统环境

$ cat /etc/redhat-release 
CentOS Linux release 7.5.1804 (Core)

2.安装GitLab

国内清华源

# 下载rpm包
$ wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.2.2-ce.0.el7.x86_64.rpm

# 安装依赖
$ yum -y install policycoreutils‐python

# 安装
$ rpm -ivh gitlab-ce-10.2.2-ce.0.el7.x86_64.rpm

3.配置CitLab

  • 修改配置文件
# 更改url地址为本机IP地址
$ vim /etc/gitlab/gitlab.rb
external_url 'http://10.0.0.200'
  • 重新配置
$ gitlab‐ctl reconfigure
  • 重启gitlab
# 提示"ok: run:xxx"表示启动成功
$ gitlab-ctl restart
  • gitlab常用管理命令
# 查看当前状态
$ gitlab-ctl status
# 启动
$ gitlab-ctl start
# 停止
$ gitlab-ctl stop
# 停止单个服务
$ gitlab-ctl stop nginx
# 启动单个服务
$ gitlab-ctl start nginx
  • 浏览器访问

http://10.0.1.200/
image.png

  • 修改密码后使用root账号登录

原博客地址:庐州书院

posted on 2020-04-19 19:25  涂鸦少年  阅读(133)  评论(0编辑  收藏  举报