CentOS 7安装GitLab14.7
在CentOS 7上安装GitLab 14.7
在 CentOS 7(以及 RedHat/Oracle/Scientific Linux 7)上,下面的命令还将在系统防火墙中打开 HTTP、HTTPS 和 SSH 访问
sudo yum install -y curl policycoreutils-python openssh-server perl #查看openssh服务状态 sudo systemctl status sshd #设置openssh服务开机启动 sudo systemctl enable sshd #启动openssh sudo systemctl start sshd #查看防火墙是否打开 sudo systemctl status firewalld #防火墙添加http和https sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --permanent --add-service=https #重新加载防火墙 sudo systemctl reload firewalld
在线安装:
- 添加 GitLab 包存储库
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
- 安装
yum install -y gitlab-ce
离线安装
- 下载Gitlab软件包上传到CentOS
访问 https://packages.gitlab.com/gitlab/gitlab-ce/ 获取对应的软件包
- 安装GitLab
yum -y install gitlab-ce-14.7.0-ce.0.el7.x86_64.rpm
配置访问地址和端口
vim /etc/gitlab/gitlab.rb
external_url 'http://192.168.1.22:8000' nginx['listen_port'] = 8000
重载配置、重启服务
gitlab-ctl reconfigure gitlab-ctl restart
把端口添加到防火墙
firewall-cmd --zone=public --add-port=8000/tcp --permanent #重新加载防火墙 firewall-cmd --reload
默认有一个用户root,安装时没有设置密码,密码随机生成,在目录 /etc/gitlab/initial_root_password
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 快收藏!一个技巧从此不再搞混缓存穿透和缓存击穿
· Blazor Hybrid适配到HarmonyOS系统
· 支付宝 IoT 设备入门宝典(下)设备经营篇
· 万字调研——AI生成内容检测
· 解决跨域问题的这6种方案,真香!