1.安装依赖

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

  

2.设置postfix开机自启并启动

$ systemctl enable postfix
$ systemctl start postfix

  

3.下载

$ wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ol/7/gitlab-ce-12.0.3-ce.0.el7.x86_64.rpm/download.rpm

4.解压

$ rpm -i gitlab-ce-12.0.3-ce.0.el7.x86_64.rpm

解压完后会出现如下界面:

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

vim /etc/gitlab/gitlab.rb

6.重置并启动GitLab

$ gitlab-ctl reconfigure

  

7.访问 GitLab页面 http://服务器IP:端口


如果gitlab密码忘记了,可以执行如下步骤:

(1)执行: gitlab-rails console production
[root@localhost gitlab]# gitlab-rails console production
Loading production environment (Rails 4.1.12)
irb(main):001:0>

 

(2)执行: user = User.where(id:1).first
irb(main):001:0> user = User.where(id:1).first
=> #<User id: 1, email: "admin@example.com", encrypted_password: "$2a$10$DMtAMOAM0w9IobSlUm5H3.gprVLzulSsMKyCDkRALBh...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, created_at: "2018-06-14 13:14:23", updated_at: "2018-06-14 13:14:23", name: "Administrator", admin: true, projects_limit: 10000, skype: "", linkedin: "", twitter: "", authentication_token: "QsfSW1J1ffhNgM76AsHb", theme_id: 2, bio: nil, failed_attempts: 0, locked_at: nil, username: "root", can_create_group: true, can_create_team: false, state: "active", color_scheme_id: 1, notification_level: 1, password_expires_at: "2018-06-14 13:14:23", created_by_id: nil, last_credential_check_at: nil, avatar: nil, confirmation_token: "Rca6bsELVxBbGqbgykEn", confirmed_at: "2018-06-14 13:14:23", confirmation_sent_at: "2018-06-14 13:14:23", unconfirmed_email: nil, hide_no_ssh_key: false, website_url: "", notification_email: "admin@example.com", hide_no_password: false, password_automatically_set: false, location: nil, encrypted_otp_secret: nil, encrypted_otp_secret_iv: nil, encrypted_otp_secret_salt: nil, otp_required_for_login: false, otp_backup_codes: nil, public_email: "", dashboard: 0, project_view: 0, consumed_timestep: nil>
irb(main):002:0>

  

(3)执行:user.password='66668888'
irb(main):002:0> user.password='66668888'
=> "66668888"
irb(main):003:0>

  

(4)执行:user.save!
irb(main):003:0> user.save!
=> true
irb(main):004:0>

CentOS7 GitLab 安装的更多相关文章

  1. centos7 部署安装gitlab服务器

    概念: git 是一种版本控制系统,是一个命令,是一种工具 gitlib 是用于实现git功能的开发库 github 是一个基于git实现的在线代码托管仓库,包含一个网站界面,向互联网开放 gitla ...

  2. centos7.3 gitlab 安装配置

    1. 设备环境 硬件配置联想 TS250 E3-1225,16G内存,2X1 TB 软件CentOS-7-x86_64-DVD-1804.iso ,安装时选择桌面版 推荐配置参考:https://do ...

  3. Vmware安装CentOs7+gitlab(二)

    在CentOS系统上安装所需的依赖:ssh,防火墙,postfix(用于邮件通知) ,wget,以下这些命令也会打开系统防火墙中的HTTP和SSH端口访问. 1.安装ssh和python sudo y ...

  4. GitLab在centos7上安装和使用

    git的优点 git是分布式的,svn不是 git分布式本地就可以用,可以随便保存各种历史痕迹,不用担心污染服务器,连不上服务器也能提交代码.查看log. GIT分支和SVN的分支不同 分支在SVN中 ...

  5. CentOS 7 环境下GitLab安装及基本配置

    新实验室要求重新建设GitLab,对于我来讲,是第一次有机会当元老参与实验室的建设.下面分享我自己的实测经验: 1. 安装依赖软件并设置开机启动 yum install curlpolicycoreu ...

  6. gitlab 安装和使用

    正常 团队开发 不可能吧代码托管给 github 或者码云之类的 三方托管机构. 然后  原始的 git 没有图形用户界面. 这时候我们可以选择 gitlab . 安装环境 centos7 1 安装依 ...

  7. CentOS服务器上搭建Gitlab安装步骤、中文汉化详细步骤、日常管理以及异常故障排查

    一, 服务器快速搭建gitlab方法 可以参考gitlab中文社区 的教程centos7安装gitlab:https://www.gitlab.cc/downloads/#centos7centos6 ...

  8. gitlab安装、配置与阿里云产品集成

    https://www.ilanni.com/?p=12819 一.gitlab安装与部署 gitlab的安装可以分为源码安装和通过安装包进行安装,要是按照我以前的写作习惯的话,我也会把源码安装在本文 ...

  9. GitLab 安装和配置

    一.GitLab 简介 GitLab 是一个利用Ruby on Rails 开发的开源版本控制系统,实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私人项目. 它拥有与GitHub类 ...

随机推荐

  1. vsdbg 下载方法 使用下载工具下载后手动安装

    vsdbg国内下载太慢了,这里提供一个使用下载工具下载后,手动安装的处理方法 查看vs build控制台输出: 1>C:\WINDOWS\System32\WindowsPowerShell\v ...

  2. windows 安装gitea

    gitea 地址https://github.com/go-gitea/gitea windows 安装 

  3. maplotlib画柱状图并添加标签

    import json from collections import Counter import matplotlib.pyplot as plt import matplotlib as mpl ...

  4. IP 跟踪

    #coding=utf-8import sysimport os import re import urllibimport subprocess def getlocation(ip): resul ...

  5. 在秉火STM32F429挑战者开发板上移植Huawei LiteOS指南

    昨天在B站上突然看到了一个短视频,是在正点原子的战舰V3开发板上移植华为的Huawei LiteOS操作系统,就是这个视频:看完鸿蒙OS发布会,试用华为的物联网操作系统Lite OS(B站),于是呢, ...

  6. PC端页面适应不同的分辨率的方法

    原文链接:https://www.jianshu.com/p/4850a7b22228 一.根据不同的分辨率,加载不同的CSS样式文件 这个方法的思路是,分别针对800.1280.1440.1600. ...

  7. python 树与二叉树的实现

    1.树的基本概念 1.树的定义 树的定义是递归的,树是一种递归的数据结构. 1)树的根结点没有前驱结点,除根结点之外所有结点有且只有一个前驱结点 2)树中所有结点可以有零个或多个后继结点 2.树的术语 ...

  8. CoreData数据库搭建

    1.首先创建父类吧重用的代码写在里边 #import <Foundation/Foundation.h> #import <CoreData/CoreData.h> @inte ...

  9. [b0017] python 归纳 (三)_类名当参数传入

    # -*- coding: UTF-8 -*- """ 测试传入类名 总结: 似乎python里面的一切东西都可以当参数传入 函数或者方法 ""&qu ...

  10. docker研究-4 docker镜像制作

    这次实验以centos镜像为基础镜像进行相关docker镜像制作. 1. 下载centos镜像 [root@localhost ~]# docker pull centosUsing default ...