安装依赖:
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. Linux内核分析--进程创建,执行,切换

    学号:351 原创作品转载请注明出处本实验来源 https://github.com/mengning/linuxkernel/ 实验要求 从整理上理解进程创建.可执行文件的加载和进程执行进程切换,重 ...

  2. JS 函数参数 及 函数数组

    <script> function a(){ alert("a"); } function b(){ alert("b"); } var arr = ...

  3. 学习poisson.c

    static char help[] = "A structured-grid Poisson problem with DMDA+KSP.\n\n"; #include < ...

  4. ubuntu14/16 安装python3-opencv3_百度经验

    http://jingyan.baidu.com/article/e4511cf348dac52b845eafc8.html

  5. Excel身份证验证,身份证校验公式

    =IF(LEN(Q4)=0,"空",IF(LEN(Q4)=15,"老号",IF(LEN(Q4)<>18,"位数不对",IF(CH ...

  6. 【转】forbids in-class initialization of non-const static member不能在类内初始化非const static成员

    转自:forbids in-class initialization of non-const static member不能在类内初始化非const static成员 今天写程序,出现一个新错误,好 ...

  7. webdriver的三种时间等待( sleep(); implicitly_wait(); WebDriverWait();)

    https://blog.csdn.net/HeatDeath/article/details/71774572 基于<Selenium 2自动化测试实战>的学习笔记(11)—— 设置等待 ...

  8. JAVA 平时作业二

    编写一个 Java 应用程序,统计数组{1,3,4,7,2,1,1,5,2,5,7,2,1,1,3},统 计显示每种数字其出现的次数以及出现最多和最少次数的数字 public class Number ...

  9. SpringMVC云题库错题及答案汇总

    试题分析:D,BeanNameViewResolver:这个视图解析器跟XmlViewResolver基本相同,它是通过把返回的逻辑视图名称去匹配定义好的视图bean对象 @ModelAttribut ...

  10. 初读"Thinking in Java"读书笔记之第三章 --- 操作符

    更简单的打印语句 导入自己编写的静态类库,即可使用print();打印 使用Java操作符 操作符:+,-,*,/,=,==,!=,+=,?:,%等 几乎所有操作符都只能操作"基本类型&qu ...