安装依赖:
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. JAVA语言之怎样写出高性能的Java代码?

    本文主要向大家介绍了JAVA语言之怎样写出高性能的 Java 代码?通过具体的内容向大家展示,希望对大家学习JAVA语言有所帮助. 在这篇文章中,我们将讨论几个有助于提升Java应用程序性能的方法.我 ...

  2. Flex 弹性盒基本语法

    网页布局(layout)是 CSS 的一个重点应用. 布局的传统解决方案,基于盒状模型,依赖 display 属性 + position属性 + float属性.它对于那些特殊布局非常不方便,比如,垂 ...

  3. FTP软件FileZilla 3.38.1下载

    FTP软件FileZilla 3.38.1下载 filezilla软件简介 FileZilla是一个免费开源的FTP软件,分为客户端版本和服务器版本,具备所有的FTP软件功能,具备极好的可控性及条理性 ...

  4. php中微信开发的转发分享

    简单来说  ,一共四步 1.  微信公众平台中公众号设置”的“功能设置”里填写“JS接口安全域名”.该域名填写你的项目的域名. 2. 下载jssdk的damo,https://mp.weixin.qq ...

  5. dede后台登陆不了、出现index.htm Not Found!、无更新模板,解析不了

    以下2个选项内设为空.  

  6. Java作业:第四次过程性考核 ——长春职业技术学院 16级网络工程

    Java作业:第四次过程性考核 码云链接:https://gitee.com/SoridoD/java_kaohe4    (时间匆忙没打注释,真有急事) (客户端和服务器会自动创建表,所以没有sql ...

  7. 工作VUE布局记录

    以这个页面为例子   这个是你的布局有多少行,这个页面有两行,这里是2       这里span是占用多少格(一共24格)offset左右偏移,这个基本上用不到row是表示这个控件在第几行,如果是在第 ...

  8. webpack 大概

    entry output loader: rules: [ {test:匹配文件格式,  use: 使用的loader}, {test:匹配文件格式,  use: 使用的loader}, ...//l ...

  9. JDBC学习DayTwo

    一.利用反射及JDBC元数据编写通用的查询方法 1.ResultSetMetaData 定义:描述ResultSet的元数据对象,即从中可以获取到结果集中有多少列.列名是什么. 获取 ResultSe ...

  10. Python 函数的描述

    函数 函数是带名字的代码块,用于完成具体的工作. 要执行函数定义的特定任务,可调用该函数.需要在程序中多次执行同一项任务时,你无需反复编写完成该任务的代码,而只需调用执行该任务的函数,让Python运 ...