基于CentOS7.x gitlab环境搭建,卸载,汉化

时间:2021-02-03 10:36:52   收藏:0   阅读:0

gitlab环境搭建,卸载,汉化 --搭建篇

环境搭建

  1. 安装依赖软件

    yum -y install policycoreutils openssh-server openssh-clients postfix

  2. 设置postfix开机自启,并启动,postfix支持gitlab发信功能 

    systemctl enable postfix && systemctl start postfix

  3. 下载gitlab安装包,然后安装  

    - 10.0.x版本需要大于4G内存,否则报502(解决办法创建4G的swap,并且赋600权限)
    wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.4-ce.0.el7.x86_64.rpm
    rpm -i gitlab-ce-10.0.4-ce.0.el7.x86_64.rpm
    chmod -R 755 /var/log/gitlab

    - 8.x版本直接安装
    wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-8.0.0-ce.0.el7.x86_64.rpm
    rpm -i gitlab-ce-8.0.0-ce.0.el7.x86_64.rpm

  4. 修改gitlab配置文件指定服务器ip和自定义端口

      vim /etc/gitlab/gitlab.rb

  1. 重置并启动GitLab
  2. 查看gitlab版本  

    head -1 /opt/gitlab/version-manifest.txt

  3. 设置、重置root密码(下面代码一行一行执行,初始化123456789密码) 

    cd /opt/gitlab/bin
    gitlab-rails console production
    user=User.where(id:1).first
    user.password=123456789
    user.password_confirmation=123456789
    user.save!
    exit

 

 

 

 

 

 

 

 

 

 

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!