centos 安装gitlab
1.开始安装依赖软件:yum -y install policycoreutils openssh-server openssh-clients postfix
2.设置postfix开机自启动,postfix支持gitlab发信功能:systemctl enable postfix && systemctl start postfix
如果出现:
Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service" and "journalctl -xe" for details.
vim /etc/postfix/main.cf
inet_protocols = ipv4
inet_interfaces = all
3.下载gitlab包(建议去网站下载最新版本https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/?C=M&O=A)
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.3.3-ce.0.el7.x86_64.rpm
rpm -i gitlab-ce-11.3.3-ce.0.el7.x86_64.rpm
如果报错:
error: Failed dependencies:
policycoreutils-python is needed by gitlab-ce-10.7.3-ce.0.el7.x86_64
安装环境
yum install policycoreutils-python
别的网站下载后有时候会报错


4.修改gitlab 端口和ip
vim /etc/gitlab/gitlab.rb
IP地址+端口号: external_url 'http://192.168.0.217:8010'
5.配置并启动gitlab
gitlab-ctl reconfigure (可能会一段时间)
gitlab-ctl restart
下图表示成功

6.页面打开 如果出现这个错误

1.更改端口号 vim /etc/gitlab/gitlab.rb(更改后要重新运行)
gitlab-ctl reconfigure (可能会一段时间)
gitlab-ctl restart
2.权限问题,解决方法:chmod -R 755 /var/log/gitlab
3.内存大于4G
7.首次进入会让你修改密码:修改后进入
.后来把端口改为8081后就可以了

9.创建用户
1.点击小工具
2.添加user


