zoukankan      html  css  js  c++  java
  • GitLab 常用命令

    GitLab 常用命令

    # 启动所有 gitlab 组件:
    gitlab-ctl start
    # 停止所有 gitlab 组件:
    gitlab-ctl stop
    # 停止 postgresql 组件:
    gitlab-ctl stop postgresql
    # 停止相关数据连接服务
    gitlab-ctl stop unicorn
    gitlab-ctl stop sidekiq
    # 重启所有 gitlab 组件:
    gitlab-ctl restart
    # 重启 gitlab-workhorse 组件:
    gitlab-ctl restart gitlab-workhorse
    # 查看服务状态
    gitlab-ctl status

    # 如果更改了主配置文件 [:/etc/gitlab/gitlab.rb 文件],需要用这个命令,使配置文件生效 但是会初始化除了gitlab.rb 之外的所有文件

    sudo gitlab-ctl reconfigure

    执行完上面那个命令 重启所有 gitlab 组件

    gitlab-ctl restart

    针对某个服务重启 例如重启nginx

    gitlab-ctl restart nginx

    针对某个服务启动 例如启动nginx

    gitlab-ctl start nginx

    针对某个服务关闭 例如关闭nginx

    gitlab-ctl stop nginx


    # 查看日志 (查看gitlab整个所有的日志)
    sudo gitlab-ctl tail

    具体的日志文件路径:

    [root@ci-node1 src]# ll /var/log/gitlab/
    total 12
    drwx------ 2 git               root         95 Mar 23 23:27 gitaly
    drwx------ 2 git               root         95 Mar 23 23:27 gitlab-monitor
    drwx------ 2 git               root       4096 Mar 28 00:39 gitlab-rails
    drwx------ 2 git               root        204 Mar 28 00:39 gitlab-shell
    drwx------ 2 git               root         95 Mar 23 23:27 gitlab-workhorse
    drwx------ 2 root              root         95 Mar 23 23:27 logrotate
    drwxr-x--- 2 root              gitlab-www 4096 Mar 28 00:39 nginx
    drwx------ 2 gitlab-prometheus root         95 Mar 23 23:27 node-exporter
    drwx------ 2 gitlab-psql       root         95 Mar 23 23:27 postgres-exporter
    drwx------ 2 gitlab-psql       root         95 Mar 23 23:27 postgresql
    drwx------ 2 gitlab-prometheus root        235 Mar 27 23:27 prometheus
    drwxr-xr-x 2 root              root         28 Mar 22 23:25 reconfigure
    drwx------ 2 gitlab-redis      root        235 Mar 27 23:27 redis
    drwx------ 2 gitlab-redis      root         95 Mar 23 23:27 redis-exporter
    drwx------ 2 git               root        235 Mar 27 23:27 sidekiq
    drwx------ 2 git               root       4096 Mar 28 00:39 unicorn

    一般有问题 有报错时候 可以看 所有输出 gitlab-ctl tail

    # 检查 redis 的日志
    sudo gitlab-ctl tail redis

  • 相关阅读:
    Alpha 冲刺 (8/10)
    Alpha 冲刺 (7/10)
    Alpha 冲刺 (6/10)
    团 队 作 业 ———— 随 堂 小 测
    Alpha 冲刺 (5/10)
    Alpha 冲刺 (4/10)
    Beta冲刺博客汇总(麻瓜制造者)
    Beta冲刺(3/5)(麻瓜制造者)
    快速搭建一个Express工程骨架
    个人作业——软件产品案例分析
  • 原文地址:https://www.cnblogs.com/mingerlcm/p/12585451.html
Copyright © 2011-2022 走看看