gitlab安装 centos
时间: 2024-08-12 17:04:29 浏览: 67
GitLab是一款流行的开源代码托管平台,你可以通过包管理器或者手动下载源码在CentOS上安装它。以下是基本步骤:
1. **更新系统**:
```sh
sudo yum update -y
```
2. **安装依赖**:
```
sudo yum install -y curl openssh-server gcc-c++ libcurl-devel libgit2-devel make tar
```
3. **添加EPEL仓库** (如果尚未添加):
```sh
wget -O /etc/yum.repos.d/epel.repo https://mirrors.tuna.tsinghua.edu.cn/epel/7/x86_64/epel-release-7-16.noarch.rpm
sudo rpm -Uvh /etc/yum.repos.d/epel.repo
```
4. **安装GitLab Omnibus包** (使用包管理器) 或者从源码编译(手动安装):
**使用包管理器**:
```sh
sudo yum install -y gitlab-ce
```
**从源码编译**:
```
# 下载并解压最新版本的GitLab
curl -fsSL https://packages.gitlab.com/gitlab/gitlab-ce/install_scripts/centos/7/gitlab-auto-install.sh | sudo bash
```
5. **启动服务**:
```sh
sudo systemctl start gitlab.service
sudo systemctl enable gitlab.service
```
6. **访问安装后的GitLab**:
浏览器打开 `http://your_server_ip` (替换为你的服务器IP地址),按照向导完成剩余配置。
阅读全文
相关推荐


















