以root 身份进行登录linux

1.先安装相关依赖:

sudo yum install -y curl policycoreutils-python openssh-server

2.开启SSH
开机自启动
sudo systemctl enable sshd

sudo systemctl start sshd
3.防火墙永久开放http
sudo firewall-cmd --permanent --add-service=http

sudo systemctl reload firewalld
(注释防火墙停止重启:systemctl start/stop/reload firewalld)
4.
安装postfix,设置postfix开机自启,并启动,postfix支持gitlab发信功能
  yum install postfix
   systemctl enable postfix
   systemctl start postfix
下载gitlab:
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
安装(linux内存至少2g官方建议4g内存你配置linux内存的时候): mkdir /usr/local/gitlab
rpm -ivh  gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

修改gitlab配置文件的服务器地址和端口,配置项:external_url,注意端口占用问题以及防火墙开通端口8989:

vi    /etc/gitlab/gitlab.rb

## GitLab URL
##! URL on which GitLab will be reachable.
##! For more details on configuring external_url see:
##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
external_url 'http://192.168.81.129:8989'

永久开放端口8989:

firewall-cmd --permanent --add-port=8989/tcp

重启防火墙,运行命令:
firewall-cmd --reload

查看端口号是否开启,运行命令:
firewall-cmd --query-port=8989/tcp

重新启动gitlab配置文件

gitlab-ctl reconfigure
gitlab-ctl restart

以上两个完成现实分别如下:

Running handlers:
Running handlers complete
Chef Client finished, 362/515 resources updated in 04 minutes 18 seconds
gitlab Reconfigured!

[root@hostuser gitlab]# gitlab-ctl restart
ok: run: gitaly: (pid 26240) 1s
ok: run: gitlab-monitor: (pid 26261) 0s
ok: run: gitlab-workhorse: (pid 26264) 1s
ok: run: logrotate: (pid 26314) 0s
ok: run: nginx: (pid 26322) 1s
ok: run: node-exporter: (pid 26334) 0s
ok: run: postgres-exporter: (pid 26341) 0s
ok: run: postgresql: (pid 26350) 0s
ok: run: prometheus: (pid 26359) 0s
ok: run: redis: (pid 26375) 1s
ok: run: redis-exporter: (pid 26379) 0s
ok: run: sidekiq: (pid 26387) 0s
ok: run: unicorn: (pid 26397) 0s

进入页面地址栏点击你设置的ip:8989

密码至少8位 adminadmin建议

默认用户名root ,输入密码adminadmin

linux 搭建gitlab server的更多相关文章

  1. Linux 搭建SVN server

    一. SVN 简单介绍 Subversion(SVN) 是一个开源的版本号控制系統, 也就是说 Subversion 管理着随时间改变的数据. 这些数据放置在一个中央资料档案库 (repository ...

  2. (总结)CentOS Linux搭建SVN Server配置详解

         PS:虽然在公司linux服务器上搭建过几次svn,但是时间长了,有些配置操作会忘掉,上网搜索的结果都不大满意,有幸在前几天看到一篇算是最满意的svn搭建文章,转载一下以备以后使用,原文地址 ...

  3. linux搭建GitLab

    GitLab CentOS6 1. 安装VMware和CentOS 2. 安装必备Linux插件 3. 准备安装GitLab 4. 开始安装GitLab 5. 配置GitLab 6. 启动GitLab ...

  4. linux搭建zabbix server

    一.linux配置jdk 1.安装rpm包,安装完成位置:/usr/java/jdk1.8.0_152 2.配置环境变量/etc/profile: JAVA_HOME=/usr/java/jdk1.. ...

  5. linux 搭建https server (apache)

    一.  安装准备 1.    安装Openssl  要使Apache支持SSL,须要首先安装Openssl支持.这里使用的是openssl-0.9.8k.tar.gz    下载Openssl:htt ...

  6. Linux:搭建GitLab

    0.写在前面 GitLab官方明确要求最低配置2核4G,如果配置过低,会出现502错误. 1.安装SSH #安装ssh sudo yum install -y curl policycoreutils ...

  7. Linux搭建Gitlab(Docker版)

    1.拉取gitlab的docker镜像 #这里使用gitlab的社区版 docker pull gitlab/gitlab-ce 2.启动gitlab容器实例 docker run -d  -p 44 ...

  8. Linux搭建SQL server服务器

    我们知道在Linux下安装服务有很多方式,最为简单的也就是yum安装,但是很多服务通过yum是无法安装的,如果想使用yum安装,需要指定yum安装仓库,我们今天需要安装MSQL Server,所以需要 ...

  9. 【Linux】Ubuntu13.10搭建gitlab报错信息及解决

    error: Gitlab "bundler: command not found: unicorn_rails"soluton: cd /home/git/gitlab git ...

随机推荐

  1. Go 语言并发笔记

    前言: 本文是学习<<go语言程序设计>> -- 清华大学出版社(王鹏 编著) 的2014年1月第一版 做的一些笔记 , 如有侵权, 请告知笔者, 将在24小时内删除, 转载请 ...

  2. mysql-day01

    Microsoft Windows [版本 10.0.17134.648](c) 2018 Microsoft Corporation.保留所有权利. C:\Users\lijun>java用法 ...

  3. Qt资源整理ING

    QCustomPlot:图表库,开源, 链接地址http://www.qcustomplot.com/index.php/download 一些Qt的开发库:http://qt-project.org ...

  4. Javascirpt 常见的误区

    var foo = new Object(); var bar = new Object(); var map = new Object(); map[foo] = "foo"; ...

  5. Ubuntu 安装 Memcached

    直接使用命令 sudo apt-get install Memcached 进行安装 安装完, 默认只能本地连接,需要修改一下配制文件,打开 /etc/Memcached.conf 文件, 找到一个 ...

  6. 学习做爬虫-vs2017

    最近新装了vs2017,安装过程发生了很大的变化,操作变的更加容易了. 下载vs安装程序进行安装.更新界面如图所示,我选择了安装免费个人版(这个是已安装的更新界面,和安装界面差不多) 如图所示,这样的 ...

  7. 只是误以为导入了maven依赖

    背景: 之前用Spring Boot 开发了一个小项目,考虑将代码迁到Git服务器,由于之前没用过Git,在将代码正式签入Git服务器前, 我想先签入一个最简单的Spring Boot程序代码作为试验 ...

  8. table.insert(tableName, v)

    self.teammateList = {} for i=1,3 do local teammate = UI.CreateLuaWidget("Widget_TeammateInfo&qu ...

  9. Windows server 2008 R2安装MySQL 32位ODBC驱动!

    在Windows server 2008 R2安装MySQL 32位ODBC驱动,总是提示错误,我安装了DOTNET4的库,同时安装了VC2008.VC2012.VC2013的支持库,怎么还不行呢?M ...

  10. GPU大百科全书 第一章:美女 方程与几何

    沉鱼落雁   前言:当你酣战在星际2的时候,或者当你在艾泽拉斯游历的时候,你有没有想过,眼前的这些绚丽的画面究竟是怎么来的呢?也许对大多数人来说,GPU对于图形的处理过程并不是那么重要,但总会有些人, ...