centos7安装gitlab 支持带认证https,开启邮件功能 超级简单.
官方安装说明:https://about.gitlab.com/install/#centos-7
自定义yum源 自行搞定
下载gitlab
官方安装:
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
清华大学源下载:
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.10.4-ce.0.el7.x86_64.rpm
yum install gitlab-ce-11.10.4-ce.0.el7.x86_64.rpm -y
关防火墙 和 selinux
vim /etc/selinux/config
修改配置文件
vim /etc/gitlab/gitlab.rb
设置 https支持 [这里要注意,必须设置为https://你的域名,不然后面设置证书什么都不会生效的] <----- 有坑的.请注意
##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
external_url 'https://gitlab.你的域名.com'
设置证书
再也不用忽略证书问题了,因为证书没问题了.
证书可以从 letsencrypt 生成免费的证书..(默认浏览器和工具都不会提示不安全警告的.)
详情参考:https://github.com/Neilpang/acme.sh/wiki/%E8%AF%B4%E6%98%8E
##! Most root CA's are included by default
nginx['ssl_client_certificate'] = "/home/centos/sslkeys/ca.crt"
##! enable/disable 2-way SSL client authentication
# nginx['ssl_verify_client'] = "off"
##! if ssl_verify_client on, verification depth in the client certificates chain
# nginx['ssl_verify_depth'] = "1"
nginx['ssl_certificate'] = "/home/centos/sslkeys/fullchain.cer"
nginx['ssl_certificate_key'] = "/home/centos/sslkeys/gitlab.你的域名.com.key"
设置Email支持
### GitLab email server settings
###! Docs: https://docs.gitlab.com/omnibus/settings/smtp.html
###! **Use smtp instead of sendmail/postfix.**
#这里使用的是阿里云推送 每日免费200封.
# 详细开通 这里哦 ---> https://dm.console.aliyun.com/?spm=5176.12818093.my.ddm.488716d0ezCKP2#/directmail/Home/cn-hangzhou
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtpdm.aliyun.com"
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_user_name'] = "admin@mail.你填写的域名.com"
gitlab_rails['smtp_password'] = "密码"
gitlab_rails['smtp_domain'] = "smtpdm.aliyun.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true
### Email Settings
gitlab_rails['gitlab_email_enabled'] = true
gitlab_rails['gitlab_email_from'] = 'admin@mail.你的域名.com' #注意要和你的用户名地址要匹配的
gitlab_rails['gitlab_email_display_name'] = 'Gitlab'
gitlab_rails['gitlab_email_reply_to'] = 'noreply@mail.wutoon.com'
gitlab_rails['gitlab_email_subject_suffix'] = ''
阿里云邮件推送 需要设置的项目

先添加域名,不明白看他们的文档, 配置好后要按照要求修改dns解析项目

配置完成执行
gitlab-ctl reconfigure
然后浏览器登录你的 gitlab 第一次它会要求你创建一个管理员密码.
配置觉得有问题可以 vim /etc/gitlab/gitlab.rb 保存之后 在执行 gitlab-ctl reconfigure 重新配置完成即可.
测试email 命令. []
进入控制台gitlab-rails console (测试邮件服务是否正常)
Notify.test_email("XXX@XXX.XX","title","content").deliver_now
测试完成,可以尝试点击忘记密码

centos7安装gitlab 支持带认证https,开启邮件功能 超级简单.的更多相关文章
- Centos7 安装gitLab
我这里使用的是centos 7 64bit,我试过centos 6也是可以的! 1. 安装依赖软件 yum -y install policycoreutils openssh-server open ...
- CentOS7安装GitLab、汉化、邮箱配置及使用
同步首发:http://www.yuanrengu.com/index.php/20171112.html 一.GitLab简介 GitLab是利用Ruby On Rails开发的一个开源版本管理系统 ...
- CentOs7安装gitlab(转!)
沧浪之水清兮,可以濯吾缨; 沧浪之水浊兮,可以濯吾足. ...
- centos7安装gitlab与gitlab的汉化
Gitlab概述 GitLab是一个利用 Ruby on Rails 开发的开源应用程序,实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私人项目. GitLab拥有与Github ...
- CentOS7安装GitLab、汉化、邮箱配置及使用(转载)
同步首发: https://www.cnblogs.com/heyonggang/p/7778203.html http://www.yuanrengu.com/index.php/20171112. ...
- CentOS7安装GitLab、汉化及使用
同步首发:http://www.yuanrengu.com/index.php/20171112.html 一.GitLab简介 GitLab是利用Ruby On Rails开发的一个开源版本管理系统 ...
- centos7 安装gitlab任意版本
主要还是根据官网:https://www.gitlab.cc/installation/#centos-7 1.安装依赖: sudo yum install curl policycoreutils ...
- centos7安装gitlab并汉化
一.基础环境准备 1.安装依赖包 [root@gitlab-server ~]#yum install curl policycoreutils openssh-server openssh-clie ...
- Centos7安装GitLab
GitLab CE Download Archives gitlab安装调试小记 Gitlab Free Trial GitLab搭建手记 Gitlab社区版的使用 GUI PNG Gitlab升级到 ...
随机推荐
- (二十二)SpringBoot之使用Druid连接池以及SQL监控和spring监控
一.引入maven依赖 <dependencies> <dependency> <groupId>org.springframework.boot</grou ...
- mysql 树结构递归处理
日常开发中我们经常会遇到树形结构数据处理,一般表结构通常会常用id,pid这种设计方案. 之前用oracle.sqlServer数据库,用相应的语法即可获取树形结构数据(oracel:connect ...
- 在论坛中出现的比较难的sql问题:1(字符串分拆+行转列问题 SQL遍历截取字符串)
原文:在论坛中出现的比较难的sql问题:1(字符串分拆+行转列问题 SQL遍历截取字符串) 最近,在论坛中,遇到了不少比较难的sql问题,虽然自己都能解决,但发现过几天后,就记不起来了,也忘记解决的方 ...
- Sql Server有主外键关系时添加、删除数据
当表之间有主外键关系时删除数据会被约束,添加.删除失败 解决办法,我们可以先把主外键关系的检查约束给关掉 → 然后删除数据 → 之后再把约束打开 查询出关掉所有外键约束的语句 SELECT 'ALTE ...
- C#一些面试知识题
1.简述 private. protected. public.internal 修饰符的访问权限答:private:私有成员, 在类的内部才可以访问(只能从其声明上下文中进行访问). protect ...
- 请问IOS中做一个手机网站的app壳复杂吗?
公司开发了一个平台,手机网站已经做出来了,想开发一个苹果应用app,但公司没人会IOS开发,为了减小成本,现在想直接做一个壳来加载手机网站,请问在ios中复杂吗?是否有相应的控件直接加载url就行? ...
- Visual Studio 开发大量 JavaScript 代码项目程序崩溃的解决方案
最近公司做新项目,基于 Bootstrap.AngularJS 和 kendo 开发一套后台的管理系统,在项目中使用了大量的 JavaScript 文件,这两天 Visual Studio 2015 ...
- Nginx Too many open files
2019/07/25 08:31:31 [crit] 15929#15929: accept4() failed (24: Too many open files) 2019/07/25 08:31: ...
- 【es6】将2个数组合并为一个数组
//第一种 一个数组中的值为key 一个数组中的值为value let arr1 = ['内存','颜色','尺寸']; let arr2 = [1,2,3]; let temp = arr1.map ...
- controller 层 date 类型的参数,SpringBoot自动转换 dateformat
这样客户端提交的String 就可以自动转换为Date了!!!