gitlab安装与配置(Centos6.8)
0、Centos7请参照官方文档
https://about.gitlab.com/installation/#centos-7
1. Install and configure the necessary dependencies
下面命令可在gitlab官网找到,【Select an operating system...】选择不同的系统即可查看。
sudo yum install curl openssh-server openssh-clients postfix cronie # 先修改下面的配置文件再执行启动命令
sudo service postfix start
sudo chkconfig postfix on # 若不执行安装有可能遇到这个错误【lokkit: command not found 】
yum -y install lokkit
sudo lokkit -s http -s ssh
这里安装了postfix,我自行配置了postfix。
vim /etc/postfix/main.cf
myhostname = sample.test.com ← 设置系统的主机名 mydomain = test.com ← 设置域名(我们将让此处设置将成为E-mail地址“@”后面的部分) myorigin = $mydomain ← 将发信地址“@”后面的部分设置为域名(非系统主机名) inet_interfaces = all ← 接受来自所有网络的请求 mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain ← 指定发给本地邮件的域名 home_mailbox = Maildir/ ← 指定用户邮箱目录
然后测试邮件
echo "Mail Content" | mail -s "Mail Subject" xxxx@xxx.com
若出现【-bash: mail: command not found】执行如下命令:
yum -y install mailx
Note:if you see below warings after you run above command.
send-mail: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol
send-mail: warning: inet_protocols: configuring for IPv4 support only
postdrop: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol
postdrop: warning: inet_protocols: configuring for IPv4 support only
that means you don't have IPv6 configured in your OS's network stack, but your mailer (presumably postfix) is configured to use IPv6. Since there is no IPv6 for your mailer to use, it's warning you that it's only going to use IPv4.
To disable the waring messsage, Go to /etc/postfix/main.cf and change from:
inet_protocols = all
to:
inet_protocols = ipv4
This will only use ipv4 and the warning message will go away.
You will have to issue a stop and start for postfix to register the change.
service postfix restart
查看log,确认邮件发送状态
Postfix邮件的log位置是:/var/log/maillog
发送成功的话,会返回250和OK,也可以去自己的邮件客户端查收。
一切OK的话,那Postfix mail service应该就搭建成功了。
查看邮件队列
postqueue -p
2. Add the GitLab package server and install the package
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce
这里因为网络院线可能会出现下载失败,我尝试了两次后成功了。
3. Configure and start GitLab
sudo gitlab-ctl reconfigure
troubleshooting:
【Error executing action `run` on resource 'execute[semodule -i /opt/gitlab/embedded/selinux/rhel/7/g】
yum install libsemanage-static libsemanage-devel
解决Gitlab的Gravatar头像无法显示的问题
vim /etc/gitlab/gitlab.rb
#把下面这一行的注释去掉即可
gitlab_rails['gravatar_plain_url'] = 'http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon'
编辑完gitlab.rb文件后要执行sudo gitlab-ctl reconfigure
解决邮件中URL指向问题
vim /etc/gitlab/gitlab.rb
#将localhost修改为你对应的iP或者域名
external_url 'http://101.101.101.80'
同上,编辑完gitlab.rb文件后要执行sudo gitlab-ctl reconfigure
希望以上笔记能帮助你理解gitlab的官方文档。
技术交流群:576269252
--------------------------------------
声明: 原创文章,未经允许,禁止转载!
--------------------------------------
gitlab安装与配置(Centos6.8)的更多相关文章
- GitLab 安装和配置
一.GitLab 简介 GitLab 是一个利用Ruby on Rails 开发的开源版本控制系统,实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私人项目. 它拥有与GitHub类 ...
- gitlab 安装、配置
gitlab 安装.配置 对于企业级的私有 git 仓库,gitlab 是个不错的选择. 今天就来说说 gitlab 的安装.配置. 系统配置建议:最低双核 4G 内存. 当前针对 gitlab 版本 ...
- jenkins安装及配置-centos6.9
Jenkins安装及配置 目录 1.安装java. 2 1.1安装说明... 2 1.2创建java目录... 2 1.3下载并解压... 2 1.4设置环境变量... 2 1.5验证JDK有效性.. ...
- gitlab安装、配置与阿里云产品集成
https://www.ilanni.com/?p=12819 一.gitlab安装与部署 gitlab的安装可以分为源码安装和通过安装包进行安装,要是按照我以前的写作习惯的话,我也会把源码安装在本文 ...
- GitLab 安装,配置及维护
参考: GitLab 官方文档 docker-gitlab,通过 docker-compose 快速安装 GitLab rake,是 Rails 的工具,类似 ruby 中常用的的 make.通过 R ...
- Linux环境GitLab安装与配置
1.背景 近期公司源代码管理工具从svn转向git,因此要在服务器上部署gitlab,总共部署了两台服务器,一台是Ubuntu server 17.04,一台是Centos7.在部署的过程中遇到不少问 ...
- gitlab之一: gitlab安装配置使用
参考: gitlab 安装和配置 gitlab下载地址: https://mirror.tuna.tsinghua.edu.cn/gitlab-ce/ 官方教程: https://about.gitl ...
- CentOS6安装各种大数据软件 第九章:Hue大数据可视化工具安装和配置
相关文章链接 CentOS6安装各种大数据软件 第一章:各个软件版本介绍 CentOS6安装各种大数据软件 第二章:Linux各个软件启动命令 CentOS6安装各种大数据软件 第三章:Linux基础 ...
- CentOS6安装各种大数据软件 第八章:Hive安装和配置
相关文章链接 CentOS6安装各种大数据软件 第一章:各个软件版本介绍 CentOS6安装各种大数据软件 第二章:Linux各个软件启动命令 CentOS6安装各种大数据软件 第三章:Linux基础 ...
随机推荐
- 分布式系统的那些事儿(六) - SOA架构体系
有十来天没发文了,实在抱歉!最近忙着录视频,同时也做了个开源的后台管理系统LeeCX,目前比较简单,但是后续会把各类技术完善.具体可以点击“原文链接”. 那么今天继续说分布式系统的那些事. 我们现在动 ...
- 微信小程序调用蓝牙功能控制车位锁
第一次学用微信小程序,项目需要,被逼着研究了一下,功能是调用微信小程序的蓝牙功能,连接上智能车位锁,控制升降,大概步骤及调用的小程序接口API如下: 1.打开蓝牙模块 wx.openBluetooth ...
- [svc]traceroute(udp+icmp)&tracert(icmp)原理
2018年4月11日 11:41:29更新 工具 发包 触发点 结局 traceroute 初始发udp包 ttl递增,icmp每一跳报ttl超时 udp端口不可达 tracert 初始发icmp r ...
- Openfire更新服务器名称的方法
转自:http://blog.csdn.net/vikione/article/details/5996932 Openfire更新服务器名称的方法: 1.登陆openfire管理页面,在主页面下方选 ...
- Win8/Win10下程序经常无响应的解决办法
如果你使用Win8/Win10系统时经常出现程序无响应的问题不仿试下如下解决办法. 表现症状: 任何程序都有可能出现无响应(记事本.Visual Studio.QQ.视频播放器等) 一旦一个程序出现未 ...
- 通过ip查找能应机器的MAC
例如:10.100.0.61 这些都是基于linux系统: 首先:ping 一下这个ip 然后arp 10.100.0.61就可以找出主机的MAC地址
- 设置Sysctl.conf用以提高Linux的性能(最完整的sysctl.conf优化方案)
Sysctl是一个允许您改变正在运行中的Linux系统的接口.它包含一些 TCP/IP 堆栈和虚拟内存系统的高级选项, 这可以让有经验的管理员提高引人注目的系统性能.用sysctl可以读取设置超过五百 ...
- [Windows Azure] Walkthrough to Configure System Center Management Pack for Windows Azure Fabric Preview for SCOM 2012 SP1 (with a MetricsHub Bonus)
The wait is finally over. This is a huge update to the Azure Management Pack over the one that was r ...
- Android 开发添加控件事件的三种方式
import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view ...
- Linux源码分析之:malloc、free
之前写代码的时候一直有个疑问,malloc申请内存的时候指定了内存大小,但是free的时候却只指定要释放的内存地址,那么free是如何知道它要释放的内存空间大小呢? 源码之前,了无秘密,下面就从源码来 ...