安装依赖:
sudo yum install curl openssh-server openssh-clients postfix cronie
sudo service postfix start
sudo chkconfig postfix on

yum install lokkit
sudo lokkit -s http -s ssh

安装gitlab的过程 启动postfix服务 enable成功,start失败
问题出现在网络设置,ipv6网段,
vim /etc/hosts //注释掉下面一行
#::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

添加GitLab仓库,并安装到服务器上:
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

yum install policycoreutils-python  //下载镜像比较慢,可以FQ去下载然后上传至服务器,使用rpm -ivh 来解压
sudo yum install gitlab-ce
自动配置并初始化 gitlab:
sudo gitlab-ctl reconfigure

确保开放8080端口 gitlab默认端口是8080

重新加载gitlab配置:sudo gitlab-ctl reconfigure

以下是默认用户名密码,首次登陆会提示你修改密码:

Username: root
Password:5iveL!fe

gitlab 常用命令:
gitlab-ctl start
gitlab-ctl stop
gitlab-ctl status
gitlab-ctl restart

Gitlab 默认的日志文件存放在/var/log/gitlab 目录下:
gitlab-ctl tail #查看所有日志
gitlab-ctl tail nginx/gitlab_access.log #查看nginx访问日志

firewalld的基本使用:
启动: systemctl start firewalld
关闭: systemctl stop firewalld
查看状态: systemctl status firewalld
开机禁用 : systemctl disable firewalld
开机启用 : systemctl enable firewalld

访问服务器需要关闭防火墙:

systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体。
启动一个服务:systemctl start firewalld.service
关闭一个服务:systemctl stop firewalld.service
重启一个服务:systemctl restart firewalld.service
显示一个服务的状态:systemctl status firewalld.service
在开机时启用一个服务:systemctl enable firewalld.service
在开机时禁用一个服务:systemctl disable firewalld.service
查看服务是否开机启动:systemctl is-enabled firewalld.service
查看已启动的服务列表:systemctl list-unit-files|grep enabled
查看启动失败的服务列表:systemctl --failed

配置firewalld-cmd

查看版本: firewall-cmd --version
查看帮助: firewall-cmd --help
显示状态: firewall-cmd --state
查看所有打开的端口: firewall-cmd --zone=public --list-ports
更新防火墙规则: firewall-cmd --reload
查看区域信息: firewall-cmd --get-active-zones
查看指定接口所属区域: firewall-cmd --get-zone-of-interface=eth0
拒绝所有包:firewall-cmd --panic-on
取消拒绝状态: firewall-cmd --panic-off
查看是否拒绝: firewall-cmd --query-panic

那怎么开启一个端口:
添加
firewall-cmd --zone=public --add-port=80/tcp --permanent (--permanent永久生效,没有此参数重启后失效)
重新载入
firewall-cmd --reload
查看
firewall-cmd --zone= public --query-port=80/tcp
删除
firewall-cmd --zone= public --remove-port=80/tcp --permanent

Centos中安装gitlab的更多相关文章

  1. 1、CentOS 6 安装GitLab

    1.安装和配置必需的依赖项 在CentOS上将系统防火墙打开HTTP和SSH访问. sudo yum install -y curl policycoreutils-python openssh-se ...

  2. 在centos中安装jenkins master测试环境

    在centos中安装jenkins   1)安装目录 pwd (/home/AAA)   2)检查java是否安装 [AAA@Centos_AAA jenkins]$ java -version  j ...

  3. centos中安装chromium和flash

    安装环境:centos 6.5 64位 在centos中安装chromium 安装Google源 cd /etc/yum.repos.d/ sudo wget http://people.CentOS ...

  4. Centos中安装Sublime编辑器

    Centos中安装Sublime编辑器 1.从官网下载相应操作系统的下的安装包(http://www.sublimetext.com/2),这里下的是linux下的安装包 2.解压安装包,并将其放在/ ...

  5. centos中安装tomcat6

    在centos中安装tomcat6   1)通过yum自动安装tomcat和dependences root@Centos_AAA ~]# yum install tomcat6 [root@Cent ...

  6. 在Centos中安装HustOJ实验记录

    hustoj是目前使用最广泛的刷题平台,自建平台是编程教学中重要一环,教,学,测,反思形成闭合回路.目前利用现有的服务器资源,建成了开高开源code中心,一个刷题系统,六月再建一个私有云,私有云不仅是 ...

  7. centos中安装tomcat

    1.先保证centos中安装了jre的环境. 2.上传tomcat的压缩包到root根目录. 3.切换到根目录 输入命令cd ~ , 然后 ll , 查看上传情况: 4.选中复制压缩文件,输入解压命令 ...

  8. Docker学习笔记之-在CentOS中安装Docker

    上一节演示了如何 通过Xshell连接CentOS服务,链接:Docker学习笔记之-通过Xshell连接 CentOS服务 本节将演示 如何在CentOS中安装 Docker 第一步:更新系统包到最 ...

  9. CentOS下安装Gitlab

    环境 Requirements 软件 版本 CentOS 6.6 Python 2.6 Ruby 2.1.5 Git 1.7.10+ Redis 2.0+ MySQL   GitLab 7-8-sta ...

随机推荐

  1. AI 帮助涂鸦

    这个小工具挺有意思,可以在涂鸦的同时自动猜测你要画什么,并自动完成. https://quickdraw.withgoogle.com/

  2. 常用正则表达式 c#

    /// <summary> /// 是否手机号 /// </summary> /// <param name="str"></param& ...

  3. 2ci

  4. const修饰指针+volatile +restrict

    const这块的难点 const修饰指针有以下的几种形式 ,不同的形式 它的意义不一样. 形式1: int a=23: const int *p=&a: a是int型,&a是int * ...

  5. CrashHandler

    CrashHandler 全局Crash捕获处理

  6. jQuery 的自定义事件

    jQuery  中,想要自动触发自定义事件,必须满足2个条件: 1.事件必须是通过on 来绑定的. 2.事件必须是通过trigger / triggerHandler 来触发. 格式如下: $(fun ...

  7. require和load的不同之处

    require和load最大的不同之处在于,require就算调用多次也不会重新加载已经加载过的文件.Ruby会持续追踪已经被请求的那些文件而不会重复加载它们.而load命令总是会加载所请求的命令,不 ...

  8. Codeforces Round #162 (Div. 1) B. Good Sequences (dp+分解素数)

    题目:http://codeforces.com/problemset/problem/264/B 题意:给你一个递增序列,然后找出满足两点要求的最长子序列 第一点是a[i]>a[i-1] 第二 ...

  9. css实现标题左右横线

    最近用到了记录一下 页面 <div class="subtitle"> 马上邀请好友得奖励 </div> 样式 .subtitle { position: ...

  10. `TypeError: torch.mm received an invalid combination of arguments - got (torch.FloatTensor, Variable),

    `TypeError: torch.mm received an invalid combination of arguments - got (torch.FloatTensor, Variable ...