_winds 发表于 2018-9-19 10:01:41

GitLab 安装;

  一;
  GitLab 是一个用于仓库管理系统的开源项目。
  使用Git作为代码管理工具,并在此基础上搭建起来的web服务。
  应用特点编辑
  1. Web框架使用Ruby on Rails
  二;
  1、设置yum源安装
  GitLab (清华大学 Gitlab Community Edition 镜像使用)
  https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/
  # vi /etc/yum.repos.d/gitlab-ce.repo
  
  name=gitlab-ce
  baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
  repo_gpgcheck=0
  gpgcheck=0
  enabled=1
  gpgkey=https://packages.gitlab.com/gpg.key
  # 再执行
  # sudo yum makecache
  # sudo yum install gitlab-ce -y
  2、或者直接下载安装;
  # wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-8.8.0-ce.0.el6.x86_64.rpm
  # rpm -i gitlab-ce-XXX.rpm
  3、插件服务;
  如想使用Postfix来发送邮件,在安装期间请选择'Internet Site'; 您也可以用sendmai或者 配置SMTP服务 并 使用SMTP发送邮件;
  在 Centos 6 和 7 系统上, 下面的命令将在系统防火墙里面开放HTTP和SSH端口。
  # sudo yum install curl openssh-server openssh-clients postfix cronie
  4、启动安装更新 GitLab
  # sudo gitlab-ctl reconfigure

  # sudo gitlab-ctl status
  # 查看安装后的程序运行情况;

  启动:
  # 启动Gitlab所有组件
  gitlab-ctl start
  # 停止Gitlab所有组件
  gitlab-ctl stop
  # 重启Gitlab所有组件
  gitlab-ctl restart
  Note 单核的服务器重启Unicorn和Sidekiq会多需要点时间。 在Unicorn重启完成之前GitLab会报502错误, 如一直是502错误就需要查看logs来定位错误原因了。
  gitlab-ctl也可以单独对GitLab的组件进行重启、停止和启动的操作:
  gitlab-ctl restart sidekiq
  5、访问;
  http://IP

  新用户登录提示设置密码先;然后创建user进行登陆;
  卸载:
  # yum remove gitlab-ctl -y
  注:(此为64位系统,如果执行失败,请root用户操作/root/目录下执行,安装位置/etc/gitlab/)
  官方文档:
  https://www.gitlab.cc/downloads/#centos6
  中文文档:
  https://doc.gitlab.cc/omnibus/maintenance/README.html#starting-and-stopping

页: [1]
查看完整版本: GitLab 安装;