参考了网上很多人写的安装教程,结果并不好,最后阅读了官方的英文api,才安装成功,这里记录下来,方便以后使用。我的安装环境为腾讯云主机Centos7.3 64bit

gitlab官方api地址点我试试~

  1. 开启HTTP和SSH访问

       yum install -y curl policycoreutils-python openssh-server
    systemctl enable sshd
    systemctl start sshd
    firewall-cmd --permanent --add-service=http
    systemctl reload firewalld
  2. 安装并启用邮件服务

     yum install postfix
    systemctl enable postfix
    systemctl start postfix
  3. 下载并安装gitlab

     #这里我选择的是清华大学的镜像,下载起来比较快一点,我选择的是最新的版本
    #https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/ cd /usr/locale/src/ wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm rpm -ivh gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

安装好之后,会显示gitlab的图案,并提示设置外网访问地址(external_url)

  1. 配置gitlab

     #打开配置文件 gitlab.rb
    [root@VM_177_101_centos gitlab]# vim /etc/gitlab/gitlab.rb #修改外网访问地址 13行
    #ip为主机的ip地址,端口默认是8080,这里为了避免出现占用,也进行修改一下,我的配置为9999
    external_url = 'http://ip:prot' #修改nginx监听
    #gitlab默认使用了nginx进行反向代理,这里我重新配置了一下 579行~580行
    unicorn['listen'] = '127.0.0.1'
    unicorn['port'] = 8082 #重新配置nginx 800行
    nginx['enable'] = true
    nginx['listen_addresses'] = ['*']
    nginx['listen_port'] = 82 #退出并保存
  2. 重新加载配置并重启gitlab

     gitlab-ctl reconfigure
    gitlab-ctl restart
    #出现如下提示说明重启成功
    ok: run: gitaly: (pid 18536) 0s
    ok: run: gitlab-monitor: (pid 18556) 1s
    ok: run: gitlab-workhorse: (pid 18561) 0s
    ok: run: logrotate: (pid 18610) 1s
    ok: run: nginx: (pid 18616) 0s
    ok: run: node-exporter: (pid 18623) 0s
    ok: run: postgres-exporter: (pid 18634) 1s
    ok: run: postgresql: (pid 18660) 0s
    ok: run: prometheus: (pid 18722) 0s
    ok: run: redis: (pid 18732) 0s
    ok: run: redis-exporter: (pid 18737) 0s
    ok: run: sidekiq: (pid 18758) 0s
    ok: run: unicorn: (pid 18767) 1s

6.访问gitlab

    #由于我没有域名,直接绑定的是ip地址
#在浏览器中输入ip:82此时即可访问
#登录后界面如下图所示,看上去是不是非常的棒!
#接下来尽情的去体验属于你的代码服务器吧~~~~

腾讯云Centos安装gitlab的更多相关文章

  1. 腾讯云centos安装python3.6和pip

    不知道腾讯云的centos和阿里云的centos一不一样,反正两个云平台的Ubuntu系统是不一样的,照着同样的教程敲,往往掉坑里. 安装一些centos依赖库: 这一步很关键,很多报错往往都因为少了 ...

  2. 腾讯云Centos安装nginx

    使用的是腾讯云主机,选择的镜像如下: Centos7+ 64bit; nginx 1.7.12 1.安装依赖 yum -y install gcc gcc-c++ wget net-tools pcr ...

  3. 腾讯云CentOS安装JDK1.8

    购买了腾讯云CentOS7系统,尝试搭建一个博客平台,首先要安装JDK. 一开始尝试用本地FTP上传JDK包到服务器,速度太慢,只有10K左右,放弃. 然后决定在服务器直接下载JDK进行安装. 执行 ...

  4. 腾讯云CentOS 安装MediaWiki

    参考 : https://www.digitalocean.com/community/tutorials/how-to-install-mediawiki-on-centos-7 //安装好很多次终 ...

  5. 腾讯云Centos安装jdk8

    1.下载jdk1.8的tar cd /usr/local/src #切换到该目录下 wget url #下载jdk8的tar包 2.下载完成后解压tar包 tar -zxvf jdk-8u152-li ...

  6. 腾讯云CentOS 安装 Hadoop 2.7.3

    1.安装 jdk yum install java 2.安装maven wget http://mirrors.hust.edu.cn/apache/maven/maven-3/3.5.0/binar ...

  7. CentOS 安装 Gitlab

    源地址 https://mirror.tuna.tsinghua.edu.cn/gitlab-ce/ # 清华源 https://mirrors.tuna.tsinghua.edu.cn/help/g ...

  8. CentOS安装gitlab,gerrit,jenkins并配置ci流程

    CentOS安装gitlab,gerrit,jenkins并配置ci流程 By Wenbin juandx@163.com 2016/4/9 这是我参考了网上很多的文档,配置了这三个软件在一个机器上, ...

  9. CentOS安装gitLab服务器

    首先利用gitlab-install-el6.sh安装,比较简单: (出处:http://www.linuxidc.com/Linux/2013-06/85754.htm) 1:如果有条件,提供一台全 ...

随机推荐

  1. NuGet包和功能

    Microsoft.AspNetCore.Razor.Tools:提供TagHelper的智能感知提示和代码加粗高亮显示. Microsoft.AspNetCore.Session:管理会话状态的中间 ...

  2. 【Python】Python3纯代码极简教程

    #!/usr/bin/python3 ''' Python3.6.x简单教程  示例.注释  交互式和脚本式编程  变量类型  数字(Number)  字符串(String)  列表(Li ...

  3. 基于线程开发一个FTP服务器

    一,项目题目:基于线程开发一个FTP服务器 二,项目要求: 基本要求: 1.用户加密认证   2.允许同时多用户登录   3.每个用户有自己的家目录 ,且只能访问自己的家目录   4.对用户进行磁盘配 ...

  4. 区块链--Ubuntu上搭建以太坊私有链

    1.搭建私链所需环境 操作系统:ubuntu16.04,开虚拟机的话要至少4G,否则会影响测试挖矿时的速度 软件: geth客户端 Mist和Ethereum Wallet:https://githu ...

  5. SHELL脚本--简介

    bash&shell系列文章:http://www.cnblogs.com/f-ck-need-u/p/7048359.html 脚本都以#!/bin/bash开头,“#”称为sharp,“! ...

  6. 第一册:lesson7-8.

    原文:Are you a teacher? A:I am a  new student ,my name is A. B:Nice to meet you,my name is B. A:Are yo ...

  7. c# 创建,加载,修改XML文档

    using System.Xml.Linq; static void Main(string[] args) { XDocument xDocument = new XDocument(new XEl ...

  8. [android] 采用post的方式提交数据

    GET:内部实现是组拼Url的方式,http协议规定最大长度4kb,ie浏览器限制1kb POST和GET的区别比较了一下,多了几条信息 Content-Type:application/x-www- ...

  9. 【Tomcat】上线部署tomcat。常用命令

    ps -ef | grep tomcat-web [查询tomact进程]kill -9 pid [结束tomcat进程]/opt/tomcat-web/bin/startup.sh [启动tomca ...

  10. Flask 系列之 SQLAlchemy

    SQLAlchemy 是一种 ORM 框架,通过使用它,可以大大简化我们对数据库的操作,不用再写各种复杂的 sql语句 了. 说明 操作系统:Windows 10 Python 版本:3.7x 虚拟环 ...