首页 > 代码库 > gitlab安装教程

gitlab安装教程

gitlab安装教程

 
 

安装教程

官网安装方法

https://about.gitlab.com/downloads/#centos7

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.下载并且安装

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

 

3.启动服务

sudo gitlab-ctl reconfigure

 

4.访问界面

curl loalhost 如果有返回登录说明已经配置好。也可以使用浏览器输入localhost,前提端口别冲突。

 

5.配置企业邮箱

企业邮箱配置和个人邮箱配置不同,这里直接介绍企业邮箱配置

vi /etc/gitlab/gitlab.rb

插入下面内容

gitlab_rails[‘smtp_enable‘] = true

gitlab_rails[‘smtp_address‘] = "smtp.exmail.qq.com"

gitlab_rails[‘smtp_port‘] = 465

gitlab_rails[‘smtp_user_name‘] = "88888888@kongming.ren"

gitlab_rails[‘smtp_password‘] = "88888888"

gitlab_rails[‘smtp_domain‘] = "kongming.ren"

gitlab_rails[‘smtp_authentication‘] = "login"

gitlab_rails[‘smtp_enable_starttls_auto‘] = true

gitlab_rails[‘smtp_tls‘] = true

gitlab_rails[‘gitlab_email_from‘] = " 88888888@kongming.ren "

保存完后运行 sudo gitlab-ctl reconfigure

 

Complete!

gitlab安装教程