这里安装的环境为阿里云centos7.9
1.相关环境、依赖安装(服务器最低配置2核4G,这是最低要求的配置,否则跑不动gitlab)
yum -y install policycoreutils openssh-server openssh-clients postfix
yum install policycoreutils-python
systemctl enable sshd && sudo systemctl start sshd
systemctl enable postfix && systemctl start postfix
2.关闭防火墙或者防火墙增加白名单
systemctl stop firewalld.service
3.下载软件
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-15.2.2-ce.0.el7.x86_64.rpm/download.rpm
4.开始安装
yum install -y gitlab-ce-15.2.2-ce.0.el7.x86_64.rpm
5.修改默认端口
cd /etc/gitlab
vi gitlab.rb
6.在文件中修改 external_url和nginx[‘listen_port’]的key对应的内容
external_url 'http://本机IP:8099'
nginx['listen_port'] = 8099
6.重启
gitlab-ctl reconfigure
gitlab-ctl restart
7.页面输入即可访问
http://ip:8099
8.查看初始密码,这个初始密码有效时间为24小时,尽快登录修改初始密码,账号为root
/etc/gitlab/initial_root_password