10.关于发送邮箱。postfix默认用的25端口,但是阿里云又不让开启25端口。
vim /etc/gitlab/gitlab.rb
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.qq.com"
gitlab_rails['smtp_port'] =
gitlab_rails['smtp_user_name'] = "2833xxx@qq.com" # 你自己QQ号
gitlab_rails['smtp_password'] = "*************" # QQ授权码
gitlab_rails['smtp_domain'] = "smtp.qq.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true
gitlab_rails['gitlab_email_from'] = '2833xxx@qq.com' # 你自己QQ号
3.打开自己的qq邮箱
打开QQ邮箱-设置-账户-帐户安全-开启服务-POP3/SMTP服务-生成授权码-发个短信
gitlab-ctl reconfigure 重新配置
4.进入gitlab-rails console
Notify.test_email('yoyo_你自己随便邮箱@qq.com', '邮件标题_test', '邮件正文_test').deliver_now
[root@iZ2ze9m7ocdxc43mxwv5uwZ ~]# gitlab-rails console
-------------------------------------------------------------------------------------
GitLab: 11.11.0 (3e8ca2fb781)
GitLab Shell: 9.1.0
PostgreSQL: 9.6.11
-------------------------------------------------------------------------------------
Loading production environment (Rails 5.1.7)
irb(main):001:0> Notify.test_email('1003487863@qq.com','标题党','正文').deliver_now
Notify#test_email: processed outbound mail in 189.3ms
Sent mail to 1003487863@qq.com (1514.7ms)
Date: Mon, 27 May 2019 15:56:21 +0800
From: GitLab <1003487863@qq.com>
Reply-To: GitLab <noreply@39.97.187.87>
To: 1003487863@qq.com
Message-ID: <5ceb9825445e3_3d873ff6a9dd65f0390e9@iZ2ze9m7ocdxc43mxwv5uwZ.mail>
Subject: =?UTF-8?Q?=E6=A0=87=E9=A2=98=E5=85=9A?=
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><p>正文</p></body></html> => #<Mail::Message:70328290558700, Multipart: false, Headers: <Date: Mon, 27 May 2019 15:56:21 +0800>, <From: GitLab <1003487863@qq.com>>, <Reply-To: GitLab <noreply@39.97.187.87>>, <To: 1003487863@qq.com>, <Message-ID: <5ceb9825445e3_3d873ff6a9dd65f0390e9@iZ2ze9m7ocdxc43mxwv5uwZ.mail>>, <Subject: 标题党>, <Mime-Version: 1.0>, <Content-Type: text/html; charset=UTF-8>, <Content-Transfer-Encoding: 7bit>, <Auto-Submitted: auto-generated>, <X-Auto-Response-Suppress: All>>
irb(main):002:0> exit()
[root@iZ2ze9m7ocdxc43mxwv5uwZ ~]#
5.现在创建用户就会发送邮件
centos 安装gitlab的更多相关文章
- CentOS安装gitlab,gerrit,jenkins并配置ci流程
CentOS安装gitlab,gerrit,jenkins并配置ci流程 By Wenbin juandx@163.com 2016/4/9 这是我参考了网上很多的文档,配置了这三个软件在一个机器上, ...
- CentOS安装gitLab服务器
首先利用gitlab-install-el6.sh安装,比较简单: (出处:http://www.linuxidc.com/Linux/2013-06/85754.htm) 1:如果有条件,提供一台全 ...
- centos安装gitlab成果
centos安装gitlab成果 开始之前 在开始之前请先查看官方的刚需文档: https://github.com/gitlabhq/gitlabhq/blob/master/doc/install ...
- CentOS 安装 Gitlab
源地址 https://mirror.tuna.tsinghua.edu.cn/gitlab-ce/ # 清华源 https://mirrors.tuna.tsinghua.edu.cn/help/g ...
- 转载:centos安装gitlab详解
原文地址:http://blog.csdn.net/jiangtao_st/article/details/73612298 一, 服务器快速搭建gitlab方法 可以参考gitlab中文社区 的教程 ...
- centos安装gitlab及汉化
GitLab 是一个用于仓库管理系统的开源项目,使用Git作为代码管理工具,并在此基础上搭建起来的web服务.今天,就记录一下centos部署gitlab及其汉化的操作方法. 1.下载安装 下载地址: ...
- 腾讯云Centos安装gitlab
参考了网上很多人写的安装教程,结果并不好,最后阅读了官方的英文api,才安装成功,这里记录下来,方便以后使用.我的安装环境为腾讯云主机Centos7.3 64bit gitlab官方api地址点我试试 ...
- Centos 安装 GitLab 8.5.1 版本管理
GitLab版本管理 GitLab是利用 Ruby on Rails 一个开源的版本管理系统,实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私人项目.它拥有与Github类似的功能 ...
- centos安装gitlab
原文链接: http://www.centoscn.com/image-text/install/2015/0320/4929.html http://www.01happy.com/centos-6 ...
随机推荐
- R3环申请内存时页面保护与_MMVAD_FLAGS.Protection位的对应关系
Windows内核分析索引目录:https://www.cnblogs.com/onetrainee/p/11675224.html 技术学习来源:火哥(QQ:471194425) R3环申请内存时页 ...
- ASP.NET Core MVC配置差异(3.0和2.X)
https://www.cnblogs.com/lonelyxmas/p/10934388.html net core 2.x MVC配置 public void ConfigureServices( ...
- Java学习 1.2——简述JVM,JRE,JDK的关系
在上一节中,我们了解了JVM相关的知识,有兴趣的话可以先去看一下: Java学习 1.1——(JVM介绍)Java为什么能够跨平台? 这个篇主要分享的是JRE,JDK,JVM三者的区别,简言之: JD ...
- JPA连接Mysql数据库时提示:Table 'jpa.sequence' dosen't exisit
场景 在使用JPA连接Mysql数据库进行数据持久化时提示: Table 'jpa.sequence' dosen't exist 注: 博客主页: https://blog.csdn.net/bad ...
- IDEA 2019.2版本下载安装与PJ教程
场景 IDEA版本过低的话会导致某些IDEA插件没法安装,比如Lombok插件和EasyCode插件等. 实现 双击exe安装包 点击Next 选择安装路径,点击Next 设置桌面快捷方式,增加到右键 ...
- VMware+node+nginx+vue
1.安装CentOS 这里不再复述,不会的请移步VMware虚拟机安装centos7 2.部署 1.安装 node.js cd /usr/local/ wget https://nodejs.or ...
- Taro自定义Modal对话框组件|taro仿微信、android弹窗
基于Taro多端实践TaroPop:自定义模态框|dialog对话框|msg消息框|Toast提示 taro自定义弹出框支持编译到多端H5/小程序/ReactNative,还可以自定义弹窗类型/弹窗样 ...
- 阅读SQL基础教程
这两天阅读SQL基础教程,目标是把SQL语法吃透,会写一些笔记.
- Spring Boot 2 使用自定义配置
在application.yml定义配置后,可以使用Environment来读取配置,也可以使用@Value注解让业务代码去读取配置.如果属性较多,可以定义属性映射对象. 开发环境:IntelliJ ...
- bay——安装_Oracle 12C-单实例-Centos7.txt
安装Oracle12C 总结笔记 IP:10.20.4.214 ---------------------------------------------用户和密码: root/bayaimbayai ...