系统版本
[root@localhost ~]# cat /etc/redhat-release
Red Hat Enterprise Linux release 9.1 (Plow)
gitlab包位置
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ee/yum/el9/gitlab-ee-16.7.2-ee.0.el9.x86_64.rpm
关闭防火墙
[root@localhost data]# systemctl stop firewalld
[root@localhost data]# systemctl disable firewalld
[root@localhost data]# getenforce
Enforcing
[root@localhost data]# setenforce 0
[root@localhost data]# getenforce
Permissive
[root@localhost data]# vim /etc/selinux/config
[root@localhost data]# cat /etc/selinux/config |grep -v '#'|grep 'SELINUX='
SELINUX=disabled
安装gitlab
[root@localhost data]# yum -y install gitlab-ee-16.7.2-ee.0.el9.x86_64.rpm
许可证生成
ruby安装
[root@localhost data]# yum -y install ruby.x86_64
查看ruby版本
ruby -v
安装更高的版本
gpg2 --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
\curl -sSL https://get.rvm.io | bash -s stable
source /usr/local/rvm/scripts/rvm
rvm install 2.7.0
rvm use 2.7.0 --default
ruby -v
安装gitlab-license
gem install gitlab-license
创建生成ruby证书的源文件 license.rb
require "openssl"
require "gitlab/license"
key_pair = OpenSSL::PKey::RSA.generate(2048)
File.open("license_key", "w") {
|f| f.write(key_pair.to_pem) }
public_key = key_pair.public_key
File.open("license_key.pub", "w") {
|f| f.write(public_key.to_pem) }
private_key = OpenSSL::PKey::RSA.new File.read("license_key")
Gitlab