zoukankan      html  css  js  c++  java
  • centos7 安装gitlab

    1、CentOS上,以下命令也将在系统防火墙中打开HTTP和SSH访问。

    sudo yum install curl policycoreutils openssh-server openssh-clients -y
    sudo systemctl enable sshd
    sudo systemctl start sshd
    sudo yum install postfix
    sudo systemctl enable postfix
    sudo systemctl start postfix
    sudo firewall-cmd --permanent --add-service=http
    sudo systemctl reload firewalld
    

    2、在 https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/找到需要的版本 下载  使用rpm安装

    curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-XXX.rpm/download
    rpm -i gitlab-ce-XXX.rpm
    

    3、配置并启动GitLab

    sudo gitlab-ctl reconfigure


    修改root账号密码方法
    官方修改密码:(http://docs.gitlab.com/ce/security/reset_root_password.html
    root用户下执行
    gitlab-rails console production

    [root@svr34 bin]# gitlab-rails console production
    Loading production environment (Rails 4.2.5.2)
    irb(main):001:0> user = User.where(id: 1).first
    => #<User id: 1, email: "admin@example.com", ...
    irb(main):002:0> user.password=12345678
    => 12345678
    irb(main):003:0> user.password_confirmation=12345678
    => 12345678
    irb(main):004:0> user.save!
    => true
    irb(main):005:0> quit
    

      



     


  • 相关阅读:
    Linux vi/vim
    Linux 磁盘管理
    Linux 用户和用户组管理
    Linux 文件与目录管理
    Linux 文件基本属性
    Linux 远程登录
    Linux 忘记密码解决方法
    Linux 系统目录结构
    Linux 系统启动过程
    linux -- su和sudo命令的区别
  • 原文地址:https://www.cnblogs.com/bara/p/7279781.html
Copyright © 2011-2022 走看看