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

systemctl enable sshd
systemctl start sshd
systemctl enable postfix
[root@xuegod63 ~]#systemctl start postfix
[root@xuegod63 ~]# iptables -F #清空规则
[root@xuegod63 ~]# systemctl stop firewalld
[root@xuegod63 ~]# systemctl disable firewalld

[root@xuegod63 ~]#firewall-cmd --permanent --add-service=http
[root@xuegod63 ~]#systemctl reload firewalld

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.2.3-ce.0.el7.x86_64.rpm

rpm -ivh gitlab-ce-10.2.3-ce.0.el7.x86_64.rpm

vim /etc/gitlab/gitlab.rb

改:13 external_url 'http://gitlab.example.com'
为:13 external_url 'http://192.168.100.106'

gitlab-ctl reconfigure #开始配置

gitlab-ctl status #查看状态

netstat -antup | grep :80

注:如果后期 web 界面访问时,总报 502,要把防火墙清空规则,

另外内存要大于 4G,然后内存不足,报 404(也不一定,我本次测试是3g内存,可以启动程序)

free -m

http://192.168.100.106/users/sign_in

wang1990... #设置密码 账号为root 太简单会报错

http://192.168.100.106/ 登陆地址
root
wang1990...

14.2.4 管理 gitlab
关闭 gitlab: # gitlab-ctl stop
启劢 gitlab: # gitlab-ctl start
重启 gitlab: # gitlab-ctl restart

gitlab 主配置文件:/etc/gitlab/gitlab.rb

日志:/var/log/gitlab/
服务地址:/var/opt/gitlab/
仓库地址:/var/opt/gitlab/git-data
重置服务:gitlab-ctl reconfigure

汉化
[root@localhost ~]# yum install git -y

git clone https://gitlab.com/xhang/gitlab.git #汉化

gitlab-ctl stop

cd /root/gitlab

git diff v10.2.3 v10.2.3-zh > ../10.2.3-zh.diff
yum -y install patch
patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < /root/10.2.3-zh.diff

gitlab-ctl restart

等 1 分钟,再去访问 web 页面。访问太快会显示 502 错误

一、新建项目
二、创建用户
三、重置用户密码(首次登录时,用你设置的用户,它会强制让你更改密码)
zsl3
guochao88!
四、初除用户

客户端下载git克隆文件(web页面,可以编辑项目与代码,但是,上传与下载 还是需要客户端用户,安装git)
# yum install git -y
# git clone zsl3@192.168.100.106:zsl/zsl-web.git #下载地址,可以从这

git clone http://192.168.100.106/zsl/zsl-web.git

Username for 'http://192.168.100.106': zsl3 #输入 gitlab 的帐号
Password for 'http://zsl3@192.168.100.106': guochao88! #输入密码

ls zsl-web/ -a

后台重置root密码

[root@MyCloudServer ~]# gitlab-rails console production
Loading production environment (Rails 4.2.8)
irb(main):001:0> user = User.where(id: 1).first
=> #<User id:1 @root>
irb(main):002:0> user.password="12345678"
=> "12345678"
irb(main):003:0> user.password_confirmation="12345678"
=> "12345678"
irb(main):004:0> user.save!
Enqueued ActionMailer::DeliveryJob (Job ID: f3a3949c-5eeb-4d87-a1f5-8221ae6caeaa) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", gid://gitlab/User/1
=> true
irb(main):005:0> quit

克隆报错处理 如果还是不行多半是输入错误

$ git clone http://172.87.221.196/root/zsl.git
Cloning into 'zsl'...
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'http://172.87.221.196/root/zsl.git/'

zsl@DESKTOP-2L25L8R MINGW64 /e/gi
$ git config --system --unset credential.helper #重置连接

$ git clone http://172.87.221.196/root/zsl.git #重新克隆

记住密码和默认分支

[branch "master"]
remote = origin
merge = refs/heads/master
[credential]
helper = store

