Centos7安装gitlab

前端之家收集整理的这篇文章主要介绍了Centos7安装gitlab前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

GitLab的安装

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

@H_404_2@sudo yum install curl policycoreutils openssh-server openssh-clients

@H_404_2@sudo systemctl enable sshd

@H_404_2@sudo systemctl start sshd

@H_404_2@sudo yum install postfix

@H_404_2@sudo systemctl enable postfix

@H_404_2@sudo systemctl start postfix

@H_404_2@sudo firewall-cmd --permanent --add-service=http

@H_404_2@sudo systemctl reload firewalld 

@H_404_2@2.添加GitLab镜像源并安装

@H_404_2@curl -sS http://packages.gitlab.com.cn/install/gitlab-ce/script.rpm.sh | sudo bash

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

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

@H_404_2@修改内容如下:

@H_404_2@[gitlab-ce]

@H_404_2@name=gitlab-ce

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

@H_404_2@repo_gpgcheck=0

@H_404_2@gpgcheck=0

@H_404_2@enabled=1

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

@H_404_2@然后执行

@H_404_2@sudo yum install gitlab-ce

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

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

@H_404_2@ 

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

@H_404_2@ 

@H_404_2@ 

@H_404_2@

@H_404_2@

@H_404_2@ 

猜你在找的Linux相关文章