下载gitlab17安装包:
[root@openeuler24 ~]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el9/gitlab-ce-17.1.1-ce.0.el9.x86_64.rpm
安装gitlab:
[root@openeuler24 ~]# yum localinstall gitlab-ce-17.1.1-ce.0.el9.x86_64.rpm -y
#编辑配置文件
vim /etc/gitlab/gitlab.rb
#external_url修改
external_url ‘http://10.10.10.51’
#存储目录修改,关键字 git_data_dirs
[root@openeuler24 ~]# mkdir -p /data/gilab
#邮箱配置
smtp_address:邮箱服务器地址
smtp_port:邮箱服务器端口
smtp_user_name:邮箱号
smtp_password:授权码(***注意不是密码***)
smtp_domain:邮箱服务器地址
gitlab_email_from:邮箱号
重新加载配置:
[root@openeuler24 ~]# gitlab-ctl reconfigure
/opt/gitlab/embedded/bin/ruby: error while loading shared libraries: libcrypt.so.2: cannot open shared object file: No such file or directory
缺少libcrypt.so.2文件报错解决:
[root@openeuler24 ~]# ln -s /usr/lib64/libcrypt.so.1 /usr/lib64/libcrypt.so.2
[root@openeuler24 ~]# gitlab-ctl reconfigure #再次执行
安装完成,如下图:
关闭防火墙就可以通过WEB流量打开了:
[root@openeuler24 ~]# systemctl stop firewalld
[root@openeuler24 ~]# cat /etc/gitlab/initial_root_password #查看root用户密码