redhat 8 部署gitlab
防火墙端口 80
firewall-cmd --zone=public --add-port=80/tcp --permanent
依赖包安装
sudo dnf install -y curl policycoreutils openssh-server openssh-clients
sudo systemctl enable sshd sudo systemctl start sshd
配置极狐GitLab 软件源镜像。
curl -fsSL https://packages.gitlab.cn/repository/raw/scripts/setup.sh | /bin/bash
执行如下命令开始安装:
sudo EXTERNAL_URL="https://gitlab.example.com" dnf install -y gitlab-ce
修改gitlab 访问端口
$ vim /etc/gitlab/gitlab.rb
修改配置: external_url 'http://127.0.0.1:8090'
$ gitlab-ctl reconfigure
$ gitlab-ctl restart
浏览到主机名并登录
除非你在安装时提供了自定义密码,否则会随机生成一个密码,并在 /etc/gitlab/initial_root_password 中保存 24 小时。使用此密码和用户名 root 登录。
需要关闭 selinux
# sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
确认是否修改成功
# grep SELINUX /etc/selinux/config
然后重启系统即可
# reboot

浙公网安备 33010602011771号