Centos7安装gitlab

GitLab的安装

1.在CentOS系统上,下面的命令将会打开系统防火墙HTTP和SSH访问。

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 http://packages.gitlab.com.cn/install/gitlab-ce/script.rpm.sh | sudo bash

这是官方的yum源,安装速度会比较慢,可以使用国内源,修改如下文件即可:

vim /etc/yum.repos.d/gitlab_gitlab-ce.repo

修改内容如下:

[gitlab-ce]

name=gitlab-ce

baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7

repo_gpgcheck=0

gpgcheck=0

enabled=1

gpgkey=https://packages.gitlab.com/gpg.key

然后执行:

sudo yum install gitlab-ce

#配置并启动 GitLab sudo gitlab-ctl reconfigure

安装成功会有欢迎界面提示(窗口控制台处)

3.第一次访问GitLab,系统会重定向页面到重定向到重置密码页面,你需要输入初始化管理员账号的密码,管理员的用户名为root,初始密码为5iveL!fe。重置密码后,新密码即为刚输入的密码。

 

原文地址:https://www.cnblogs.com/longronglang/p/8666626.html