gitlab的搭建与使用(一)的更多相关文章

  1. gitlab服务器搭建教程

    gitlab服务器搭建教程 ----2016年终总结 三 参考https://bbs.gitlab.cc/topic/35/gitlab-ce-8-7-%E6%BA%90%E7%A0%81%E5%AE ...

  2. CentOS7下gitlab的搭建

    gitlab的搭建 安装基础包 yum -y install curl policycoreutils openssh-server openssh-clients 启动sshd systemctl ...

  3. ubuntu gitlab服务器搭建

    gitlab服务器搭建 1.安装依赖包 sudo apt-get install curl openssh-server ca-certificates postfix 执行完成后,出现邮件配置,选择 ...

  4. 基于GitLab CI搭建Golang自动构建环境

    基于GitLab CI搭建Golang自动构建环境 Golang发布遇到的问题 对于golang的发布,之前一直没有一套规范的发布流程,来看看之前发布流程: 方案一 开发者本地环境需要将环境变量文件改 ...

  5. 基于【 centos7】五 || GitLab环境搭建

    一.基于Docker部署GitLab环境搭建 1.下载镜像 docker pull beginor/gitlab-ce:11.0.1-ce.0 2.创建GitLab 的配置 (etc) . 日志 (l ...

  6. gitlab的搭建与汉化

    gitlab的搭建:内存最好2G以上 yum -y install curl unzip policycoreutils git wget         安装相关依赖包 所有gitlab rpm包的 ...

  7. Docker DevOps实战:GitLab+Jenkins(1)- GitLab容器搭建、使用SourceTree pull/push项目

    GitLab容器搭建 # 创建GitLab容器# --restart always #重启,容器自动重启# --privileged=true #容器内使用root权限 [root@localhost ...

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

    gitlab环境搭建,卸载,汉化--汉化篇 注意gitlab的版本需和汉化版本一致 安装git yum install -y git 下载最新的汉化包 cd git clone https://git ...

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

    gitlab环境搭建,卸载,汉化 --卸载篇 完全卸载 停止gitlab gitlab-ctl stop 卸载gitlab rpm -e gitlab-ce 查看gitlab进程  ps aux | ...

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

    gitlab环境搭建,卸载,汉化 --搭建篇 环境搭建 安装依赖软件 yum -y install policycoreutils openssh-server openssh-clients pos ...

随机推荐

  1. 利用数据库管理工具(Navicat)导出数据到Excel表中

    如果只是想把数据库表中数据简单导出来,可以利用数据库管理工具中的工具 1.先查询 2.在查询出结果中全选 3.导出向导 4.选择Excel 5.选择导出地址并命名

  2. 题解【POJ2955】Brackets

    Description We give the following inductive definition of a "regular brackets" sequence: t ...

  3. Docker - 命令 - docker image

    概述 docker 客户端操控 镜像 1. 分类 概述 1 简单对 命令 做一些分类 分类 查看 ls inspect history 与 dockerhub 交互 pull push 导出 & ...

  4. Atcoder Beginner Contest 147C(状态压缩)

    最多15个人,用N个二进制的数字表示每个人的状态,然后检验.这串数字相当于已经把这些人的状态定了下来,如果和输入的情况不符则这串数字不正确,直接忽略,因为枚举了所有的情况,所以总有正确的,不必在错误的 ...

  5. C语言实例——判断是否为闰年

    实例要求从键盘输入任意年份的整数 N,通过程序运行判断该年份是否为闰年. 算法思想 判断任意年份是否为闰年,需要满足以下条件中的任意一个:① 该年份能被 4 整除同时不能被 100 整除:② 该年份能 ...

  6. 搭建分布式hadoop环境的前期准备---需要检查的几个点

    前期准备: jdkhostnamehostsdate安全机制firewallwindows 域名映射 具体的操作见下面 1.看看自己是否已经配置了别名了(linux别名的配置可以参考博文:自己cent ...

  7. 中国大学MOOC 邮箱验证的问题

    在使用 中国大学 MOOC 过程中,在PC端修改个人资料时,其中有项“常用邮箱”,于是写了QQ邮箱,结果发现一直无法验证,连邮件都无法收到. 经过多番尝试,重新使用邮箱注册的方式注册账号,然后注册成功 ...

  8. BZOJ-1563-郁闷的出纳员(权值线段树)

    偏移量要考虑清楚. #include <bits/stdc++.h> using namespace std; const int N=4e5+10; const int BASE=1e5 ...

  9. AMD R7 2700X 安装虚拟机

    自己组装的台式机,选用的是微星X470主板,该主板默认的虚拟化技术是关闭的,在bios中也不太容易找到,具体方法如下. [开机或重启]--[按住DEL进入BIOS]--[高级模式F7]--[选择OC] ...

  10. 【Struts 动态表单】DynaActionForm

    RegisterAction package k.action; import org.apache.struts.action.ActionForm; import org.apache.strut ...