centos7安装GitLab最新版本
一、安装gitlab
1、依赖包安装
[root@svn_git ~]# yum install curl policycoreutils-python openssh-server postfix wget git patch -y
启动ssh和postfix服务、关闭防火墙,创建服务用户gitlab
[root@svn_git ~]# useradd -s /sbin/nologin gitlab
[root@svn_git ~]# systemctl start sshd
[root@svn_git ~]# systemctl enable sshd
[root@svn_git ~]# systemctl start postfix
[root@svn_git ~]# systemctl enable postfix
[root@svn_git ~]# systemctl stop firewalld
[root@svn_git ~]# systemctl disable firewalld
[root@svn_git ~]# setenforce 0
[root@svn_git ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
2、GitLab包下载
[root@svn_git ~]# wget https://mirror.tuna.tsinghua.edu.cn/gitlab-ee/yum/el7/gitlab-ee-13.0.6-ee.0.el7.x86_64.rpm
3、安装
[root@svn_git ~]# yum install gitlab-ee-13.0.6-ee.0.el7.x86_64.rpm -y

4、配置配置文件
[root@svn_git ~]# vim /etc/gitlab/gitlab.rb
//修改29行为自己域名,777和778行为服务用户名和组
29 external_url 'http://gitlab.cnbugs.com'
777 user['username'] = "gitlab"
778 user['group'] = "gitlab"
5、加载GitLab资源
[root@svn_git ~]# gitlab-ctl reconfigure

查看服务

6、打开浏览器访问设置的域名(外网需要做域名解析,内网需要增加hosts文件),用户名默认为root,密码为自己设置的密码

安装完成

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。