GitLab使用小结

一 GitLab报502错误

这个把vm赋给centos的设成4+30就可以,另外再加入Swap交换,加入虚存。一个gitlab在linux中运行的时候,运存是3.5G,占用硬件资源有17G,如果按照默认的1+20配,卡出502很正常

二 在IDEA中加入Gitlab Programs插件

直接IDEA里装就行

三 GitLab常用命令

1、gitlab-ctl help  # 命令帮助
2、gitlab-ctl reconfigure # 重新配置
3、gitlab-ctl show-config # 显示配置
4、gitlab-ctl uninstall # 卸载
5、gitlab-ctl kill # 杀服务
6、gitlab-ctl restart # 重启服务
7、gitlab-ctl service-list # 服务清单
8、gitlab-ctl start # 启动服务
9、gitlab-ctl status # 查看状态
10、gitlab-ctl stop # 停止服务
11、gitlab-ctl tail # 查看所有启动服务的服务日志

四 配置时的history

1  vi /etc/ssh/sshd_config
    2  cd /etc
    3  cd /sysconfig/network-scripts
    4  cd /sysconfig
    5  cd sysconfig
    6  cd network-scripts
    7  ls
    8  vi ifcfg-ens33
    9  systemctl restart network
   10  ping www.baidu.com
   11  service ssh restart
   12  /etc/init.d/ssh restart
   13  shutdown -r now
   14  sudo rpm -ivh /home/centos01/New Folder/gitlab-ce-15.7.0-ce.0.el7.x86_64.rpm
   15  sudo rpm -ivh /home/centos01/test1/gitlab-ce-15.7.0-ce.0.el7.x86_64.rpm
   16  sudo yum install -y curl policycoreutils-python openssh-server perl
   17  sudo systemctl enable sshd
   18  sudo systemctl start sshd
   19  sudo firewall-cmd --permanent --add-service=http
   20  sudo firewall-cmd --permanent --add-service=https
   21  sudo systemctl reload firewalld
   22  sudo systemctl stop firewalld
   23  curl -fsSL https://packages.gitlab.cn/repository/raw/scripts/setup.sh | /bin/bash
   24  sudo EXTERNAL_URL="https://192.168.80.100" yum install -y gitlab-ce
   25  sudo gitlab-ctl reconfigure
   26  gitlab-ctl start
   27  execute[/opt/gitlab/bin/gitlab-ctl start redis-exporter] action run
   28  gitlab-ctl tail
   29  netstat -tnlp | grep
   30  gitlab-ctl restart
   31  vi /etc/gitlab/gitlab.rb
   32  yum vim
   33  yum -vim
   34  rpm -qa|grep vim
   35  vim  /etc/gitlab
   36  cd /etc/gitlab
   37  vim gitlab.rb
   38  top
   39  free -h
   40  dd if=/dev/zero of=/root/swap bs=1M count=2048
   41  mkswap /root/swap
   42  swapon /root/swap
   43  chmod 600 /root/swap
   44  free -h
   45  history

五 运行效果

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

「已注销」

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值