阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

CentOS 7 安装 GitLab 详解

132次阅读
没有评论

共计 2322 个字符,预计需要花费 6 分钟才能阅读完成。

简介:

GitLab是一个利用 Ruby on Rails 开发的开源应用程序,实现一个自托管的 Git 项目仓库,可通过 Web 界面进行访问公开的或者私人项目。

它拥有与 GitHub 类似的功能,能够浏览源代码,管理缺陷和注释。可以管理团队对仓库的访问,它非常易于浏览提交过的版本并提供一个文件历史库。

团队成员可以利用内置的简单聊天程序(Wall)进行交流。它还提供一个代码片段收集功能可以轻松实现代码复用,便于日后有需要的时候进行查找。

1. 请在 代理 环境下安装所需环境依赖组件

sudo yum install curl policycoreutils openssh-server openssh-clients

sudo systemctl enable sshd

sudo systemctl start sshd

sudo yum install postfix

sudo systemctl enable postfix

sudo systemctl start postfix

sudo firewall-cmd –permanent –add-service=http

sudo systemctl reload firewalld

 2. 安装 gitlab 安装包

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

#注意:如下载失败提示 ca 证书问题,请使用 curl -k …… 下载即可

sudo yum install gitlab-ce

 3. 以上步骤完成后,及 gitlab 安装就完成了,接下来我们进行相关配置

vim /etc/gitlab/gitlab.rb

(1). 配置访问 ip 及端口或使用域名

CentOS 7 安装 GitLab 详解

(2). 配置 email 邮件发送(此处已 163 邮箱做示例),其他邮箱可参照:https://docs.gitlab.com/omnibus/settings/smtp.html

# 配置发送邮箱

gitlab_rails[‘smtp_enable’] = true

gitlab_rails[‘smtp_address’] = “smtp.163.com”

gitlab_rails[‘smtp_port’] = 25 

 gitlab_rails[‘smtp_user_name’] = “smtp user@163.com”

gitlab_rails[‘smtp_password’] = “password”

gitlab_rails[‘smtp_domain’] = “163.com”

gitlab_rails[‘smtp_authentication’] = “login”

gitlab_rails[‘smtp_enable_starttls_auto’] = true

# 修改 gitlab 配置的发信人

gitlab_rails[‘gitlab_email_from’] = “smtp user@163.com”

user[“git_user_email”] = “smtp user@163.com”

(3). 重启服务以便应用以上配置

sudo gitlab-ctl reconfigure

 4. 打开网址: http://127.0.0.1 (注:如安装了 Apache 占用 80 端口,请更改 Apache 的默认端口)

# 首次需要配置 root 账户密码

CentOS 7 安装 GitLab 详解

# 配置完毕后,跳转至登录界面,使用账户:root 以及刚刚设置的密码即可正常登录!

# 如需配置用户注册后需要验证邮箱才可登录,使用 root 账号登录后配置

CentOS 7 安装 GitLab 详解

至此,GitLab 服务器端已经配置完成了!

更多 GitLab 相关教程见以下内容

Ubuntu 14.04 下安装 GitLab 指南  http://www.linuxidc.com/Linux/2015-12/126876.htm

如何在 Ubuntu Server 14.04 下安装 Gitlab 中文版  http://www.linuxidc.com/Linux/2015-12/126875.htm

CentOS 源码安装 GitLab 汉化版  http://www.linuxidc.com/Linux/2015-10/124648.htm

在 Ubuntu 12.04 上安装 GitLab http://www.linuxidc.com/Linux/2012-12/75249.htm

GitLab 5.3 升级注意事项 http://www.linuxidc.com/Linux/2013-06/86473.htm

在 CentOS 上部署 GitLab (自托管的 Git 项目仓库) http://www.linuxidc.com/Linux/2013-06/85754.htm

在 RHEL6/CentOS6/ScientificLinux6 上安装 GitLab 6.0.2 http://www.linuxidc.com/Linux/2014-03/97831.htm

CentOS 6.5 安装 GitLab 教程及相关问题解决 http://www.linuxidc.com/Linux/2014-05/101526.htm

升级 GitLab 到 8.2.0  http://www.linuxidc.com/Linux/2015-12/126220.htm

GitLab 的详细介绍:请点这里
GitLab 的下载地址:请点这里 

本文永久更新链接地址:http://www.linuxidc.com/Linux/2017-06/144982.htm

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-21发表,共计2322字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中